logstash
logstash copied to clipboard
health-report: link to major.minor-versioned help docs on 9.0+
Release notes
- fixed an issue where a diagnosis in the health report on Logstash 9.0.0 points to future-facing documentation (
master) instead of the docs that are specific to 9.0 (9.0)
What does this PR do?
- determines the help URL base at compile-time based on a few factors:
- snapshot builds for unreleased branches:
- 9.x points to
master - others point to
${majorVersion}.x
- 9.x points to
- others point to
${majorVersion}.${minorVersion}
- snapshot builds for unreleased branches:
Why is it important/What is the impact to the user?
When running Logstash 9.0, this makes the help_url-s in diagnostics correctly point to 9.0-specific guidance, instead of pointing to forward-facing guidance from the bleeding edge of main/master.
As of the time of this writing, the two are the same; but as new things are added to main, they will eventually diverge.
Checklist
- [x] My code follows the style guidelines of this project
- [x] 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~~
How to test this PR locally
The procedure is the same in several configurations
- start a pipeline that will block
bin/logstash -e 'input { generator { } } filter { ruby { code => "sleep 1" } } output { sink { } }' - watch the health report for ~1 minute until the status degrades:
watch curl --silent 'localhost:9600/_health_report?pretty=true'
Configurations:
- snapshots:
- unrelased main:
- ensure versions.yml is unmodified:
git checkout -- versions.yml - build logstash
./gradlew installDefaultGems --info | grep HelpUrl - run test
- expect url to begin with
https://www.elastic.co/guide/en/logstash/master/
- ensure versions.yml is unmodified:
- unreleased 8.19
- emulate versions:
yq -i '(.logstash, ."logstash-core") = "8.19.0"' versions.yml - build logstash
./gradlew installDefaultGems --info | grep HelpUrl - run test
- expect url to begin with
https://www.elastic.co/guide/en/logstash/8.x/
- emulate versions:
- 9.0 branch
- emulate versions:
yq -i '(.logstash, ."logstash-core") = "9.0.1"' versions.yml - build logstash
./gradlew installDefaultGems --info | grep HelpUrl - run test
- expect url to begin with
https://www.elastic.co/guide/en/logstash/9.0/
- emulate versions:
- unrelased main:
- releases:
- main (suppose 9.1 release):
- emulate versions:
yq -i '(.logstash, ."logstash-core") = "9.1.0"' versions.yml - build logstash
RELEASE=1 ./gradlew installDefaultGems --info | grep HelpUrl - run test
- expect url to begin with
https://www.elastic.co/guide/en/logstash/9.1/
- emulate versions:
- unreleased 8.19
- emulate versions:
yq -i '(.logstash, ."logstash-core") = "8.19.0"' versions.yml - build logstash
RELEASE=1 ./gradlew installDefaultGems --info | grep HelpUrl - run test
- expect url to begin with
https://www.elastic.co/guide/en/logstash/8.19/
- emulate versions:
- 9.0 branch
- emulate versions:
yq -i '(.logstash, ."logstash-core") = "9.0.1"' versions.yml - build logstash
RELEASE=1 ./gradlew installDefaultGems --info | grep HelpUrl - run test
- expect url to begin with
https://www.elastic.co/guide/en/logstash/9.0/
- emulate versions:
- main (suppose 9.1 release):
This pull request does not have a backport label. Could you fix it @yaauie? 🙏 To fixup this pull request, you need to add the backport labels for the needed branches, such as:
backport-8./dis the label to automatically backport to the8./dbranch./dis the digit.- If no backport is necessary, please add the
backport-skiplabel
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
:green_heart: Build Succeeded
- Buildkite Build
- Commit: 0a2ae1f2e987f69ab9c026a4f12b790251fcc33b
History
- :broken_heart: Build #2924 failed f37f304bc3689204d937129da82409737bf9761f