-
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
[Transforms] fix bug when unsetting retention policy #87711
[Transforms] fix bug when unsetting retention policy #87711
Conversation
Pinging @elastic/ml-core (Team:ML) |
Hi @benwtrent, I've created a changelog YAML for you. |
@@ -534,6 +535,11 @@ public List<NamedWriteableRegistry.Entry> getNamedWriteables() { | |||
TransformField.TIME.getPreferredName(), | |||
TimeRetentionPolicyConfig::new | |||
), | |||
new NamedWriteableRegistry.Entry( |
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.
TransformNamedXContentProvider
is also missing the NullRetentionPolicyConfig
named writable
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.
@davidkyle it isn't required. This thing is never written to XContent. But I can add it for completeness.
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.
Please do I think it is worth having to avoid a similar problem in future
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
It is currently not possible to unset the retention policy in a typical multi-node cluster. This commit fixes that bug. If unsetting the retention policy failed, it would fail looking like the following error: ``` An error occurred calling the API endpoint to update transforms. Bad Request: [illegal_argument_exception: [illegal_argument_exception] Reason: Unknown NamedWriteable [org.elasticsearch.xpack.core.transform.transforms.RetentionPolicyConfig][null_retention_policy]]: Unknown NamedWriteable [org.elasticsearch.xpack.core.transform.transforms.RetentionPolicyConfig][null_retention_policy] ``` closes: elastic#87688
It is currently not possible to unset the retention policy in a typical multi-node cluster. This commit fixes that bug. If unsetting the retention policy failed, it would fail looking like the following error: ``` An error occurred calling the API endpoint to update transforms. Bad Request: [illegal_argument_exception: [illegal_argument_exception] Reason: Unknown NamedWriteable [org.elasticsearch.xpack.core.transform.transforms.RetentionPolicyConfig][null_retention_policy]]: Unknown NamedWriteable [org.elasticsearch.xpack.core.transform.transforms.RetentionPolicyConfig][null_retention_policy] ``` closes: elastic#87688
It is currently not possible to unset the retention policy in a typical multi-node cluster. This commit fixes that bug. If unsetting the retention policy failed, it would fail looking like the following error: ``` An error occurred calling the API endpoint to update transforms. Bad Request: [illegal_argument_exception: [illegal_argument_exception] Reason: Unknown NamedWriteable [org.elasticsearch.xpack.core.transform.transforms.RetentionPolicyConfig][null_retention_policy]]: Unknown NamedWriteable [org.elasticsearch.xpack.core.transform.transforms.RetentionPolicyConfig][null_retention_policy] ``` closes: #87688
It is currently not possible to unset the retention policy in a typical multi-node cluster. This commit fixes that bug. If unsetting the retention policy failed, it would fail looking like the following error: ``` An error occurred calling the API endpoint to update transforms. Bad Request: [illegal_argument_exception: [illegal_argument_exception] Reason: Unknown NamedWriteable [org.elasticsearch.xpack.core.transform.transforms.RetentionPolicyConfig][null_retention_policy]]: Unknown NamedWriteable [org.elasticsearch.xpack.core.transform.transforms.RetentionPolicyConfig][null_retention_policy] ``` closes: #87688
It is currently not possible to unset the retention policy in a typical multi-node cluster.
This commit fixes that bug. If unsetting the retention policy failed, it would fail looking like the following error:
closes: #87688