Skip to content

[Lens][ConfigBuilder] Fix internal reference handling#239431

Merged
nickofthyme merged 4 commits intoelastic:mainfrom
nickofthyme:fix-cb-internal-refs
Oct 20, 2025
Merged

[Lens][ConfigBuilder] Fix internal reference handling#239431
nickofthyme merged 4 commits intoelastic:mainfrom
nickofthyme:fix-cb-internal-refs

Conversation

@nickofthyme
Copy link
Contributor

@nickofthyme nickofthyme commented Oct 16, 2025

Summary

Fixes a bug in the LensConfigBuilder that treated all dataview references the same, causing the UI to throw an error attempting to find an ad-hoc dataview that does not exist as a SavedObject.

Fixes #239430

Checklist

  • Unit or functional tests were updated or added to match the most common scenarios
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Release Notes

Fixes a bug in Lens that incorrectly assigned unsaved (ad-hoc) dataview references.

@nickofthyme nickofthyme requested a review from a team as a code owner October 16, 2025 19:44
@nickofthyme nickofthyme added release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// Feature:Lens backport:all-open Backport to all branches that could still receive a release labels Oct 16, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

@nickofthyme nickofthyme changed the title [ConfigBuilder] Fix internal reference handling Oct 16, 2025
@nickofthyme nickofthyme requested a review from dej611 October 16, 2025 19:45
Copy link
Contributor

@dej611 dej611 left a comment

Choose a reason for hiding this comment

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

Code review only 👍

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
dashboard 663.9KB 664.5KB +555.0B
discover 1.2MB 1.2MB +546.0B
infra 1.1MB 1.1MB +549.0B
observability 1.7MB 1.7MB +546.0B
observabilityAIAssistantApp 221.7KB 222.2KB +546.0B
total +2.7KB

History

@nickofthyme nickofthyme merged commit ad143b1 into elastic:main Oct 20, 2025
12 checks passed
@nickofthyme nickofthyme deleted the fix-cb-internal-refs branch October 20, 2025 15:01
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1, 9.2

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts
9.1 Backport failed because of merge conflicts
9.2 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 239431

Questions ?

Please refer to the Backport tool documentation

nickofthyme added a commit to nickofthyme/kibana that referenced this pull request Oct 20, 2025
## Summary

Fixes a bug in the `LensConfigBuilder` that treated all dataview
references the same, causing the UI to throw an error attempting to find
an ad-hoc dataview that does not exist as a SavedObject.

Fixes elastic#239430

## Release Notes

Fixes a bug in Lens that incorrectly assigned unsaved (ad-hoc) dataview
references.

(cherry picked from commit ad143b1)

# Conflicts:
#	src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/utils.ts
#	src/platform/packages/shared/kbn-lens-embeddable-utils/tsconfig.json
nickofthyme added a commit to nickofthyme/kibana that referenced this pull request Oct 20, 2025
## Summary

Fixes a bug in the `LensConfigBuilder` that treated all dataview
references the same, causing the UI to throw an error attempting to find
an ad-hoc dataview that does not exist as a SavedObject.

Fixes elastic#239430

## Release Notes

Fixes a bug in Lens that incorrectly assigned unsaved (ad-hoc) dataview
references.

(cherry picked from commit ad143b1)

# Conflicts:
#	src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/charts/heatmap.ts
#	src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/charts/partition.ts
#	src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/charts/region_map.ts
#	src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/charts/table.ts
#	src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/charts/tag_cloud.ts
#	src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/charts/xy.ts
#	src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/utils.ts
#	src/platform/packages/shared/kbn-lens-embeddable-utils/tsconfig.json
@nickofthyme
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
9.2
9.1
8.19

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

Questions ?

Please refer to the Backport tool documentation

nickofthyme added a commit to nickofthyme/kibana that referenced this pull request Oct 20, 2025
## Summary

Fixes a bug in the `LensConfigBuilder` that treated all dataview
references the same, causing the UI to throw an error attempting to find
an ad-hoc dataview that does not exist as a SavedObject.

Fixes elastic#239430

## Release Notes

Fixes a bug in Lens that incorrectly assigned unsaved (ad-hoc) dataview
references.

(cherry picked from commit ad143b1)

