Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport PR #16375 to 8.15: Exclude substitution refinement on pipelines.yml #16384

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 9, 2024

Backport PR #16375 to 8.15 branch, original message:


Release notes

What does this PR do?

Continues a work of #16365 which fixed the bug of using array value with docker environment variables (such as XPACK_MANAGEMENT_PIPELINE_ID, XPACK_MANAGEMENT_ELASTICSEARCH_HOSTS). However, if config.string contains ${VAR}s substituted its origin value, refinement logic cleans up the quotes used on configs, for example output { elasticsearch { hosts => "my.host:9200"} }, my.host:9200 loses double quotes.
With this PR, we are excluding pipelines.yml and only applying refinement on ENV ${VAR}s.

Why is it important/What is the impact to the user?

Users who are using config.string should have a consistent user experience.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files (and/or docker env variables)
  • I have added tests that prove my fix is effective or that my feature works

Author's Checklist

How to test this PR locally

  • Pull the PR
  • Use config.string in pipelines.yml with containing ${VAR} and es-output with hosts option.
  • Without this change, pipeline start fails
  • With this change, pipeline starts without issue

Related issues

Use cases

Screenshots

Logs

* Exclude substitution refinement on pipelines.yml (applies on ENV vars and logstash.yml where env2yaml saves vars)

* Safety integration test for pipeline config.string contains ENV .

(cherry picked from commit e104704)
@mashhurs
Copy link
Contributor

mashhurs commented Aug 9, 2024

CI failures are due to artifact not found:

> java.io.FileNotFoundException: https://artifacts-snapshot.elastic.co/elasticsearch/latest/8.15.1-SNAPSHOT.json
 ```

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link
Contributor

@mashhurs mashhurs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@mashhurs mashhurs merged commit 425e796 into 8.15 Aug 9, 2024
5 checks passed
@mashhurs mashhurs deleted the backport_16375_8.15 branch August 9, 2024 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants