-
Notifications
You must be signed in to change notification settings - Fork 3.5k
entrypoint: avoid polluting stdout #17125
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
Conversation
routes output from setup-related functions to stderr, so that stdout can include only the output of the actual program.
|
💛 Build succeeded, but was flaky
Failed CI Steps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This certainly looks correct and idiomatic for shell and batch wrappers. I cant think of any compatability issues here in terms of surprising new behavior. 👍
|
@logstashmachine backport 9.0 |
|
@logstashmachine backport 8.x |
routes output from setup-related functions to stderr, so that stdout can include only the output of the actual program. (cherry picked from commit 91258c3)
routes output from setup-related functions to stderr, so that stdout can include only the output of the actual program. (cherry picked from commit 91258c3)
In elastic#17125 jvm setup was redirected to stderr to avoid polluting stdout. This test was actually having to do some additional processing to parse that information. Now that we have split the destinations the tests can be simplified to look for the data they are trying to validate on the appropriate stream.
In #17125 jvm setup was redirected to stderr to avoid polluting stdout. This test was actually having to do some additional processing to parse that information. Now that we have split the destinations the tests can be simplified to look for the data they are trying to validate on the appropriate stream.
In #17125 jvm setup was redirected to stderr to avoid polluting stdout. This test was actually having to do some additional processing to parse that information. Now that we have split the destinations the tests can be simplified to look for the data they are trying to validate on the appropriate stream. (cherry picked from commit 227c0d8)
In #17125 jvm setup was redirected to stderr to avoid polluting stdout. This test was actually having to do some additional processing to parse that information. Now that we have split the destinations the tests can be simplified to look for the data they are trying to validate on the appropriate stream. (cherry picked from commit 227c0d8)
routes output from setup-related functions to stderr, so that stdout can include only the output of the actual program. (cherry picked from commit 91258c3) Co-authored-by: Ry Biesemeyer <[email protected]>
routes output from setup-related functions to stderr, so that stdout can include only the output of the actual program. (cherry picked from commit 91258c3) Co-authored-by: Ry Biesemeyer <[email protected]>
…#17139) In #17125 jvm setup was redirected to stderr to avoid polluting stdout. This test was actually having to do some additional processing to parse that information. Now that we have split the destinations the tests can be simplified to look for the data they are trying to validate on the appropriate stream. (cherry picked from commit 227c0d8) Co-authored-by: Cas Donoghue <[email protected]>
…#17140) In #17125 jvm setup was redirected to stderr to avoid polluting stdout. This test was actually having to do some additional processing to parse that information. Now that we have split the destinations the tests can be simplified to look for the data they are trying to validate on the appropriate stream. (cherry picked from commit 227c0d8) Co-authored-by: Cas Donoghue <[email protected]>
routes output from setup-related functions to stderr, so that stdout can include only the output of the actual program.
…#17138) In elastic#17125 jvm setup was redirected to stderr to avoid polluting stdout. This test was actually having to do some additional processing to parse that information. Now that we have split the destinations the tests can be simplified to look for the data they are trying to validate on the appropriate stream.
…gify * upstream/main: (27 commits) Add Windows 2025 to CI (elastic#17133) Update container acceptance tests with stdout/stderr changes (elastic#17138) entrypoint: avoid polluting stdout (elastic#17125) Fix acceptance test assertions for updated plugin remove (elastic#17126) Fix acceptance test assertions for updated plugin `remove` (elastic#17122) plugins: improve `remove` command to support multiple plugins (elastic#17030) spec: improve ls2ls spec (elastic#17114) allow concurrent Batch deserialization (elastic#17050) CPM handle 404 response gracefully with user-friendly log (elastic#17052) qa: use clean expansion of LS tarball per fixture instance (elastic#17082) Allow capturing heap dumps in DRA BK jobs (elastic#17081) Use centralized source of truth for active branches (elastic#17063) Update logstash_releases.json (elastic#17055) fix logstash-keystore to accept spaces in values when added via stdin (elastic#17039) Don't honor VERSION_QUALIFIER if set but empty (elastic#17032) Release note placeholder might be empty, making parsing lines nil tolerant. (elastic#17026) Fix BufferedTokenizer to properly resume after a buffer full condition respecting the encoding of the input string (elastic#16968) Add short living 9.0 next and update main in CI release version definition. (elastic#17008) Core version bump to 9.1.0 (elastic#16991) Add 9.0 branch to the CI branches definition (elastic#16997) ...





Release notes
[rn:skip]
What does this PR do?
routes output from setup-related bits in the entrypoint scripts to stderr, so that stdout can include only the output of the actual program.
Why is it important/What is the impact to the user?
This change makes it possible to use the stdout of entrypoints like
bin/logstash-pluginwithout the setup-related pollution:For example, with #17124 addition of
--no-expand, and given anallowlistcontaining the names of plugins to keep,The above is not possible if the stdout of
bin/logstash-plugininvocation is littered with info about the JVM.Checklist
[ ] 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 worksAuthor's Checklist
How to test this PR locally
observe that the side-channel bits are on STDERR and can be redirected away
Logs
With patch, the info about which java is being used is on STDERR:
Without patch, the info about which java is being used is on STDOUT: