[Dashboards] Replace contentClient with getContentClient on DashboardStart server api#217586
Conversation
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
|
|
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/14388117195 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
…Start server api (elastic#217586) ## Summary Changes the DashboardStart server api to provide a getContentClient function. In elastic#214788, we set the `contentClient` returned from the content management register method after start lifecycle of all plugins. This means the `contentClient` returned from the `DashboardStart` contract was undefined. This PR changes the start contract to provide a getContentClient function instead. Only one consumer was using the contentClient from DashboardStart and this PR also updates that consumer. (cherry picked from commit 72d18d8) # Conflicts: # x-pack/solutions/observability/plugins/observability/server/routes/alerts/route.ts
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
1 similar comment
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
…hboardStart server api (#217586) (#217989) # Backport This will backport the following commits from `main` to `8.x`: - [[Dashboards] Replace contentClient with getContentClient on DashboardStart server api (#217586)](#217586) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nick Peihl","email":"nick.peihl@elastic.co"},"sourceCommit":{"committedDate":"2025-04-10T18:52:38Z","message":"[Dashboards] Replace contentClient with getContentClient on DashboardStart server api (#217586)\n\n## Summary\n\nChanges the DashboardStart server api to provide a getContentClient\nfunction.\n\nIn #214788, we set the\n`contentClient` returned from the content management register method\nafter start lifecycle of all plugins. This means the `contentClient`\nreturned from the `DashboardStart` contract was undefined. This PR\nchanges the start contract to provide a getContentClient function\ninstead.\n\nOnly one consumer was using the contentClient from DashboardStart and\nthis PR also updates that consumer.","sha":"72d18d8b992c99bb0be42123406453f0379f29d8","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","release_note:plugin_api_changes","Team:obs-ux-management","backport:version","v9.1.0","v8.19.0"],"title":"[Dashboards] Replace contentClient with getContentClient on DashboardStart server api","number":217586,"url":"https://github.com/elastic/kibana/pull/217586","mergeCommit":{"message":"[Dashboards] Replace contentClient with getContentClient on DashboardStart server api (#217586)\n\n## Summary\n\nChanges the DashboardStart server api to provide a getContentClient\nfunction.\n\nIn #214788, we set the\n`contentClient` returned from the content management register method\nafter start lifecycle of all plugins. This means the `contentClient`\nreturned from the `DashboardStart` contract was undefined. This PR\nchanges the start contract to provide a getContentClient function\ninstead.\n\nOnly one consumer was using the contentClient from DashboardStart and\nthis PR also updates that consumer.","sha":"72d18d8b992c99bb0be42123406453f0379f29d8"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217586","number":217586,"mergeCommit":{"message":"[Dashboards] Replace contentClient with getContentClient on DashboardStart server api (#217586)\n\n## Summary\n\nChanges the DashboardStart server api to provide a getContentClient\nfunction.\n\nIn #214788, we set the\n`contentClient` returned from the content management register method\nafter start lifecycle of all plugins. This means the `contentClient`\nreturned from the `DashboardStart` contract was undefined. This PR\nchanges the start contract to provide a getContentClient function\ninstead.\n\nOnly one consumer was using the contentClient from DashboardStart and\nthis PR also updates that consumer.","sha":"72d18d8b992c99bb0be42123406453f0379f29d8"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
|
@nickpeihl just out of curiosity, what is the |
|
@florent-leborgne In the context of this PR, we changed how our built-in plugins can access the CRUD client from the dashboard. It is probably not worth noting in our release notes as the changes should not impact external users. |
Summary
Changes the DashboardStart server api to provide a getContentClient function.
In #214788, we set the
contentClientreturned from the content management register method after start lifecycle of all plugins. This means thecontentClientreturned from theDashboardStartcontract was undefined. This PR changes the start contract to provide a getContentClient function instead.Only one consumer was using the contentClient from DashboardStart and this PR also updates that consumer.