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

Handle non-flat yaml settings for demo configuration detection #4793

Merged
merged 3 commits into from
Oct 8, 2024

Conversation

derek-ho
Copy link
Collaborator

@derek-ho derek-ho commented Oct 8, 2024

Description

Bug fix. Coming from: #4735, the demo config tool is not correctly detecting nested yaml for security settings when detecting whether the cluster already has security settings. This fixes it by using the SnakeYaml library to read and search for nested cases.

Issues Resolved

fix: 4735
Is this a backport? If so, please add backport PR # and/or commits #, and remove backport-failed label from the original PR.
No

Do these changes introduce new permission(s) to be displayed in the static dropdown on the front-end? If so, please open a draft PR in the security dashboards plugin and link the draft PR here
No

Testing

Existing tests pass, added a nested path test

Check List

  • New functionality includes testing
  • New functionality has been documented
  • New Roles/Permissions have a corresponding security dashboards plugin PR
  • API changes companion pull request created
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
@derek-ho derek-ho changed the title handle non-flat case Handle non-flat yaml settings for demo configuration detection Oct 8, 2024
Signed-off-by: Derek Ho <dxho@amazon.com>
@derek-ho derek-ho marked this pull request as ready for review October 8, 2024 17:58
@derek-ho derek-ho self-assigned this Oct 8, 2024
@derek-ho derek-ho added the backport 2.x backport to 2.x branch label Oct 8, 2024
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 67.98%. Comparing base (903b7b3) to head (0471b78).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...y/tools/democonfig/SecuritySettingsConfigurer.java 60.00% 3 Missing and 3 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4793      +/-   ##
==========================================
+ Coverage   67.95%   67.98%   +0.03%     
==========================================
  Files         310      310              
  Lines       20927    20938      +11     
  Branches     3322     3326       +4     
==========================================
+ Hits        14220    14235      +15     
+ Misses       4953     4948       -5     
- Partials     1754     1755       +1     
Files with missing lines Coverage Δ
...y/tools/democonfig/SecuritySettingsConfigurer.java 75.15% <60.00%> (-1.56%) ⬇️

... and 3 files with indirect coverage changes

@derek-ho derek-ho merged commit 5436146 into opensearch-project:main Oct 8, 2024
42 of 43 checks passed
@derek-ho derek-ho deleted the demo-bug branch October 8, 2024 19:37
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 8, 2024
Signed-off-by: Derek Ho <dxho@amazon.com>
(cherry picked from commit 5436146)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants