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

Fix the Bootstrap check test failure on Windows. #15975

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

mashhurs
Copy link
Contributor

@mashhurs mashhurs commented Feb 23, 2024

Release notes

[rn:skip]

What does this PR do?

Fixes the Bootstrap check test failure on Windows.

  • Tech details:
    • We have a matrix CI to run Java & Ruby tests together and it doesn't face error. Based on my investigation, it seems ruby test especially Bootstrap check never runs.
    • I have downloaded .\gradlew clean test --console=plain --no-daemon --no-build-cache --info result which I believe same as .\ci\unit_tests.ps1 or ./gradle.bat test
    • ruby-tests-report-and-test-results.zip

Why is it important/What is the impact to the user?

Non-user facing change.

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

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Logs

  • On Windows before fix
1) LogStash::ConfigManagement::BootstrapCheck when `xpack.management.enabled` is `TRUE` when `path.config` is given when a configuration file exists in the specified location raises a `LogStash::BootstrapCheckError` error
--
  | Failure/Error: expect { subject.check(settings) }.to raise_error LogStash::BootstrapCheckError
  | expected LogStash::BootstrapCheckError but nothing was raised
  | # ./spec/config_management/bootstrap_check_spec.rb:125:in `block in <main>'
  | # A:/vendor/bundle/jruby/3.1.0/gems/rspec-wait-0.0.9/lib/rspec/wait.rb:46:in `block in <main>'
  | # A:/vendor/bundle/jruby/3.1.0/gems/logstash-devutils-2.6.2-java/lib/logstash/devutils/rspec/spec_helper.rb:47:in `block in <main>'
  | # A:\lib\bootstrap\rspec.rb:36:in `<main>
  • On Windows after fix
 when `path.config` is given
          when a configuration file exists in the specified location
    [2024-02-23T21:58:05,525][ERROR][logstash.configmanagement.bootstrapcheck] There are config files (1) in the 'C:/Users/BUILDK~1/AppData/Local/Temp/2/studtmp-3841f1a94c21cea4812b7fa428be13a99507064ffafdab362ea00510d4e7' folder. Elasticsearch is configured as the config store so configs cannot be sourced via the command line with -f or via logstash.yml with path.config
            raises a `LogStash::BootstrapCheckError` error
  • On MacOS before/after
when `path.config` is given
          when a configuration file exists in the specified location
    [2024-02-23T13:20:05,705][ERROR][logstash.configmanagement.bootstrapcheck] There are config files (1) in the '/var/folders/kg/85jzp1jx2g36_h9nth_7b_cr0000gn/T/studtmp-d02f86713ac58bef81de437f998518ea42191dec39bec15794e408a9df4b' folder. Elasticsearch is configured as the config store so configs cannot be sourced via the command line with -f or via logstash.yml with path.config
            raises a `LogStash::BootstrapCheckError` error

Copy link

Quality Gate passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No Coverage information No data about Coverage
No Duplication information No data about Duplication

See analysis details on SonarQube

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @mashhurs

Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

I tested this, by merging your PR to my open PR that implements the job split in Buildkite and after triggering a new Windows job everything passed: https://buildkite.com/elastic/logstash-windows-jdk-matrix-pipeline/builds/123#_

@dliappis
Copy link
Contributor

dliappis commented Mar 6, 2024

Note that this will need to be backported, if we intended to backport the Buildkite job split in #15888 to older branches.

@mashhurs mashhurs merged commit 1963714 into elastic:main Mar 6, 2024
5 checks passed
@mashhurs
Copy link
Contributor Author

mashhurs commented Mar 6, 2024

Note that this will need to be backported, if we intended to backport the Buildkite job split in #15888 to older branches.

Feel free to backport to the branches you are considering to split.

@dliappis
Copy link
Contributor

@logstashmachine backport 8.13

@dliappis
Copy link
Contributor

@logstashmachine backport 8.12

@dliappis
Copy link
Contributor

@logstashmachine backport 7.17

github-actions bot pushed a commit that referenced this pull request Mar 11, 2024
dliappis pushed a commit that referenced this pull request Mar 11, 2024
dliappis pushed a commit that referenced this pull request Mar 11, 2024
dliappis pushed a commit that referenced this pull request Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants