qa: use clean expansion of LS tarball per fixture instance#17082
qa: use clean expansion of LS tarball per fixture instance#17082yaauie merged 2 commits intoelastic:mainfrom
Conversation
Because QA tests can _modify_ the Logstash installation (e.g. those that invoke the plugin manager), it is important that the service wrapper begins with a clean expansion of the logstash tarball.
The I'll need to re-work that test, or accommodate it somehow. |
| @fixture.teardown | ||
| } | ||
|
|
||
| def change_logstash_setting(logstash_service, name, value) |
There was a problem hiding this comment.
This stomps on the existing config in the logstash installation under test, which is shared across multiple tests and may contain useful bits in the event of feature flags.
Since it is only ever used to set the api.http.port in advance of spawning the logstash process, we can simply use the equivalent --api.http.port command-line flag and avoid modifying the logstash config.
|
| end | ||
|
|
||
| def run_logstash_instance(config_name, options = {}) | ||
| api_port = 9600 + rand(1000) |
There was a problem hiding this comment.
random allocation means occasional collisions.
I've elected to keep track of an offset in a range of 1000, looping back to 0 if we ever have enough tests to do so.
💚 Build Succeeded
History
|
|
@logstashmachine backport 8.x |
|
@logstashmachine backport 8.18 |
* qa: use clean expansion of LS tarball per fixture instance Because QA tests can _modify_ the Logstash installation (e.g. those that invoke the plugin manager), it is important that the service wrapper begins with a clean expansion of the logstash tarball. * qa: enable safe reuse of ls_home in ls_to_ls tests (cherry picked from commit d20eb4d)
* qa: use clean expansion of LS tarball per fixture instance Because QA tests can _modify_ the Logstash installation (e.g. those that invoke the plugin manager), it is important that the service wrapper begins with a clean expansion of the logstash tarball. * qa: enable safe reuse of ls_home in ls_to_ls tests (cherry picked from commit d20eb4d)
…17094) * qa: use clean expansion of LS tarball per fixture instance Because QA tests can _modify_ the Logstash installation (e.g. those that invoke the plugin manager), it is important that the service wrapper begins with a clean expansion of the logstash tarball. * qa: enable safe reuse of ls_home in ls_to_ls tests (cherry picked from commit d20eb4d) Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
…17095) * qa: use clean expansion of LS tarball per fixture instance Because QA tests can _modify_ the Logstash installation (e.g. those that invoke the plugin manager), it is important that the service wrapper begins with a clean expansion of the logstash tarball. * qa: enable safe reuse of ls_home in ls_to_ls tests (cherry picked from commit d20eb4d) Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
|
@logstashmachine backport 9.0 |
* qa: use clean expansion of LS tarball per fixture instance Because QA tests can _modify_ the Logstash installation (e.g. those that invoke the plugin manager), it is important that the service wrapper begins with a clean expansion of the logstash tarball. * qa: enable safe reuse of ls_home in ls_to_ls tests (cherry picked from commit d20eb4d)
…17113) * qa: use clean expansion of LS tarball per fixture instance Because QA tests can _modify_ the Logstash installation (e.g. those that invoke the plugin manager), it is important that the service wrapper begins with a clean expansion of the logstash tarball. * qa: enable safe reuse of ls_home in ls_to_ls tests (cherry picked from commit d20eb4d) Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
…7082) * qa: use clean expansion of LS tarball per fixture instance Because QA tests can _modify_ the Logstash installation (e.g. those that invoke the plugin manager), it is important that the service wrapper begins with a clean expansion of the logstash tarball. * qa: enable safe reuse of ls_home in ls_to_ls tests
…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?
Ensures that Logstash integration tests are run against a clean expansion of the built tarball.
Why is it important/What is the impact to the user?
Because QA tests can modify the Logstash installation (e.g. those that invoke the plugin manager), it is important that the service wrapper begins with a clean expansion of the logstash tarball.
Checklist
[ ] 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 worksHow to test this PR locally
Run integration tests that invoke the Logstash service (or any of its sub-command features like the plugin manager):
Logs
see
expunging, indicating that the old was removedsee
expanding, indicating a fresh expansionsee
Using...as LS_HOME, indicating that the fresh expansion is being used