-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[ILM] Delete index_codec option if disabled in UI #87267
[ILM] Delete index_codec option if disabled in UI #87267
Conversation
@@ -65,6 +65,8 @@ export const createSerializer = (originalPolicy?: SerializedPolicy) => ( | |||
delete hotPhaseActions.forcemerge; | |||
} else if (_meta.hot.bestCompression) { | |||
hotPhaseActions.forcemerge!.index_codec = 'best_compression'; | |||
} else { | |||
delete hotPhaseActions.forcemerge!.index_codec; | |||
} | |||
|
|||
if (_meta.hot.bestCompression && hotPhaseActions.forcemerge) { |
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.
I wasn't sure how to test this logic in the UI and if there's any additional changes required here too.
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, it is a bit more tricky to fully test in the UI since we have to interact with the component and submit the form to catch the network request that would have been made and then make assertions against that payload. Kind of like this
Line 119 in b99ca96
test('setting all values', async () => { |
In this case I guess we'd make a policy that has this enabled, submit a request, check that it is there, then disable and send the request again. Although that might require wrestling with any routing that happens too.
For now, I think having a unit test for the serialisation is good, since we know the toggle can actually set the value. The trickier (more bug prone) part of the serialiser is removing values that have been unset.
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
Great work @alisonelizabeth ! Tested locally and removing codec works.
💚 Build SucceededMetrics [docs]Async chunks
Distributable file count
History
To update your PR or re-run it, just comment with: |
Fixes #87219
I could not reproduce on
7.10
, so I think this was introduced at some point during the7.11
release cycle, possibly from #83077.How to test: