Skip to content

[canvas] fix unable to load embeddable when no references are provided#257779

Merged
ThomThomson merged 5 commits intoelastic:mainfrom
nreese:issue_257772
Mar 18, 2026
Merged

[canvas] fix unable to load embeddable when no references are provided#257779
ThomThomson merged 5 commits intoelastic:mainfrom
nreese:issue_257772

Conversation

@nreese
Copy link
Copy Markdown
Contributor

@nreese nreese commented Mar 13, 2026

Closes #257772

PR adds BWC code to canvas that adds library reference when savedObjectId is provided but no reference exists.

@nreese nreese requested a review from a team as a code owner March 13, 2026 22:05
@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Mar 13, 2026

/ci

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Mar 13, 2026

@elasticmachine merge upstream

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Mar 13, 2026

/ci

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Mar 14, 2026

/ci

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Mar 14, 2026

/ci

// Test Workpad does not provide time range
// time range default to last 15 minutes - which has no data
await lens.assertLegacyMetric('Maximum of bytes', '(null)');
await lens.assertLegacyMetric('Maximum of bytes', '16,788');
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out workpad did have stored timeRange but transform was throwing so it was never converted to time_range.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix!

// Test Workpad does not provide time range
// time range default to last 15 minutes - which has no data
await lens.assertLegacyMetric('Maximum of bytes', '(null)');
await lens.assertLegacyMetric('Maximum of bytes', '16,788');
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out workpad did have stored timeRange but transform was throwing so it was never converted to time_range.

@ThomThomson
Copy link
Copy Markdown
Contributor

@elasticmachine merge upstream

@ThomThomson
Copy link
Copy Markdown
Contributor

/ci

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Scout: [ security / entity_store ] plugin / local-serverless-security_complete - Entity Store Main logs extraction - Should extract properly extract host

Metrics [docs]

✅ unchanged

History

Copy link
Copy Markdown
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM! Canvas is getting much cleaner


import { ensureLibraryReference } from './ensure_library_reference';

describe('ensureLibraryReference', () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ Nice tests

// Test Workpad does not provide time range
// time range default to last 15 minutes - which has no data
await lens.assertLegacyMetric('Maximum of bytes', '(null)');
await lens.assertLegacyMetric('Maximum of bytes', '16,788');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix!

@ThomThomson ThomThomson merged commit 56c6e4f into elastic:main Mar 18, 2026
18 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.2, 9.3

https://github.com/elastic/kibana/actions/runs/23250407984

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
9.2 Backport failed because of merge conflicts
9.3 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 257779

Questions ?

Please refer to the Backport tool documentation

mbondyra added a commit to mbondyra/kibana that referenced this pull request Mar 18, 2026
…d_agent_navigation2

* commit 'b511b784a89644463497411bc8cfac03522d43a9': (40 commits)
  skip failing test suite (elastic#252959)
  skip failing test suite (elastic#255548)
  skip failing test suite (elastic#256140)
  skip failing test suite (elastic#257103)
  skip failing test suite (elastic#258148)
  [SharedUX] Add solution view switch callout to spaces plugin (elastic#258093)
  skip tests consistently failing on ECH (elastic#258157)
  [EDR Workflows][Osquery] Disable tags for scheduled queries (elastic#258222)
  [Security solution][Attacks] Add navigation E2E test  (elastic#255373)
  [canvas] fix unable to load embeddable when no references are provided (elastic#257779)
  docs(streams): update Discovery settings labels and help text (elastic#258328)
  [ResponseOps] Fixes x-pack/platform/test/alerting_api_integration/spaces_only/tests/alerting/group4/alert_severity.ts flaky test (elastic#258226)
  [Lens as Code] Fix legend truncation issues (elastic#258216)
  Upgraded flatted (elastic#258252)
  [One Discover][Logs UX] Update OpenTelemetry Semantic Conventions (elastic#256613)
  add Agent Builder compatibility to connectors (elastic#257491)
  [Obs AI] Add o11y data-generators (OpenRCA and RCAEval) for producing logs, metrics, traces (elastic#256591)
  [One Workflow] Update execution history UI: show nested workflows steps (elastic#257352)
  [One Workflow] bulkUpdateSchedules should be called with request to follow auth (elastic#258150)
  [Agent Builder] Semantic Meta Layer (elastic#254849)
  ...
qn895 pushed a commit to qn895/kibana that referenced this pull request Mar 18, 2026
elastic#257779)

Adds BWC code to canvas that adds library reference when `savedObjectId` is provided but no reference exists.
ThomThomson pushed a commit to ThomThomson/kibana that referenced this pull request Mar 19, 2026
elastic#257779)

Adds BWC code to canvas that adds library reference when `savedObjectId` is provided but no reference exists.

(cherry picked from commit 56c6e4f)

# Conflicts:
#	x-pack/platform/plugins/private/canvas/server/embeddable/transform_workpad_out.ts
#	x-pack/platform/test/functional/apps/canvas/embeddables/lens.ts
ThomThomson pushed a commit to ThomThomson/kibana that referenced this pull request Mar 19, 2026
elastic#257779)

Adds BWC code to canvas that adds library reference when `savedObjectId` is provided but no reference exists.

(cherry picked from commit 56c6e4f)

# Conflicts:
#	x-pack/platform/plugins/private/canvas/server/embeddable/transform_workpad_out.ts
#	x-pack/platform/test/functional/apps/canvas/embeddables/lens.ts
@ThomThomson
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
9.3
9.2

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 20, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @nreese

3 similar comments
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @nreese

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @nreese

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @nreese

jeramysoucy pushed a commit to jeramysoucy/kibana that referenced this pull request Mar 26, 2026
elastic#257779)

Adds BWC code to canvas that adds library reference when `savedObjectId` is provided but no reference exists.
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @nreese

8 similar comments
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @nreese

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @nreese

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @nreese

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @nreese

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @nreese

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @nreese

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @nreese

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @nreese

@ThomThomson
Copy link
Copy Markdown
Contributor

Skipping these backports for now. Customers can upgrade to 9.4 to get the fixed behaviour, and if someone is unable to do so, we can do the work to backport this change.

@ThomThomson ThomThomson added backport:skip This PR does not require backporting and removed backport missing Added to PRs automatically when the are determined to be missing a backport. backport:version Backport to applied version labels v9.3.3 v9.2.8 labels Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[canvas] unable to load by-ref embeddable when no references are provided

4 participants