-
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
[Canvas] Migrate by value embeddables #123515
Conversation
3138b60
to
eac4c36
Compare
Pinging @elastic/kibana-presentation (Team:Presentation) |
ff23ebd
to
1c822a6
Compare
1951328
to
8cde82f
Compare
@elasticmachine merge upstream |
expected head sha didn’t match current head ref. |
Check for id in embeddable input Removed unused import Fixed tests Fix variable name Move migration into embeddable function definition Remove unused code
6cd9e27
to
7468446
Compare
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.
One little question but other than that looks and works good for me 👍
(state: ExpressionAstFunction): ExpressionAstFunction => { | ||
const embeddableInput = decode(state.arguments.config[0] as string); | ||
|
||
if (embeddableInput.attributes || embeddableInput.savedVis) { |
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 need for this check? Is there a reason we wouldn't want to always run the input through the migration function?
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 think we only need to handle by-value embeddable on our end since migration for the saved objects that back the by-reference embeddables is handled elsewhere, so it might be duplicating work. But I can remove the check. It's possible that the embeddable input stored in the expression for by-reference embeddables could have attributes that need to be migrated, so it probably doesn't hurt to run all of them through the embedddable migrations.
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
* Add migrations for by value embeddables Check for id in embeddable input Removed unused import Fixed tests Fix variable name Move migration into embeddable function definition Remove unused code * Cleanup * Fix embeddable test * Remove check for by-value embeddables in embeddable function migration * Removed unused import Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 8e8c4b8)
* Add migrations for by value embeddables Check for id in embeddable input Removed unused import Fixed tests Fix variable name Move migration into embeddable function definition Remove unused code * Cleanup * Fix embeddable test * Remove check for by-value embeddables in embeddable function migration * Removed unused import Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 8e8c4b8)
Summary
Closes #101639.
This runs all of the by-value embeddables on a Canvas workpad through the embeddable migrations.
Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers