-
Notifications
You must be signed in to change notification settings - Fork 25k
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 IndexTemplateMetaData to allow unknown fields #38448
Conversation
The IndexTemplateMetaData class used old parsing logic and was not resiliant to new fields. This commit updates it to use the ConstructingObjectParser and allow unknown fields. Relates elastic#36938
same results in hlrc response class.
Pinging @elastic/es-core-features |
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 but i wrote 1/2 the code so id like an independent set of 👓
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
I don't think this can go back to 6.7 , since if I read this correctly... it also removes support for the deprecated "template" field, which Logstash (and possibly others) still uses on 6.x. EDIT: this is client only code, so we don't need to add to deprecation info API |
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 for 7.x only
However, I would encourage a test that explicitly tests that "template" is no longer supported.
I just realized this is only for the client code (not server side), so no need to add to breaking changes for server. I am OK with the client being more aggressive here then the server w/r/t to support for the deprecated field. (A test here would help to communicate that too).
@martijnvg - if you merge this is 7.x, could you please log a follow up issue to remove support for "template" in the server side parsers, targeted at 8.0 ? |
@jakelandis The The logic that with the
Yes, I will open an issue for this. |
@martijnvg - I see now, I missed this part: " LGTM for 6.x too. |
Updated IndexTemplateMetaData to use ObjectParser. The IndexTemplateMetaData class used old parsing logic and was not resiliant to new fields. This commit updates it to use the ConstructingObjectParser and allow unknown fields. Relates elastic#36938 Co-authored-by: Michael Basnight <[email protected]> Co-authored-by: Martijn van Groningen <[email protected]>
Updated IndexTemplateMetaData to use ObjectParser. The IndexTemplateMetaData class used old parsing logic and was not resiliant to new fields. This commit updates it to use the ConstructingObjectParser and allow unknown fields. Relates #36938 Co-authored-by: Michael Basnight <[email protected]> Co-authored-by: Martijn van Groningen <[email protected]>
…on-leases-recovery * elastic/master: SQL: Allow look-ahead resolution of aliases for WHERE clause (elastic#38450) Add API key settings documentation (elastic#38490) Remove support for maxRetryTimeout from low-level REST client (elastic#38085) Update IndexTemplateMetaData to allow unknown fields (elastic#38448) Mute testRetentionLeasesSyncOnRecovery (elastic#38488) Change the min supported version to 6.7.0 for API keys (elastic#38481)
Update IndexTemplateMetaData to use ObjectParser
The IndexTemplateMetaData class used old parsing logic and was not
resiliant to new fields. This commit updates it to use the
ConstructingObjectParser and allow unknown fields.
Also a test was added that randomly generates a response that an ES node would returns and
this test verifies that HLRC can parse it. This gives us the test coverage and confidence that
new parsing code is working well.
Relates #36938