Skip to content

Backport PR #17082 to 8.18: qa: use clean expansion of LS tarball per fixture instance#17095

Merged
yaauie merged 1 commit into8.18from
backport_17082_8.18
Feb 14, 2025
Merged

Backport PR #17082 to 8.18: qa: use clean expansion of LS tarball per fixture instance#17095
yaauie merged 1 commit into8.18from
backport_17082_8.18

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Backport PR #17082 to 8.18 branch, original message:


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

  • 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

How to test this PR locally

Run integration tests that invoke the Logstash service (or any of its sub-command features like the plugin manager):

ci/integration_tests.sh specs/cli/remove_spec.rb

Logs

see expunging, indicating that the old was removed
see expanding, indicating a fresh expansion
see Using...as LS_HOME, indicating that the fresh expansion is being used

    CLI > logstash-plugin remove
    expunging(/Users/rye/src/elastic/logstash@main/build/qa-fixture/logstash-9.1.0-SNAPSHOT)
    expanding(/Users/rye/src/elastic/logstash@main/build/logstash-9.1.0-SNAPSHOT.tar.gz)
    Using /Users/rye/src/elastic/logstash@main/build/qa-fixture/logstash-9.1.0-SNAPSHOT as LS_HOME
    Setting up services
    Setting up logstash service
    Setup script not found for logstash
    logstash service setup complete
      when other plugins depends on this plugin
        refuses to remove the plugin and display the plugin that depends on it.
      when no other plugins depends on this plugin
        successfully remove the plugin

    Finished in 2 minutes 0.2 seconds (files took 0.98941 seconds to load)
    2 examples, 0 failures

* 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)
@elastic-sonarqube
Copy link
Copy Markdown

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

@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

Copy link
Copy Markdown
Member

@yaauie yaauie left a comment

Choose a reason for hiding this comment

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

clean & green ✅

@yaauie yaauie merged commit d934419 into 8.18 Feb 14, 2025
@yaauie yaauie deleted the backport_17082_8.18 branch February 14, 2025 17:53
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.

2 participants