-
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
Fixed usage of isReady
for usage collection of alerts and actions
#83760
Fixed usage of isReady
for usage collection of alerts and actions
#83760
Conversation
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
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 left a few notes about RX usage and inlining the isReady
to avoid an intermediary variable.
I'll try and validate my theory about the task potentially stalling, but in either case, we don't want the task to wait on a fresh config every time, so that should be addressed.
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
💛 Build succeeded, but was flaky
Test FailuresChrome X-Pack UI Functional Tests.x-pack/test/functional/apps/dashboard/drilldowns/dashboard_to_url_drilldown·ts.dashboard drilldowns Dashboard to URL drilldown should create dashboard to URL drilldown and use it to navigate to discoverStandard Out
Stack Trace
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
…lastic#83760) * Fixed usage of `isReady` for usage collection of alerts and actions * fixed index * fixed due to comments * fixed type check * fixed due to comments
* master: (67 commits) [Observability] Load hasData call asynchronously (elastic#80644) Implement AnonymousAuthenticationProvider. (elastic#79985) Deprecate `visualization:colorMapping` advanced setting (elastic#83372) [TSVB] [Rollup] Table tab not working with rollup indexes (elastic#83635) Revert "[Search] Search batching using bfetch (elastic#83418)" (elastic#84037) skip flaky suite (elastic#83772) skip flaky suite (elastic#69849) create kbn-legacy-logging package (elastic#77678) [Search] Search batching using bfetch (elastic#83418) [Security Solution] Refactor Timeline flyout to take a full page (elastic#82033) Drop use of console-stamp (elastic#83922) skip flaky suite (elastic#84011 , elastic#84012) Fixed usage of `isReady` for usage collection of alerts and actions (elastic#83760) [maps] support URL drilldowns (elastic#83732) Revert "Added default dedupKey value as an {{alertInstanceId}} to provide grouping functionality for PagerDuty incidents. (elastic#83226)" [code coverage] Update jest config to collect more data (elastic#83804) Added default dedupKey value as an {{alertInstanceId}} to provide grouping functionality for PagerDuty incidents. (elastic#83226) [Security Solution] Give notice when endpoint policy is out of date (elastic#83469) [Security Solution] Sync url state on any changes to query string (elastic#83314) [CI] Initial TeamCity implementation (elastic#81043) ...
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.
Left a question whether the this.kibanaIndexConfig.subscribe()
will end up calling the subscriber > 1 times.
'actions', | ||
this.createRouteHandlerContext(core, await this.kibanaIndex) | ||
); | ||
this.kibanaIndexConfig.subscribe((config) => { |
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 noticed that for other uses, we actually only deal with the "first" update of kibanaIndexConfig
via kibanaIndexConfig.pipe(first()).toPromise()
, but not here.
So it seems like if this.kibanaIndexConfig
emits > 1 times per Kibana startup, we'd try to register the routes > 1 times. The same pattern is used in alerts.
Thinking perhaps we should just set kibanaIndexConfig
to the following, for consistency, then we can remove the other pipe(first())
usages. Or perhaps I'm missing something.
initContext.config.legacy.globalConfig$.pipe(first())
Current PR includes the changes which make the requirement for actions and alerts collectors to set isReady as true only when the TaskManager plugin will be ready.
Changed alerts plugin setup method to be a synchronous.
Resolve #82947