Skip to content

Conversation

@mrodm
Copy link
Contributor

@mrodm mrodm commented Nov 6, 2025

Follows #3007

This PR helps to debug errors when editing dashboards if there is any error importing those saved objects.
In case there are errors, those are shown as part of the error message shown in elastic-package.

Before:

$ elastic-package edit dashboards
Make Kibana dashboards editable
? Which package would you like to export dashboards from?: profilingmetrics_otel-0.0.1
? Which dashboards would you like to export?: Profilingmetrics (ID: profilingmetrics_otel-cf4d74ec-b406-4314-9519-2569d24002fe, Type: dashboard)

Error: failed to make one or more dashboards editable: importing dashboard profilingmetrics_otel-cf4d74ec-b406-4314-9519-2569d24002fe was not successful

After:

$ elastic-package edit dashboards
Make Kibana dashboards editable
? Which package would you like to export dashboards from?: profilingmetrics_otel-0.0.1
? Which dashboards would you like to export?: Profilingmetrics (ID: profilingmetrics_otel-cf4d74ec-b406-4314-9519-2569d24002fe, Type: dashboard)

Error: failed to make one or more dashboards editable: importing dashboard profilingmetrics_otel-cf4d74ec-b406-4314-9519-2569d24002fe was not successful: ID: profilingmetrics_otel-cf4d74ec-b406-4314-9519-2569d24002fe, Type: dashboard, Error: map[references:[map[id:72c09aba-3449-477f-aebf-0694d94fed70 type:index-pattern]] type:missing_references]

@mrodm mrodm self-assigned this Nov 6, 2025
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @mrodm

@mrodm mrodm marked this pull request as ready for review November 6, 2025 09:40
@mrodm mrodm requested a review from a team November 6, 2025 10:08
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Error: failed to make one or more dashboards editable: importing dashboard profilingmetrics_otel-cf4d74ec-b406-4314-9519-2569d24002fe was not successful: ID: profilingmetrics_otel-cf4d74ec-b406-4314-9519-2569d24002fe, Type: dashboard

The saved object type and id appear twice now, we could only include the errors.

Error: map[references:[map[id:72c09aba-3449-477f-aebf-0694d94fed70 type:index-pattern]] type:missing_references]

The error is still a bit cryptic, but more significant than before.

@mrodm
Copy link
Contributor Author

mrodm commented Nov 6, 2025

Error: failed to make one or more dashboards editable: importing dashboard profilingmetrics_otel-cf4d74ec-b406-4314-9519-2569d24002fe was not successful: ID: profilingmetrics_otel-cf4d74ec-b406-4314-9519-2569d24002fe, Type: dashboard

The saved object type and id appear twice now, we could only include the errors.

I re-phrased these errors to be like:

Error: failed to make one or more dashboards editable: failed to import one or more saved objects: ID: profilingmetrics_otel-cf4d74ec-b406-4314-9519-2569d24002fe, Type: dashboard, Error: map[references:[map[id:72c09aba-3449-477f-aebf-0694d94fed70 type:index-pattern]] type:missing_references]

WDYT @jsoriano ?

Error: map[references:[map[id:72c09aba-3449-477f-aebf-0694d94fed70 type:index-pattern]] type:missing_references]

The error is still a bit cryptic, but more significant than before.

I couldn't find the specification of these errors (API docs link), it looks like there could be any field there. That's why I just set %v to show the errors variable.

@mrodm mrodm requested a review from jsoriano November 6, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants