-
Notifications
You must be signed in to change notification settings - Fork 24.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
Use different file-based settings error message for invalid JSON and NotMasterException #116359
Merged
Conversation
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
Pinging @elastic/es-core-infra (Team:Core/Infra) |
prdoyle
changed the title
Use different file-based settings error message for invalid JSON
Use different file-based settings error message for invalid JSON and NotMasterException
Nov 6, 2024
n1v0lg
reviewed
Nov 7, 2024
server/src/main/java/org/elasticsearch/common/file/AbstractFileWatchingService.java
Show resolved
Hide resolved
n1v0lg
reviewed
Nov 7, 2024
server/src/main/java/org/elasticsearch/common/file/AbstractFileWatchingService.java
Show resolved
Hide resolved
n1v0lg
reviewed
Nov 7, 2024
server/src/test/java/org/elasticsearch/reservedstate/service/FileSettingsServiceTests.java
Show resolved
Hide resolved
n1v0lg
reviewed
Nov 7, 2024
server/src/test/java/org/elasticsearch/reservedstate/service/FileSettingsServiceTests.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Nikolaj Volgushev <n1v0lg@users.noreply.github.com>
Oh boy. There's a failure in this test here, but it passes for me. I seem to have created a flaky test. |
n1v0lg
approved these changes
Nov 8, 2024
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.
LGTM 👍
jozala
pushed a commit
that referenced
this pull request
Nov 13, 2024
…NotMasterException (#116359) * Fixup: remove unused pattern variable from before * Try1 handle XContentParseException * Mocks wrap XContentParseException in ExecutionException like the real code does * onProcessFileChangesException case for XContentParseException * Handle NotMasterException while we're at it. * Cleanup * Use Nikolaj's addFileChangedListener approach to test * Add REPLACE_EXISTING * Remove ATOMIC_MOVE Co-authored-by: Nikolaj Volgushev <n1v0lg@users.noreply.github.com> * Delete stray generated files * Remove unused method --------- Co-authored-by: Nikolaj Volgushev <n1v0lg@users.noreply.github.com>
afoucret
pushed a commit
to afoucret/elasticsearch
that referenced
this pull request
Nov 14, 2024
…NotMasterException (elastic#116359) * Fixup: remove unused pattern variable from before * Try1 handle XContentParseException * Mocks wrap XContentParseException in ExecutionException like the real code does * onProcessFileChangesException case for XContentParseException * Handle NotMasterException while we're at it. * Cleanup * Use Nikolaj's addFileChangedListener approach to test * Add REPLACE_EXISTING * Remove ATOMIC_MOVE Co-authored-by: Nikolaj Volgushev <n1v0lg@users.noreply.github.com> * Delete stray generated files * Remove unused method --------- Co-authored-by: Nikolaj Volgushev <n1v0lg@users.noreply.github.com>
alexey-ivanov-es
pushed a commit
to alexey-ivanov-es/elasticsearch
that referenced
this pull request
Nov 28, 2024
…NotMasterException (elastic#116359) * Fixup: remove unused pattern variable from before * Try1 handle XContentParseException * Mocks wrap XContentParseException in ExecutionException like the real code does * onProcessFileChangesException case for XContentParseException * Handle NotMasterException while we're at it. * Cleanup * Use Nikolaj's addFileChangedListener approach to test * Add REPLACE_EXISTING * Remove ATOMIC_MOVE Co-authored-by: Nikolaj Volgushev <n1v0lg@users.noreply.github.com> * Delete stray generated files * Remove unused method --------- Co-authored-by: Nikolaj Volgushev <n1v0lg@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Core/Infra/Core
Core issues without another label
>non-issue
Team:Core/Infra
Meta label for core/infra team
test-windows
Trigger CI checks on Windows
v9.0.0
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.
This peels off two error cases: one for
XContentException
and one forNotMasterException
.Note that the supplied unit test is exercising the invalid-JSON case but is not checking the error message text, so it would pass even without this change.