-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Resolve date math expressions before looking up index metadata #75314
Resolve date math expressions before looking up index metadata #75314
Conversation
Pinging @elastic/es-core-features (Team:Core/Features) |
|
||
// index name matches with IDM: | ||
IndexRequest indexRequest = new IndexRequest("<idx-{now/d}>"); | ||
boolean result = IngestService.resolvePipelines(indexRequest, indexRequest, metadata); |
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 believe this will very rarely fail when the first call to System.currentTimeMillis()
on line 1382 is called on one day, then this is called on the next day (across the day delineation I mean).
Is it worth adding a parameter that allows overriding the time used when resolving for this test? (I only say since we've had failures related to this with data streams and dates in index names)
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.
Yep, worth it. Added in b934eb4
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, thanks Dan!
Thanks, @dakrone! |
This is somewhat similar to #69727 except that in this case, the final pipeline is set directly on an existing index rather than in a template. The root cause of the issue was looking for the ingest pipelines on index metadata before resolving any date math expressions in the index name.
Fixes #75047