# Conflicts:
#	src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/charts/heatmap.ts
#	src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/charts/partition.ts
#	src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/charts/region_map.ts
#	src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/charts/table.ts
#	src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/charts/tag_cloud.ts
#	src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/charts/xy.ts
#	src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/utils.ts
#	src/platform/packages/shared/kbn-lens-embeddable-utils/tsconfig.json
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Oct 21, 2025
@kibanamachine
Copy link
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: @nickofthyme

nickofthyme added a commit that referenced this pull request Oct 21, 2025
…#239795)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Lens][ConfigBuilder] Fix internal reference handling
(#239431)](#239431)

<!--- Backport version: 10.1.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Nick
Partridge","email":"nicholas.partridge@elastic.co"},"sourceCommit":{"committedDate":"2025-10-20T15:01:19Z","message":"[Lens][ConfigBuilder]
Fix internal reference handling (#239431)\n\n## Summary\n\nFixes a bug
in the `LensConfigBuilder` that treated all dataview\nreferences the
same, causing the UI to throw an error attempting to find\nan ad-hoc
dataview that does not exist as a SavedObject.\n\nFixes #239430\n\n##
Release Notes\n\nFixes a bug in Lens that incorrectly assigned unsaved
(ad-hoc)
dataview\nreferences.","sha":"ad143b19f8086f1b027d3c6f4d5dbe436264c5a7","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport:all-open","v9.3.0"],"title":"[Lens][ConfigBuilder]
Fix internal reference
handling","number":239431,"url":"https://github.com/elastic/kibana/pull/239431","mergeCommit":{"message":"[Lens][ConfigBuilder]
Fix internal reference handling (#239431)\n\n## Summary\n\nFixes a bug
in the `LensConfigBuilder` that treated all dataview\nreferences the
same, causing the UI to throw an error attempting to find\nan ad-hoc
dataview that does not exist as a SavedObject.\n\nFixes #239430\n\n##
Release Notes\n\nFixes a bug in Lens that incorrectly assigned unsaved
(ad-hoc)
dataview\nreferences.","sha":"ad143b19f8086f1b027d3c6f4d5dbe436264c5a7"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/239431","number":239431,"mergeCommit":{"message":"[Lens][ConfigBuilder]
Fix internal reference handling (#239431)\n\n## Summary\n\nFixes a bug
in the `LensConfigBuilder` that treated all dataview\nreferences the
same, causing the UI to throw an error attempting to find\nan ad-hoc
dataview that does not exist as a SavedObject.\n\nFixes #239430\n\n##
Release Notes\n\nFixes a bug in Lens that incorrectly assigned unsaved
(ad-hoc)
dataview\nreferences.","sha":"ad143b19f8086f1b027d3c6f4d5dbe436264c5a7"}}]}]
BACKPORT-->
nickofthyme added a commit that referenced this pull request Oct 21, 2025
#239799)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Lens][ConfigBuilder] Fix internal reference handling
(#239431)](#239431)

<!--- Backport version: 10.1.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Nick
Partridge","email":"nicholas.partridge@elastic.co"},"sourceCommit":{"committedDate":"2025-10-20T15:01:19Z","message":"[Lens][ConfigBuilder]
Fix internal reference handling (#239431)\n\n## Summary\n\nFixes a bug
in the `LensConfigBuilder` that treated all dataview\nreferences the
same, causing the UI to throw an error attempting to find\nan ad-hoc
dataview that does not exist as a SavedObject.\n\nFixes #239430\n\n##
Release Notes\n\nFixes a bug in Lens that incorrectly assigned unsaved
(ad-hoc)
dataview\nreferences.","sha":"ad143b19f8086f1b027d3c6f4d5dbe436264c5a7","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport:all-open","v9.3.0"],"title":"[Lens][ConfigBuilder]
Fix internal reference
handling","number":239431,"url":"https://github.com/elastic/kibana/pull/239431","mergeCommit":{"message":"[Lens][ConfigBuilder]
Fix internal reference handling (#239431)\n\n## Summary\n\nFixes a bug
in the `LensConfigBuilder` that treated all dataview\nreferences the
same, causing the UI to throw an error attempting to find\nan ad-hoc
dataview that does not exist as a SavedObject.\n\nFixes #239430\n\n##
Release Notes\n\nFixes a bug in Lens that incorrectly assigned unsaved
(ad-hoc)
dataview\nreferences.","sha":"ad143b19f8086f1b027d3c6f4d5dbe436264c5a7"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/239431","number":239431,"mergeCommit":{"message":"[Lens][ConfigBuilder]
Fix internal reference handling (#239431)\n\n## Summary\n\nFixes a bug
in the `LensConfigBuilder` that treated all dataview\nreferences the
same, causing the UI to throw an error attempting to find\nan ad-hoc
dataview that does not exist as a SavedObject.\n\nFixes #239430\n\n##
Release Notes\n\nFixes a bug in Lens that incorrectly assigned unsaved
(ad-hoc)
dataview\nreferences.","sha":"ad143b19f8086f1b027d3c6f4d5dbe436264c5a7"}}]}]
BACKPORT-->
nickofthyme added a commit that referenced this pull request Oct 21, 2025
…#239794)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[Lens][ConfigBuilder] Fix internal reference handling
(#239431)](#239431)

<!--- Backport version: 10.1.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Nick
Partridge","email":"nicholas.partridge@elastic.co"},"sourceCommit":{"committedDate":"2025-10-20T15:01:19Z","message":"[Lens][ConfigBuilder]
Fix internal reference handling (#239431)\n\n## Summary\n\nFixes a bug
in the `LensConfigBuilder` that treated all dataview\nreferences the
same, causing the UI to throw an error attempting to find\nan ad-hoc
dataview that does not exist as a SavedObject.\n\nFixes #239430\n\n##
Release Notes\n\nFixes a bug in Lens that incorrectly assigned unsaved
(ad-hoc)
dataview\nreferences.","sha":"ad143b19f8086f1b027d3c6f4d5dbe436264c5a7","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport:all-open","v9.3.0"],"title":"[Lens][ConfigBuilder]
Fix internal reference
handling","number":239431,"url":"https://github.com/elastic/kibana/pull/239431","mergeCommit":{"message":"[Lens][ConfigBuilder]
Fix internal reference handling (#239431)\n\n## Summary\n\nFixes a bug
in the `LensConfigBuilder` that treated all dataview\nreferences the
same, causing the UI to throw an error attempting to find\nan ad-hoc
dataview that does not exist as a SavedObject.\n\nFixes #239430\n\n##
Release Notes\n\nFixes a bug in Lens that incorrectly assigned unsaved
(ad-hoc)
dataview\nreferences.","sha":"ad143b19f8086f1b027d3c6f4d5dbe436264c5a7"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/239431","number":239431,"mergeCommit":{"message":"[Lens][ConfigBuilder]
Fix internal reference handling (#239431)\n\n## Summary\n\nFixes a bug
in the `LensConfigBuilder` that treated all dataview\nreferences the
same, causing the UI to throw an error attempting to find\nan ad-hoc
dataview that does not exist as a SavedObject.\n\nFixes #239430\n\n##
Release Notes\n\nFixes a bug in Lens that incorrectly assigned unsaved
(ad-hoc)
dataview\nreferences.","sha":"ad143b19f8086f1b027d3c6f4d5dbe436264c5a7"}}]}]
BACKPORT-->
@kibanamachine kibanamachine added v9.2.0 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Oct 21, 2025
nickpeihl pushed a commit to nickpeihl/kibana that referenced this pull request Oct 23, 2025
## Summary

Fixes a bug in the `LensConfigBuilder` that treated all dataview
references the same, causing the UI to throw an error attempting to find
an ad-hoc dataview that does not exist as a SavedObject.

Fixes elastic#239430

## Release Notes

Fixes a bug in Lens that incorrectly assigned unsaved (ad-hoc) dataview
references.
@mistic mistic added v9.2.1 and removed v9.2.0 labels Oct 23, 2025
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Oct 27, 2025
## Summary

Fixes a bug in the `LensConfigBuilder` that treated all dataview
references the same, causing the UI to throw an error attempting to find
an ad-hoc dataview that does not exist as a SavedObject.

Fixes elastic#239430

## Release Notes

Fixes a bug in Lens that incorrectly assigned unsaved (ad-hoc) dataview
references.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:all-open Backport to all branches that could still receive a release Feature:Lens release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.19.6 v9.1.6 v9.2.1 v9.3.0

5 participants