Fix prefetch failure on affinity group list#3279
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jul 3, 2026
david-crespo
added a commit
to oxidecomputer/omicron
that referenced
this pull request
Jul 4, 2026
oxidecomputer/console@f1ccb16...975bba9 * [975bba9f](oxidecomputer/console@975bba9f) oxidecomputer/console#3280 * [48cb0342](oxidecomputer/console@48cb0342) oxidecomputer/console#3279 * [3f3931b9](oxidecomputer/console@3f3931b9) oxidecomputer/console#3267 * [e52a59d0](oxidecomputer/console@e52a59d0) oxidecomputer/console#3275 * [981326a0](oxidecomputer/console@981326a0) oxidecomputer/console#3214 * [3f1e275e](oxidecomputer/console@3f1e275e) oxidecomputer/console#3274 * [d2c4209d](oxidecomputer/console@d2c4209d) oxidecomputer/console#3272 * [07daaf17](oxidecomputer/console@07daaf17) oxidecomputer/console#3269 * [1ba8f179](oxidecomputer/console@1ba8f179) oxidecomputer/console#3260 * [823e5b2e](oxidecomputer/console@823e5b2e) oxidecomputer/console#3265 * [0a4aa43e](oxidecomputer/console@0a4aa43e) oxidecomputer/console#3264 * [40c601a0](oxidecomputer/console@40c601a0) oxidecomputer/console#3262 * [f3c8b15f](oxidecomputer/console@f3c8b15f) oxidecomputer/console#3258 * [8a8fd12f](oxidecomputer/console@8a8fd12f) oxidecomputer/console#3257 * [9b7a7f35](oxidecomputer/console@9b7a7f35) oxidecomputer/console#3169 * [e1ff2b95](oxidecomputer/console@e1ff2b95) oxidecomputer/console#3256 * [fd85d2a7](oxidecomputer/console@fd85d2a7) oxidecomputer/console#3255 * [9858df1b](oxidecomputer/console@9858df1b) oxidecomputer/console#3252 * [4bb87c61](oxidecomputer/console@4bb87c61) oxidecomputer/console#3247 * [f95cc0af](oxidecomputer/console@f95cc0af) oxidecomputer/console#3166 * [5bb10883](oxidecomputer/console@5bb10883) oxidecomputer/console#3246
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
#2616 (comment)
https://oxide.sys.rack2.eng.oxide.computer/projects/product-assurance/affinity fails on prefetch invariant violation because there are 6 affinity groups, and I had the brilliant idea to only await the prefetch on the instance list for each group if there are less than 6 groups. The conditional await meant the query had to be a
useQueryto not blow up when it doesn't await. It was auseQueryoriginally but, incredibly, it had aTODO: break me!comment on it:console/app/pages/project/affinity/AffinityPage.tsx
Lines 139 to 146 in 7bb2f16
So eventually we did in fact break it. The conditional logic in the loader is silly, so here we just drop it and put a correct comment on the
useQuery(which is still needed because we are prefetching those calls but not awaiting them). And because we don't have the conditional, switching to ausePrefetchedQuerywill now blow up the tests immediately regardless of the number of groups on the page.The effect on the user is that the instance counts here will always have a loading skeleton, even when there are only a few groups. But that's completely fine.