-
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
Update Rest status for DecommissioningFailedException #5283
Merged
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9617ccd
Update Rest status for DecommissioningFailedException
imRishN adb4e55
Merge remote-tracking branch 'upstream/main' into fix-response-code
imRishN 2592f88
Add tests for decommission response code
imRishN 19e24a8
Remove unnecessary test change
imRishN eb35a3d
Fix spotless check
imRishN 7e7aa43
Merge remote-tracking branch 'upstream/main' into fix-response-code
imRishN 10fc0c4
Fix
imRishN 1ff5063
Add changelog
imRishN f9fc976
Merge branch 'main' into fix-response-code
imRishN 2026ce4
Merge remote-tracking branch 'upstream/main' into fix-response-code
imRishN 6fc8773
Update changelog
imRishN 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
Next
Next commit
Update Rest status for DecommissioningFailedException
Signed-off-by: Rishab Nahata <rnnahata@amazon.com>
- Loading branch information
commit 9617ccd554693d808e73ec0c0de9f3d3aefa014d
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
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.
Here https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/cluster/decommission/DecommissionService.java#L271 it seems its not a bad request due to which the exception is thrown. Should we use a different exception over here?
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.
Hmm right. Will fix this in #5093 PR and would rather throw
NodeClosedException
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.
Lets break down to use specific exceptions and use 400/403 as needed in those relevant cases
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.
This PR just attempts to change the status code for
DecommissioningFailedException
and here we are making it 400. Once case which Anshu mentioned where we could rather throwNodeClosedException
will be fixed in a subsequent PR.