Skip to content

[ML] Fix console error when adding Region map visualization to dashboard#228669

Merged
walterra merged 3 commits intoelastic:mainfrom
walterra:ml-dashboard-chart-info-main
Jul 28, 2025
Merged

[ML] Fix console error when adding Region map visualization to dashboard#228669
walterra merged 3 commits intoelastic:mainfrom
walterra:ml-dashboard-chart-info-main

Conversation

@walterra
Copy link
Contributor

@walterra walterra commented Jul 18, 2025

Summary

Fixes #227964.

Fixes ML console error Error attempting to check for ML job compatibility Error: Cannot create job, chart info is undefined that occurs when adding a Region map visualization to a Kibana Dashboard.

The issue was caused by the getChartInfoFromVisualization function throwing an error when chartInfo is undefined, which happens for visualization types like Region Maps that don't implement the optional getVisualizationInfo method.

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.

Identify risks

  • Low Risk: This change only affects error handling for ML job compatibility checks. It gracefully handles undefined chart info instead of throwing errors, improves user experience without affecting core functionality.
@walterra walterra self-assigned this Jul 18, 2025
@walterra walterra requested a review from a team as a code owner July 18, 2025 18:51
@walterra walterra added bug Fixes for quality problems that affect the customer experience release_note:fix :ml labels Jul 18, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

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

LGTM - couldn't reproduce the original issue.

@nickofthyme nickofthyme added the backport:version Backport to applied version labels label Jul 24, 2025
@elasticmachine
Copy link
Contributor

elasticmachine commented Jul 24, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #37 / APM API tests fleet/apm_package_policy.spec.ts basic no archive APM package policy "after all" hook in "APM package policy"
  • [job] [logs] FTR Configs #37 / APM API tests fleet/apm_package_policy.spec.ts basic no archive APM package policy "before all" hook in "APM package policy"
  • [job] [logs] FTR Configs #47 / Cloud Security Posture Test adding Cloud Security Posture Integrations CNVM CNVM AWS Hyperlink on PostInstallation Modal should have the correct URL
  • [job] [logs] FTR Configs #47 / Cloud Security Posture Test adding Cloud Security Posture Integrations CNVM CNVM AWS Hyperlink on PostInstallation Modal should have the correct URL
  • [job] [logs] FTR Configs #73 / cloud_security_posture Serverless - Agentless CIS Integration Page Serverless - Agentless CIS_AWS edit flow user should save and edit agentless integration policy
  • [job] [logs] FTR Configs #73 / cloud_security_posture Serverless - Agentless CIS Integration Page Serverless - Agentless CIS_AWS edit flow user should save and edit agentless integration policy
  • [job] [logs] FTR Configs #89 / serverless observability UI Onboarding Onboarding Auto-Detect guides user through data onboarding

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
ml 5.4MB 5.4MB +12.0B

History

cc @walterra

@walterra
Copy link
Contributor Author

@elasticmachine merge upstream

@walterra walterra added v8.18.5 and removed v8.18.4 labels Jul 28, 2025
@walterra walterra merged commit 295ea93 into elastic:main Jul 28, 2025
15 checks passed
@walterra walterra deleted the ml-dashboard-chart-info-main branch July 28, 2025 15:27
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.18, 8.19, 9.0

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 28, 2025
…ard (elastic#228669)

## Summary

Fixes elastic#227964.

Fixes ML console error `Error attempting to check for ML job
compatibility Error: Cannot create job, chart info is undefined` that
occurs when adding a Region map visualization to a Kibana Dashboard.

The issue was caused by the `getChartInfoFromVisualization` function
throwing an error when `chartInfo` is undefined, which happens for
visualization types like Region Maps that don't implement the optional
`getVisualizationInfo` method.

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] 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.
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

- **Low Risk**: This change only affects error handling for ML job
compatibility checks. It gracefully handles undefined chart info instead
of throwing errors, improves user experience without affecting core
functionality.

(cherry picked from commit 295ea93)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 28, 2025
…ard (elastic#228669)

## Summary

Fixes elastic#227964.

Fixes ML console error `Error attempting to check for ML job
compatibility Error: Cannot create job, chart info is undefined` that
occurs when adding a Region map visualization to a Kibana Dashboard.

The issue was caused by the `getChartInfoFromVisualization` function
throwing an error when `chartInfo` is undefined, which happens for
visualization types like Region Maps that don't implement the optional
`getVisualizationInfo` method.

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] 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.
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

