[ML] Fix console error when adding Region map visualization to dashboard#228669
Merged
walterra merged 3 commits intoelastic:mainfrom Jul 28, 2025
Merged
[ML] Fix console error when adding Region map visualization to dashboard#228669walterra merged 3 commits intoelastic:mainfrom
walterra merged 3 commits intoelastic:mainfrom
Conversation
Contributor
|
Pinging @elastic/ml-ui (:ml) |
10 tasks
Contributor
alvarezmelissa87
left a comment
There was a problem hiding this comment.
LGTM - couldn't reproduce the original issue.
Contributor
💔 Build Failed
Failed CI Steps
Test Failures
Metrics [docs]Async chunks
History
cc @walterra |
Contributor
Author
|
@elasticmachine merge upstream |
alvarezmelissa87
approved these changes
Jul 28, 2025
Contributor
|
Starting backport for target branches: 8.18, 8.19, 9.0 |
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)
Contributor
💚 All backports created successfully
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>
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #227964.
Fixes ML console error
Error attempting to check for ML job compatibility Error: Cannot create job, chart info is undefinedthat occurs when adding a Region map visualization to a Kibana Dashboard.The issue was caused by the
getChartInfoFromVisualizationfunction throwing an error whenchartInfois undefined, which happens for visualization types like Region Maps that don't implement the optionalgetVisualizationInfomethod.Checklist
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.Identify risks