[Dashboards as Code] Provide embeddable service for migration#222059
Merged
nickpeihl merged 3 commits intoelastic:dashboardApi/embeddableIntegrationfrom May 30, 2025
Merged
Conversation
Also, logs a warning instead of throwing if migration fails.
nickpeihl
commented
May 30, 2025
| '7.3.0': flow(migrations730), | ||
| '7.9.3': flow(migrateMatchAllQuery), | ||
| '7.11.0': flow(createExtractPanelReferencesMigration(deps)), | ||
| '7.11.0': createExtractPanelReferencesMigration(), |
Contributor
Author
There was a problem hiding this comment.
This needs to return an object instead of a function for the deferred migration.
Zacqary
approved these changes
May 30, 2025
Contributor
Zacqary
left a comment
There was a problem hiding this comment.
Seems like a more robust solution, LGTM
ThomThomson
reviewed
May 30, 2025
Contributor
ThomThomson
left a comment
There was a problem hiding this comment.
The deferred flag is a nice clean solution! I know the core team isn't a big fan of stateful-static code, so I think it might not be great to introduce it on the serverside. Instead of kibana_server_services, could you put the embeddable start inside the dashboard server plugin class, and use a getter function in the migration?
| * All other references like index-patterns are forwarded non touched | ||
| * @param deps | ||
| * | ||
| * This migration uses the deferred flag on {@link SavedObjectMigrationParams | SavedObjectMigrationParams} which means the |
Contributor
There was a problem hiding this comment.
Nice, this is a way cleaner solution.
Contributor
💔 Build Failed
Failed CI StepsHistory
|
5da8aa6
into
elastic:dashboardApi/embeddableIntegration
9 of 10 checks passed
nickpeihl
added a commit
to nickpeihl/kibana
that referenced
this pull request
Jun 4, 2025
…c#222059) Adds a `startServices` method for the dashboard server to provide the embeddable service that can be used in the migration to correctly extract references. This also logs a warning instead of throwing if the migration fails. Here is an example dashboard saved object that triggers the migration on import. [7.8.0-dashboard.ndjson.zip](https://github.com/user-attachments/files/20521831/7.8.0-dashboard.ndjson.zip) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
nickpeihl
added a commit
to nickpeihl/kibana
that referenced
this pull request
Jun 5, 2025
…c#222059) Adds a `startServices` method for the dashboard server to provide the embeddable service that can be used in the migration to correctly extract references. This also logs a warning instead of throwing if the migration fails. Here is an example dashboard saved object that triggers the migration on import. [7.8.0-dashboard.ndjson.zip](https://github.com/user-attachments/files/20521831/7.8.0-dashboard.ndjson.zip) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Provides a getter method on dashboard server to provide the EmbeddableStart service that can be used in the migration to correctly extract references.
This also logs a warning instead of throwing if the migration fails.
Here is an example dashboard saved object that triggers the migration on import.
7.8.0-dashboard.ndjson.zip