- **Low Risk**: This change only affects error handling for ML job
compatibility checks. It gracefully handles undefined chart info instead
of throwing errors, improves user experience without affecting core
functionality.

(cherry picked from commit 295ea93)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 28, 2025
…ard (elastic#228669)

## Summary

Fixes elastic#227964.

Fixes ML console error `Error attempting to check for ML job
compatibility Error: Cannot create job, chart info is undefined` that
occurs when adding a Region map visualization to a Kibana Dashboard.

The issue was caused by the `getChartInfoFromVisualization` function
throwing an error when `chartInfo` is undefined, which happens for
visualization types like Region Maps that don't implement the optional
`getVisualizationInfo` method.

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] 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.
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

- **Low Risk**: This change only affects error handling for ML job
compatibility checks. It gracefully handles undefined chart info instead
of throwing errors, improves user experience without affecting core
functionality.

(cherry picked from commit 295ea93)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.18
8.19
9.0

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jul 28, 2025
… dashboard (#228669) (#229676)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[ML] Fix console error when adding Region map visualization to
dashboard (#228669)](#228669)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Walter M.
Rafelsberger","email":"walter.rafelsberger@elastic.co"},"sourceCommit":{"committedDate":"2025-07-28T15:26:49Z","message":"[ML]
Fix console error when adding Region map visualization to dashboard
(#228669)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/227964.\n\nFixes ML console
error `Error attempting to check for ML job\ncompatibility Error: Cannot
create job, chart info is undefined` that\noccurs when adding a Region
map visualization to a Kibana Dashboard.\n\nThe issue was caused by the
`getChartInfoFromVisualization` function\nthrowing an error when
`chartInfo` is undefined, which happens for\nvisualization types like
Region Maps that don't implement the optional\n`getVisualizationInfo`
method.\n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] This was
checked for breaking HTTP API changes, and any breaking\nchanges have
been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] The PR description includes the appropriate Release
Notes section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- **Low
Risk**: This change only affects error handling for ML
job\ncompatibility checks. It gracefully handles undefined chart info
instead\nof throwing errors, improves user experience without affecting
core\nfunctionality.","sha":"295ea9323630063b9147ab92cf1548629d7973ee","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix",":ml","backport:version","v8.19.0","v9.2.0","v9.0.5","v8.18.5"],"title":"[ML]
Fix console error when adding Region map visualization to
dashboard","number":228669,"url":"https://github.com/elastic/kibana/pull/228669","mergeCommit":{"message":"[ML]
Fix console error when adding Region map visualization to dashboard
(#228669)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/227964.\n\nFixes ML console
error `Error attempting to check for ML job\ncompatibility Error: Cannot
create job, chart info is undefined` that\noccurs when adding a Region
map visualization to a Kibana Dashboard.\n\nThe issue was caused by the
`getChartInfoFromVisualization` function\nthrowing an error when
`chartInfo` is undefined, which happens for\nvisualization types like
Region Maps that don't implement the optional\n`getVisualizationInfo`
method.\n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] This was
checked for breaking HTTP API changes, and any breaking\nchanges have
been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] The PR description includes the appropriate Release
Notes section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- **Low
Risk**: This change only affects error handling for ML
job\ncompatibility checks. It gracefully handles undefined chart info
instead\nof throwing errors, improves user experience without affecting
core\nfunctionality.","sha":"295ea9323630063b9147ab92cf1548629d7973ee"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.0","8.18"],"targetPullRequestStates":[{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228669","number":228669,"mergeCommit":{"message":"[ML]
Fix console error when adding Region map visualization to dashboard
(#228669)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/227964.\n\nFixes ML console
error `Error attempting to check for ML job\ncompatibility Error: Cannot
create job, chart info is undefined` that\noccurs when adding a Region
map visualization to a Kibana Dashboard.\n\nThe issue was caused by the
`getChartInfoFromVisualization` function\nthrowing an error when
`chartInfo` is undefined, which happens for\nvisualization types like
Region Maps that don't implement the optional\n`getVisualizationInfo`
method.\n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] This was
checked for breaking HTTP API changes, and any breaking\nchanges have
been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] The PR description includes the appropriate Release
Notes section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- **Low
Risk**: This change only affects error handling for ML
job\ncompatibility checks. It gracefully handles undefined chart info
instead\nof throwing errors, improves user experience without affecting
core\nfunctionality.","sha":"295ea9323630063b9147ab92cf1548629d7973ee"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Walter M. Rafelsberger <walter.rafelsberger@elastic.co>
kibanamachine added a commit that referenced this pull request Jul 28, 2025
…dashboard (#228669) (#229677)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[ML] Fix console error when adding Region map visualization to
dashboard (#228669)](#228669)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Walter M.
Rafelsberger","email":"walter.rafelsberger@elastic.co"},"sourceCommit":{"committedDate":"2025-07-28T15:26:49Z","message":"[ML]
Fix console error when adding Region map visualization to dashboard
(#228669)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/227964.\n\nFixes ML console
error `Error attempting to check for ML job\ncompatibility Error: Cannot
create job, chart info is undefined` that\noccurs when adding a Region
map visualization to a Kibana Dashboard.\n\nThe issue was caused by the
`getChartInfoFromVisualization` function\nthrowing an error when
`chartInfo` is undefined, which happens for\nvisualization types like
Region Maps that don't implement the optional\n`getVisualizationInfo`
method.\n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] This was
checked for breaking HTTP API changes, and any breaking\nchanges have
been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] The PR description includes the appropriate Release
Notes section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- **Low
Risk**: This change only affects error handling for ML
job\ncompatibility checks. It gracefully handles undefined chart info
instead\nof throwing errors, improves user experience without affecting
core\nfunctionality.","sha":"295ea9323630063b9147ab92cf1548629d7973ee","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix",":ml","backport:version","v8.19.0","v9.2.0","v9.0.5","v8.18.5"],"title":"[ML]
Fix console error when adding Region map visualization to
dashboard","number":228669,"url":"https://github.com/elastic/kibana/pull/228669","mergeCommit":{"message":"[ML]
Fix console error when adding Region map visualization to dashboard
(#228669)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/227964.\n\nFixes ML console
error `Error attempting to check for ML job\ncompatibility Error: Cannot
create job, chart info is undefined` that\noccurs when adding a Region
map visualization to a Kibana Dashboard.\n\nThe issue was caused by the
`getChartInfoFromVisualization` function\nthrowing an error when
`chartInfo` is undefined, which happens for\nvisualization types like
Region Maps that don't implement the optional\n`getVisualizationInfo`
method.\n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] This was
checked for breaking HTTP API changes, and any breaking\nchanges have
been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] The PR description includes the appropriate Release
Notes section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- **Low
Risk**: This change only affects error handling for ML
job\ncompatibility checks. It gracefully handles undefined chart info
instead\nof throwing errors, improves user experience without affecting
core\nfunctionality.","sha":"295ea9323630063b9147ab92cf1548629d7973ee"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.0","8.18"],"targetPullRequestStates":[{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228669","number":228669,"mergeCommit":{"message":"[ML]
Fix console error when adding Region map visualization to dashboard
(#228669)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/227964.\n\nFixes ML console
error `Error attempting to check for ML job\ncompatibility Error: Cannot
create job, chart info is undefined` that\noccurs when adding a Region
map visualization to a Kibana Dashboard.\n\nThe issue was caused by the
`getChartInfoFromVisualization` function\nthrowing an error when
`chartInfo` is undefined, which happens for\nvisualization types like
Region Maps that don't implement the optional\n`getVisualizationInfo`
method.\n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] This was
checked for breaking HTTP API changes, and any breaking\nchanges have
been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] The PR description includes the appropriate Release
Notes section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- **Low
Risk**: This change only affects error handling for ML
job\ncompatibility checks. It gracefully handles undefined chart info
instead\nof throwing errors, improves user experience without affecting
core\nfunctionality.","sha":"295ea9323630063b9147ab92cf1548629d7973ee"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Walter M. Rafelsberger <walter.rafelsberger@elastic.co>
kibanamachine added a commit that referenced this pull request Jul 28, 2025
… dashboard (#228669) (#229675)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[ML] Fix console error when adding Region map visualization to
dashboard (#228669)](#228669)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Walter M.
Rafelsberger","email":"walter.rafelsberger@elastic.co"},"sourceCommit":{"committedDate":"2025-07-28T15:26:49Z","message":"[ML]
Fix console error when adding Region map visualization to dashboard
(#228669)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/227964.\n\nFixes ML console
error `Error attempting to check for ML job\ncompatibility Error: Cannot
create job, chart info is undefined` that\noccurs when adding a Region
map visualization to a Kibana Dashboard.\n\nThe issue was caused by the
`getChartInfoFromVisualization` function\nthrowing an error when
`chartInfo` is undefined, which happens for\nvisualization types like
Region Maps that don't implement the optional\n`getVisualizationInfo`
method.\n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] This was
checked for breaking HTTP API changes, and any breaking\nchanges have
been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] The PR description includes the appropriate Release
Notes section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- **Low
Risk**: This change only affects error handling for ML
job\ncompatibility checks. It gracefully handles undefined chart info
instead\nof throwing errors, improves user experience without affecting
core\nfunctionality.","sha":"295ea9323630063b9147ab92cf1548629d7973ee","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix",":ml","backport:version","v8.19.0","v9.2.0","v9.0.5","v8.18.5"],"title":"[ML]
Fix console error when adding Region map visualization to
dashboard","number":228669,"url":"https://github.com/elastic/kibana/pull/228669","mergeCommit":{"message":"[ML]
Fix console error when adding Region map visualization to dashboard
(#228669)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/227964.\n\nFixes ML console
error `Error attempting to check for ML job\ncompatibility Error: Cannot
create job, chart info is undefined` that\noccurs when adding a Region
map visualization to a Kibana Dashboard.\n\nThe issue was caused by the
`getChartInfoFromVisualization` function\nthrowing an error when
`chartInfo` is undefined, which happens for\nvisualization types like
Region Maps that don't implement the optional\n`getVisualizationInfo`
method.\n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] This was
checked for breaking HTTP API changes, and any breaking\nchanges have
been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] The PR description includes the appropriate Release
Notes section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- **Low
Risk**: This change only affects error handling for ML
job\ncompatibility checks. It gracefully handles undefined chart info
instead\nof throwing errors, improves user experience without affecting
core\nfunctionality.","sha":"295ea9323630063b9147ab92cf1548629d7973ee"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.0","8.18"],"targetPullRequestStates":[{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228669","number":228669,"mergeCommit":{"message":"[ML]
Fix console error when adding Region map visualization to dashboard
(#228669)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/227964.\n\nFixes ML console
error `Error attempting to check for ML job\ncompatibility Error: Cannot
create job, chart info is undefined` that\noccurs when adding a Region
map visualization to a Kibana Dashboard.\n\nThe issue was caused by the
`getChartInfoFromVisualization` function\nthrowing an error when
`chartInfo` is undefined, which happens for\nvisualization types like
Region Maps that don't implement the optional\n`getVisualizationInfo`
method.\n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] This was
checked for breaking HTTP API changes, and any breaking\nchanges have
been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] The PR description includes the appropriate Release
Notes section,\nand the correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- **Low
Risk**: This change only affects error handling for ML
job\ncompatibility checks. It gracefully handles undefined chart info
instead\nof throwing errors, improves user experience without affecting
core\nfunctionality.","sha":"295ea9323630063b9147ab92cf1548629d7973ee"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Walter M. Rafelsberger <walter.rafelsberger@elastic.co>
@mistic mistic added v8.19.1 and removed v8.19.0 labels Jul 29, 2025
delanni pushed a commit to delanni/kibana that referenced this pull request Aug 5, 2025
…ard (elastic#228669)

## Summary

Fixes elastic#227964.

Fixes ML console error `Error attempting to check for ML job
compatibility Error: Cannot create job, chart info is undefined` that
occurs when adding a Region map visualization to a Kibana Dashboard.

The issue was caused by the `getChartInfoFromVisualization` function
throwing an error when `chartInfo` is undefined, which happens for
visualization types like Region Maps that don't implement the optional
`getVisualizationInfo` method.

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] 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.
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

- **Low Risk**: This change only affects error handling for ML job
compatibility checks. It gracefully handles undefined chart info instead
of throwing errors, improves user experience without affecting core
functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels bug Fixes for quality problems that affect the customer experience :ml release_note:fix v8.18.5 v8.19.1 v9.0.5 v9.2.0

6 participants