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

Use different file-based settings error message for invalid JSON and NotMasterException #116359

Merged
merged 13 commits into from
Nov 8, 2024

Conversation

prdoyle
Copy link
Contributor

@prdoyle prdoyle commented Nov 6, 2024

This peels off two error cases: one for XContentException and one for NotMasterException.

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.

@prdoyle prdoyle added >non-issue :Core/Infra/Core Core issues without another label labels Nov 6, 2024
@prdoyle prdoyle marked this pull request as ready for review November 6, 2024 20:37
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Nov 6, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@prdoyle 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
@prdoyle prdoyle requested a review from a team as a code owner November 7, 2024 14:55
Co-authored-by: Nikolaj Volgushev <n1v0lg@users.noreply.github.com>
@prdoyle prdoyle added the test-windows Trigger CI checks on Windows label Nov 7, 2024
@prdoyle
Copy link
Contributor Author

prdoyle commented Nov 7, 2024

Oh boy. There's a failure in this test here, but it passes for me. I seem to have created a flaky test.

@prdoyle
Copy link
Contributor Author

prdoyle commented Nov 8, 2024

That test ^ ran against 407c9f6, so not relevant.

There's another failure here but it seems unrelated. I'm re-running it here.

@prdoyle prdoyle enabled auto-merge (squash) November 8, 2024 16:13
Copy link
Contributor

@n1v0lg n1v0lg left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@prdoyle prdoyle merged commit 2acd164 into elastic:main Nov 8, 2024
21 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants