-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ZDT] Implement ModelVersion
polling mechanism
#154329
[ZDT] Implement ModelVersion
polling mechanism
#154329
Conversation
Pinging @elastic/kibana-core (Team:Core) |
ModelVersion
polling mechanism
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, with a few questions/comments.
We'll also eventually need some sort of documentation on the polling mechanism. A copy-paste of the code comments should be enough for now.
|
||
const POLL_INTERVAL_MS = 30_000; | ||
/** TODO: Is this the correct pattern? In this way we will also be matching indices after "the split" */ | ||
const KIBANA_SYSTEM_INDICES_PATTERN = '.kibana_*'; |
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 could match on a one-of or entries from a collection of patterns. EIther a map or, to keep it simple, an array of patterns.
}); | ||
} catch (e) { | ||
if ( | ||
e instanceof errors.ResponseError && |
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.
What's the risk of an intermittent proxy response? Should we also be checking the headers?
* (1) Run a request against Elasticsearch for Kibana system indices. For a | ||
* class of bad responses will retry up to 5 times with backoff. | ||
* (2) Build a model version map and emit this value | ||
* (3) Wait for `pollInterval` ms before repeating the process. |
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.
Do we poll indefinitely and, if so, is that to address the concern around potential rollbacks?
The original issue suggests only polling until "the index version matches the app version".
💔 Build FailedFailed CI StepsMetrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @jloleysens |
return await client.indices.getMapping({ | ||
index: KIBANA_SYSTEM_INDICES_PATTERN, | ||
expand_wildcards: 'hidden', | ||
}); |
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'd use filter_path
to only fetch the _meta
Since we are no longer doing this for MVP, we should probably close this |
No longer needed. |
Summary
Close #152809.
To reviewers
Observable
and a "get current" function