Skip to content

[dasboards as code] drop panels with server errors#260073

Merged
nreese merged 7 commits intoelastic:mainfrom
nreese:surface_dropped_panels
Mar 31, 2026
Merged

[dasboards as code] drop panels with server errors#260073
nreese merged 7 commits intoelastic:mainfrom
nreese:surface_dropped_panels

Conversation

@nreese
Copy link
Copy Markdown
Contributor

@nreese nreese commented Mar 27, 2026

Closes #259793

PR removes panels from dashboard out state when panel transform throws. Dropped panels are returned in warnings key. Client displays toast when loading dashboard with dropped panels.

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Mar 27, 2026

/ci

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Mar 27, 2026

/ci

@nreese nreese marked this pull request as ready for review March 30, 2026 14:30
@nreese nreese requested review from a team as code owners March 30, 2026 14:30
@nreese nreese added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Project:Dashboards API v9.4.0 labels Mar 30, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@elasticmachine
Copy link
Copy Markdown
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 845.9KB 846.2KB +308.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
dashboard 25 27 +2

Total ESLint disabled count

id before after diff
dashboard 25 27 +2

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! Looked through all the code and the changes make sense.

}
});
if (droppedPanelsCount) {
coreServices.notifications.toasts.addWarning(
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. Much simpler to fire off a warning than it is to try to put a fake panel in its place.

enhancements: {},
title: 'title1',
expect(transformDashboardOut(input, references)).toMatchInlineSnapshot(`
Object {
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.

I know this is an inline snapshot, but the diff is pretty difficult to read here when theoretically the only thing that should change is the addition of the warnings array.

`);
});

it('should drop panel when panel transform throws', () => {
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.

++ To unit test

"warnings": Array [
"Dropped panel 12345, panel schema not available for panel type: typeWithoutSchema. Panels without schemas are not supported by dashboard REST endpoints",
Object {
"message": "Panel schema not available for panel type: typeWithoutSchema. Panels without schemas are not supported by dashboard REST endpoints",
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.

This is much better as an object! Very nice

panel_references: schema.maybe(schema.arrayOf(referenceSchema)),
});

export const warningsSchema = schema.arrayOf(droppedPanelWarningSchema);
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 little extension point left in here

@nreese nreese merged commit 1c2bdf0 into elastic:main Mar 31, 2026
29 checks passed
mbondyra added a commit to mbondyra/kibana that referenced this pull request Mar 31, 2026
…hanges

* commit 'd0e62a657916e84694a93983e513ce9e34e0b635': (27 commits)
  [Agent Builder] Agent overview page design updates (elastic#260468)
  [Inference UI] Add model detail flyout with endpoint management (elastic#260307)
  [Fleet] Update doc links in agent policy settings (elastic#260245)
  [Security Solution] show risk score in new flyout header (elastic#260187)
  Replace deprecated EUI icons in files owned by @elastic/kibana-security (elastic#255636)
  [Cases][Templates] Add DATE_PICKER field control type (elastic#260209)
  [SharedUX] Get spaces callout on each solution nav (elastic#259723)
  [SharedUX] Preserve feature visibility on solution change (elastic#259316)
  [CI] Increase investigations cypress disks to 110G (elastic#260423)
  [Agent Builder] Expose read-only conversations on plugin start contract (elastic#260435)
  [dasboards as code] drop panels with server errors (elastic#260073)
  [One Workflow] Add force-delete (hard delete) option for workflows (elastic#260391)
  [Agent Builder] Fix sidebar error handling error (elastic#260446)
  [Agent Builder] Add attachment origin to Converse API (elastic#259043)
  [Alerting v2] Fix rule results preview chart responsiveness (elastic#260444)
  [Streams] Processing error panel UI improvements (elastic#260028)
  fix flaky test: alert details error page timeout (elastic#260302)
  [Agent Builder] Add attachment origin to Converse API (elastic#259043)
  [One Workflow] Add more unit tests to workflows_extensions plugin (elastic#260384)
  [ResponseOps] Split alerting security_and_spaces group8 FTR config to fix CI timeout (elastic#260029)
  ...
jeramysoucy pushed a commit to jeramysoucy/kibana that referenced this pull request Apr 1, 2026
Closes elastic#259793

PR removes panels from dashboard out state when panel transform throws.
Dropped panels are returned in `warnings` key. Client displays toast
when loading dashboard with dropped panels.
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request Apr 2, 2026
Closes elastic#259793

PR removes panels from dashboard out state when panel transform throws.
Dropped panels are returned in `warnings` key. Client displays toast
when loading dashboard with dropped panels.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Project:Dashboards API release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dashboards as code] surface transform errors

4 participants