Skip to content
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

[Embeddable] Inject and extract library references in embeddable service #207139

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nickpeihl
Copy link
Member

Part of #192758

Summary

Moves inject and extract reference handling for library items from the Dashboard container to the embeddable persistable state service.

When loading a dashboard, the embeddable inject method now looks for by-reference panels in the references array and injects the references into the embeddable state.

When saving a dashboard, the embeddable extract method looks for a savedObjectId property in the embeddable state (indicating a by-reference panel) and extracts the saved object id into the references array.

@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 17, 2025

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!

@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 17, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #45 / Agent policies fleet_agent_policies POST /api/fleet/agent_policies/{agentPolicyId}/copy should work with package policy with space in name
  • [job] [logs] FTR Configs #45 / Agent policies fleet_agent_policies POST /api/fleet/agent_policies/{agentPolicyId}/copy should work with package policy with space in name
  • [job] [logs] FTR Configs #92 / apis saved_objects import with basic data existing should return 200 when conflicts exist but overwrite is passed in
  • [job] [logs] FTR Configs #92 / apis saved_objects import with basic data existing should return 200 when conflicts exist but overwrite is passed in
  • [job] [logs] Jest Tests #17 / dashboard 7.11.0 - embeddable persistable state extraction should migrate 7.3.0 doc and extract embeddable state
  • [job] [logs] Jest Tests #17 / dashboard 7.11.0 - embeddable persistable state extraction should migrate 7.3.0 doc and extract embeddable state
  • [job] [logs] Jest Tests #17 / dashboard 7.11.0 - embeddable persistable state extraction should migrate 7.3.0 doc without embeddable state to extract
  • [job] [logs] Jest Tests #17 / dashboard 7.11.0 - embeddable persistable state extraction should migrate 7.3.0 doc without embeddable state to extract
  • [job] [logs] FTR Configs #93 / dashboard Lens - Export import saved objects between versions should render all panels on the dashboard
  • [job] [logs] FTR Configs #93 / dashboard Lens - Export import saved objects between versions should render all panels on the dashboard
  • [job] [logs] FTR Configs #102 / dashboard Reporting Dashboard Reporting Screenshots Sample data from Kibana 7.6 "before all" hook for "PNG file matches the baseline image"
  • [job] [logs] FTR Configs #102 / dashboard Reporting Dashboard Reporting Screenshots Sample data from Kibana 7.6 "before all" hook for "PNG file matches the baseline image"
  • [job] [logs] FTR Configs #40 / EPM Endpoints EPM - get returns correct package info if it was installed by upload
  • [job] [logs] FTR Configs #40 / EPM Endpoints EPM - get returns correct package info if it was installed by upload
  • [job] [logs] Jest Tests #17 / extractReferences extracts references from panels
  • [job] [logs] Jest Tests #17 / extractReferences extracts references from panels
  • [job] [logs] FTR Configs #17 / Fleet Endpoints Output Endpoints fleet_outputs_crud PUT /outputs/{outputId} should bump all policies in all spaces if updating the default output
  • [job] [logs] FTR Configs #17 / Fleet Endpoints Output Endpoints fleet_outputs_crud PUT /outputs/{outputId} should bump all policies in all spaces if updating the default output
  • [job] [logs] Jest Tests #17 / inject/extract by reference panel should extract the saved object panel
  • [job] [logs] Jest Tests #17 / inject/extract by reference panel should extract the saved object panel
  • [job] [logs] Jest Tests #17 / inject/extract by reference panel should inject the extracted saved object panel
  • [job] [logs] Jest Tests #17 / inject/extract by reference panel should inject the extracted saved object panel
  • [job] [logs] Jest Tests #17 / injectReferences fails when it can't find the reference in the array
  • [job] [logs] Jest Tests #17 / injectReferences fails when it can't find the reference in the array
  • [job] [logs] Jest Tests #17 / injectReferences returns injected attributes
  • [job] [logs] Jest Tests #17 / injectReferences returns injected attributes
  • [job] [logs] Jest Tests #17 / injectReferences skips a panel when panelRefName is missing
  • [job] [logs] Jest Tests #17 / injectReferences skips a panel when panelRefName is missing
  • [job] [logs] FTR Configs #49 / Machine Learning modules module setup sets up module data for apache_ecs with prefix, startDatafeed true and estimateModelMemory true
  • [job] [logs] FTR Configs #49 / Machine Learning modules module setup sets up module data for apache_ecs with prefix, startDatafeed true and estimateModelMemory true
  • [job] [logs] FTR Configs #50 / maps app embeddable tooltip filter actions apply filter to current view "before all" hook for "should display create filter button when tooltip is locked"
  • [job] [logs] FTR Configs #50 / maps app embeddable tooltip filter actions apply filter to current view "before all" hook for "should display create filter button when tooltip is locked"
  • [job] [logs] FTR Configs #90 / Package policies Package Policy - create can only add to hosted agent policies using the force parameter
  • [job] [logs] FTR Configs #90 / Package policies Package Policy - create can only add to hosted agent policies using the force parameter
  • [job] [logs] FTR Configs #112 / Reporting APIs Job parameter validation printablePdfV2 allows width and height to have decimal
  • [job] [logs] FTR Configs #112 / Reporting APIs Job parameter validation printablePdfV2 allows width and height to have decimal
  • [job] [logs] FTR Configs #61 / Reporting Functional Tests with Security enabled Security with reporting_user built-in role Dashboard: Generate CSV report does not allow user that does not have reporting privileges
  • [job] [logs] FTR Configs #61 / Reporting Functional Tests with Security enabled Security with reporting_user built-in role Dashboard: Generate CSV report does not allow user that does not have reporting privileges
  • [job] [logs] FTR Configs #60 / saved objects tagging - functional tests dashboard integration "before all" hook in "dashboard integration"
  • [job] [logs] FTR Configs #60 / saved objects tagging - functional tests dashboard integration "before all" hook in "dashboard integration"

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
embeddable 84 85 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dashboard 624.1KB 623.7KB -484.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
embeddable 22.6KB 23.0KB +335.0B
Unknown metric groups

References to deprecated APIs

id before after diff
embeddable 5 3 -2

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants