-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Added new Setting property UnmodifiableOnRestore
to prevent updating settings on restore snapshot
#16957
Open
anntians
wants to merge
15
commits into
opensearch-project:main
Choose a base branch
from
anntians:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+349
−25
Open
Added new Setting property UnmodifiableOnRestore
to prevent updating settings on restore snapshot
#16957
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
457898a
Add index.knn setting to list of unmodifiable settings when restore s…
5f70915
Add index.knn setting to list of unmodifiable settings when restore s…
736696c
Merge branch 'main' of github.com:anntians/OpenSearch
4a659c0
Merge branch 'main' into main
anntians f33c9bc
Merge branch 'main' into main
anntians f9c06e8
Add new Setting property UnmodifiableOnRestore to mark setting as imm…
1227bbb
Merge branch 'main' into main
anntians 2afd94e
Add tests for new Setting property UnmodifiableOnRestore
c29a0db
Merge branch 'main' into main
anntians a24b673
fixes and added more tests for new setting property UnmodifiableOnRes…
252100c
fix test failures
e860499
Revert "fix test failures"
6dc9840
fixes by adding back USER_UNMODIFIABLE_SETTINGS for settings without …
e517731
Merge branch 'main' into main
anntians 9ebab5a
testing CI config for registering plugin settings
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can we add some more test scenarios here? Off the top of my head:
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.
Sure thing.
For the test cases below:
The existing behavior is that restore api will still throw a
cannot modify
error even if the setting has the same value. As long as there is a setting tagged asunmodifiable
, restore will throw. I think it's more clean this way to not allow any unmodifiable settings in the request, to avoid unnecessary confusion for customers. Instead of including the same value as part of the request, just remove that setting from the request. I assume we would want to maintain that existing behavior?For this test case, the existing behavior is that even if one of the settings in the restore request is unmodifiable, then restore will throw. I think it makes sense or else customers might think all the setting updates executed when some didn't. I assume we would want to maintain this behavior?
Thanks
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.
Yeah, as a general rule of thumb we want to maintain the existing behavior (and that's why we're adding tests)