fix(FR-2810): batch-load image canonical names on admin deployment preset list#7242
Merged
graphite-app[bot] merged 1 commit intoMay 5, 2026
Conversation
Contributor
Author
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
Coverage Report for react-coverage (./react)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the admin deployment preset list table to avoid an N+1 query pattern when displaying image canonical names, by batch-loading image metadata once and rendering the table with a resolved imageId -> canonicalName map.
Changes:
- Replaced per-row image lookup queries with a single batched
adminImagesV2query for all image UUIDs on the page. - Added logic to collect unique
execution.imageIdvalues from presets and map query results back to those IDs. - Updated table rendering to use the resolved canonical name (falling back to the raw imageId).
e0d75aa to
1a0d778
Compare
Merge activity
|
…eset list (#7242) Resolves #7241 (FR-2810) ## Summary - Replace N per-row `useLazyLoadQuery` calls for image canonical names with a single batch query using `adminImagesV2(filter: { id: { in: \$ids } })`. - Remove the `ImageCanonicalName` sub-component that was causing the N+1 query problem. - Add `ImagesBatchQuery` component that fetches all unique image UUIDs in one request and builds a `Record<uuid, canonicalName>` lookup map. - Suspension propagates to the page-level Suspense boundary, so the table renders once images are resolved (no inner Suspense, no remount mid-load). - Rename `DeploymentPresetNodes` → `AdminDeploymentPresetNodes` to reflect that it queries the admin-only `adminImagesV2` API. The Relay fragment and query are renamed accordingly. ## Root Cause `DeploymentPresetNodes` rendered an `ImageCanonicalName` component per row, each calling `useLazyLoadQuery<DeploymentPresetNodesImageQuery>`. With N rows, this fired N separate GraphQL requests — one per row. ## Fix The new `ImagesBatchQuery` component collects all unique `imageId` values from the preset list, fetches them all with one `adminImagesV2` query, converts Relay global IDs back to UUIDs via `toLocalId`, and passes the resulting name map to the table column renderer. Empty `imageIds` short-circuits before the query runs.
3ecfd8a to
c0ac584
Compare
agatha197
pushed a commit
that referenced
this pull request
May 18, 2026
Part of the recent main-branch docs catch-up plan (Work Item 11). New page documenting the Deployment Preset feature introduced over Q1–Q2 2026: - FR-2750 (#7091) feature spec - FR-2761 (#7125) admin create / edit / delete UI - FR-2762 (#7127) preset detail view in VFolderDeployModal - FR-2801 (#7224) pre-populate launcher fields from preset - FR-2805 (#7233) URLSearchParams in preset navigation - FR-2827 (#7274) clickable deployment tags filter the list - FR-2810 (#7242) batch image canonical names on admin preset list - FR-2773 (#7153) preserve auto-selected resourcePresetId New sections: 1. What is a Deployment Preset? 2. (Admin) Manage Deployment Presets — list, filter, create, edit, delete (typed-confirm) 3. Using a Preset when Deploying a Model — preset detail, auto/manual deploy paths 4. Pre-populated Launcher Fields 5. Filtering by Tags Also adds book.config.yaml navigation entries under the Model Serving category in all 4 languages. Updated in all 4 languages (en/ko/ja/th). Screenshots flagged with TODO markers for separate capture. Linked from model_serving.md (PR B) so PR B's cross-references now resolve.
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.

Resolves #7241 (FR-2810)
Summary
useLazyLoadQuerycalls for image canonical names with a single batch query usingadminImagesV2(filter: { id: { in: \$ids } }).ImageCanonicalNamesub-component that was causing the N+1 query problem.ImagesBatchQuerycomponent that fetches all unique image UUIDs in one request and builds aRecord<uuid, canonicalName>lookup map.DeploymentPresetNodes→AdminDeploymentPresetNodesto reflect that it queries the admin-onlyadminImagesV2API. The Relay fragment and query are renamed accordingly.Root Cause
DeploymentPresetNodesrendered anImageCanonicalNamecomponent per row, each callinguseLazyLoadQuery<DeploymentPresetNodesImageQuery>. With N rows, this fired N separate GraphQL requests — one per row.Fix
The new
ImagesBatchQuerycomponent collects all uniqueimageIdvalues from the preset list, fetches them all with oneadminImagesV2query, converts Relay global IDs back to UUIDs viatoLocalId, and passes the resulting name map to the table column renderer. EmptyimageIdsshort-circuits before the query runs.