release-21.2: ui: range table loads correctly when replica is being gc-ed #70211
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.
Backport 1/1 commits from #69443 on behalf of @dhartunian.
/cc @cockroachdb/release
Previously, there was a bug where the range table component would fail
to load if the
GetLocalReplica
function returned a null or undefinedvalue. This is an expected scenario where we may be in the Awaiting GC
state for a problematic range.
This change gates the retrieval of
.type
on thelocalReplica
objecton the
awaitingGC
boolean like a few other cases in the component doalready. We render blank text for the
replicaType
in this scenariosince the row right above will show "Awaiting GC" already.
Release justification: this is a high-severity bug on the page since it
doesn't load in scenarios where we would want to debug problematic
ranges.
Release note (ui change, bug fix): replicas awaiting to be GCed were
causing the range report page to not load at all due to a JS error. The
page will now load and display an empty "Replica Type" while in this
state.
Release justification: this fixes a bug in the DB Console where the range report page would fail to load