fix(search): Add migration to retroactively fix generated dashboards #27658
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.
#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
oftemplate
. 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.
After applying the migration, I searched for generated dashboards and got no results.
But searching for regular dashboards and events all works: