Search Kit - Add a status-check to validate SearchDisplays #31642
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.
Overview
Saved-searches and search-displays can be complicated objects -- with references to various fields, entities, flags. Over time, as a system evolves, these values could get out of sync. If that happens... how do you know?
Before
The only way to validate a search is to open it.
After
The system status-check will warn if any search-displays appear to have problems. For example:
Comments
This is inspired by #31632 (though not strictly dependent) -- under one draft of #31632, there would be a de-facto change in schema. Items of type "DB Entity" would no longer export a field named
_row
(row-number). Any downstreamDisplay
s that consume this field would therefore lose access. The sysadmin should review affectedDisplay
and decide what to do (drop the reference to_row
... or replace it withid
... or something else...).The current validation succeeds at detecting when there's a stale
_row
reference, but...It's generally a pretty naive validation. I believe I'm getting some false-negatives with stock data. @colemanw, do you see how we make a more realistic validation?