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

inject VERSION_QUALIFIER into the build to be displayed to users #16898

Open
jsvd opened this issue Jan 13, 2025 · 1 comment
Open

inject VERSION_QUALIFIER into the build to be displayed to users #16898

jsvd opened this issue Jan 13, 2025 · 1 comment

Comments

@jsvd
Copy link
Member

jsvd commented Jan 13, 2025

previously in 5.0.0-8.0.0 the version qualifier wasn't present in the build artifacts.

To facilitate distinction between GA and pre-releases like betas and rcs, we'd like for the VERSION_QUALIFIER to be present in the build artifacts.

@jsvd
Copy link
Member Author

jsvd commented Jan 13, 2025

Issues:

  1. Artifact tasks copy the versions.yml to two places:
./logstash-core/versions-gem-copy.yml
./logstash-core-plugin-api/versions-gem-copy.yml
  1. we have the same code for version loading 3 times:
./logstash-core/lib/logstash/version.rb:  ALL_VERSIONS = YAML.load_file(File.expand_path("../../versions-gem-copy.yml", 
./logstash-core/lib/logstash-core/version.rb:  ALL_VERSIONS = YAML.load_file(File.expand_path("../../versions-gem-copy.yml", File.dirname(__FILE__)))
./logstash-core-plugin-api/lib/logstash-core-plugin-api/version.rb:  ALL_VERSIONS = YAML.load_file(File.expand_path("../../versions-gem-copy.yml", File.dirname(__FILE__)))
  1. During normal Logstash startup logstash-core-plugin-api is the one that is loaded first, so it loads versions from ./logstash-core-plugin-api/versions-gem-copy.yml.

  2. Depending on the command/method to see the version, we see different versions

a) bin/logstash --version will load the value from cat ./logstash-core/versions-gem-copy.yml | yq .logstash
b) bin/logstash --debug --version will load the value from cat ./logstash-core-plugin-api/versions-gem-copy.yml | yq .logstash
c) curl localhost:9600 | jq .version will load the value from cat ./logstash-core-plugin-api/versions-gem-copy.yml | yq .logstash-core (constant LOGSTASH_CORE_VERSION).

@jsvd jsvd changed the title inject VERSION_QUALIFIER into the build to be used in version inject VERSION_QUALIFIER into the build to be displayed to users Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant