-
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
Script: Rename TIMESTAMP constant NOW in Metadata #88870
Conversation
The value is `_now` and there was a previous metadata value `_timestamp` (see test removal in elastic#88733) so the name is confusing. Also renames the method `getTimestamp()` to `getNow()` to reflect the change.
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.
The rename seems good, but I think we need to provide backcompat in scripts.
@@ -35,7 +35,7 @@ class org.elasticsearch.script.Metadata { | |||
String getVersionType() | |||
void setVersionType(String) | |||
|
|||
ZonedDateTime getTimestamp() |
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.
We need to provide backcompat for existing scripts. It could be done through an augmentation so it is isolated to just scripts.
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.
Is that the case for Metadata? It's in 8.4 but not documented or supported.
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.
Well, 8.4 has just been branched. So I guess this could change, but it will need to go back to that branch (it should be fine, since it was literally just branched today).
Pinging @elastic/es-core-infra (Team:Core/Infra) |
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
The value is `_now` and there was a previous metadata value `_timestamp` (see test removal in elastic#88733) so the name is confusing. Also renames the method `getTimestamp()` to `getNow()` to reflect the change.
💚 Backport successful
|
The value is
_now
and there was a previous metadatavalue
_timestamp
(see test removal in #88733) so thename is confusing.
Also renames the method
getTimestamp()
togetNow()
to reflect the change.