remove sync register uiAction methods#254590
Conversation
|
/ci |
|
@elasticmachine merge upstream |
|
/ci |
|
@elasticmachine merge upstream |
|
/ci |
|
/ci |
| mapsEms: 6734 | ||
| metricsDataAccess: 44950 | ||
| ml: 89000 | ||
| ml: 103469 |
There was a problem hiding this comment.
ML plugin async imports actions registration. This hides the true size of the ML plugin since part of it is hidden behind this async import.
This PR moves actions registration into ML plugin page load bundle size, and thus increases the bundle size to better reflect the actual size.
|
/ci |
|
/ci |
|
/ci |
|
/ci |
|
/ci |
|
/ci |
This reverts commit 2c6a19f.
|
/ci |
|
/ci |
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
PhilippeOberti
left a comment
There was a problem hiding this comment.
Code review only, LGTM for the @elastic/security-threat-hunting-investigations team
| mapsEms: 6734 | ||
| metricsDataAccess: 44950 | ||
| ml: 89000 | ||
| ml: 102091 |
There was a problem hiding this comment.
Added a skill if you want to give it a try to reduce this. https://github.com/elastic/kibana/blob/main/.agents/skills/optimize-bundle-size/SKILL.md
/optimize-bundle-size pluginId=ml
davismcphee
left a comment
There was a problem hiding this comment.
Code-only review, Data Discovery changes LGTM 👍
|
|
||
| const { registerMlUiActions, registerSearchLinks, registerCasesAttachments } = | ||
| await import('./register_helper'); | ||
| if (fullLicense && mlCapabilities.canGetMlInfo) { |
There was a problem hiding this comment.
Are the changes in this file necessary?
I can't see any changes in behaviour when reverting them.
There was a problem hiding this comment.
The changes in this file move registerMlUiActions from being imported async to being imported sync. This ensures that ui actions are registered sync instead of registered async.
There was a problem hiding this comment.
But this is still happening after the license check and the call to getStartServices, so it is still async.
There was a problem hiding this comment.
thanks for pointing this out. I had not looked higher in the file and do see that all of these registrations are still inside an async function. At least this change removes one more await, with a network request, before registering actions - so its moving in the right direction. Completely fixing ML plugin registration is out of scope of this PR but it would be great if all registry items could be completed sync to avoid any timing issues.
| registerMlUiActions(pluginsSetup.uiActions, core); | ||
| } | ||
|
|
||
| const { registerSearchLinks, registerCasesAttachments } = await import( |
There was a problem hiding this comment.
This await import should be removed since loads an async file in plugin start, but that is out of scope for the PR.
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Async chunks
Page load bundle
History
|
* commit '11ed3645c5ededae2a6e29f2a79b31f52208b441': (157 commits) remove sync register uiAction methods (elastic#254590) [performance] Apply minimal auth to the search route (elastic#257497) [ES|QL] Reports correctly the controls server side errors (elastic#263020) [SecuritySolution][Navigation] Enable classic nav updates (elastic#262358) [Inference] Use pretty name and logo on feature settings page (elastic#262531) [Security Solution] fix AT-AB cypress test (elastic#262991) [SigEvents] Seed sigevents env script (elastic#261172) Adjust conditions for validating no refetch for expanded row (elastic#262978) [Agent Builder] update copy for the announcement modal (elastic#263034) [Search] Hide index management links for users without privileges (elastic#262627) Simplify OAS schema for GET `/api/spaces/space` query params (elastic#260831) Fix fleet output OAS regressions: SSL type explosion and Kafka union wrappers (elastic#260842) [Dashboards in chat] fix agent confusing the axes in a horizontal chat (elastic#263064) [One Workflow] Add alert state checkbox UI for workflow connector (elastic#259770) [One Workflow] Deprecate legacy Cases step types in workflow authoring (elastic#262070) skip failing test suite (elastic#248090) fix flaky test: MonitorDetails filter apply button not enabled (elastic#260788) fix: propagate AbortSignal to executeAsReasoningAgent for task cancellation (elastic#262811) [Security Solution][Alert KPI] Fix white space bug in alert KPIs (elastic#260803) [Streams] Move helpers and format_size_unit to utils folder (elastic#262550) ... # Conflicts: # x-pack/platform/plugins/shared/dashboard_agent/public/attachment_types/canvas_integration/dashboard_canvas_content.test.tsx # x-pack/platform/plugins/shared/dashboard_agent/public/attachment_types/canvas_integration/dashboard_canvas_content.tsx # x-pack/platform/plugins/shared/dashboard_agent/public/attachment_types/canvas_integration/use_register_canvas_action_buttons.ts # x-pack/platform/plugins/shared/dashboard_agent/public/attachment_types/index.test.tsx # x-pack/platform/plugins/shared/dashboard_agent/public/attachment_types/index.tsx
#205512 added 'async' registry methods. This PR completes this work and removes 'sync' registry methods and all remaining usages of 'sync ' methods.
async registries