Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(search): Add migration to retroactively fix generated dashboards #27658

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

haacked
Copy link
Contributor

@haacked haacked commented Jan 17, 2025

#27637 fixed the logic error described in #19207, but did not retroactively fix the bad data.

This commit adds a migration that updates generated dashboards to have a creation_mode of template. In theory, someone could have created a manual dashboard using this pattern. That seems very unlikely and is a risk we're willing to take.

Problem

Closes #19207

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

I ran the app prior to applying this migration. Saw that generated dashboards showed up.

Screenshot 2025-01-17 at 2 41 55 PM

After applying the migration, I searched for generated dashboards and got no results.

Screenshot 2025-01-17 at 2 42 35 PM

But searching for regular dashboards and events all works:

Screenshot 2025-01-17 at 2 42 43 PM

#27637 fixed the logic error described in #19207, but did not retroactively fix the bad data.

This commit adds a migration that updates generated dashboards to have a `creation_mode` of `template`. In theory, someone could have created a manual dashboard using this pattern. That seems very unlikely and is a risk we're willing to take.

Closes #19207
Copy link
Contributor

@dmarticus dmarticus left a comment

Choose a reason for hiding this comment

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

nice!

@haacked haacked enabled auto-merge (squash) January 17, 2025 23:27
@haacked haacked merged commit fb69265 into master Jan 17, 2025
91 of 92 checks passed
@haacked haacked deleted the haacked/19207-retroactive-data-cleanup branch January 17, 2025 23:54
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.

[Bug] Auto-generated dashboards show up in search results
2 participants