Repository navigation
feat(ui): offer generic accelerator parents in resource type picker - #1526
Merged
Merged
Conversation
Offer generic parent accelerator options (e.g. nvidia.com/gpu, google.com/tpu) in the Resource Observability Dashboard (ROD) Smart Resource Finder dropdown when cluster queues report only specific compound models (e.g. nvidia.com/gpu: nvidia-tesla-a100). - PR #605 resolves generic resources to compound names in the ROD data provider backend using formatCompoundAccelerator with a ": " delimiter. - PR #643 implemented hierarchical resource filtering (matchesResourceFilter) allowing generic filters like nvidia.com/gpu to match both generic and specific compound queues. - This change introduces extractParentResourceType and expandResourceTypesWithParents in resource_filter.ts to synthesize parent options, deduplicate entries, and sort parents before specific models. - Updates availableResourceTypes in resource_dashboard.ts to use expandResourceTypesWithParents. - Adds comprehensive unit tests in resource_filter_test.ts and resource_dashboard_test.ts. TAG=agy CONV=deb14588-e33d-42bb-b180-9ad652e1a8fa
There was a problem hiding this comment.
Code Review
This pull request introduces functionality to extract and synthesize parent resource types from compound resource identifiers (e.g., extracting "nvidia.com/gpu" from "nvidia.com/gpu: nvidia-tesla-a100") to improve resource filtering and dropdown options in the resource dashboard. Unit and integration tests have been added to verify this behavior. A review comment suggests adding a defensive guard in expandResourceTypesWithParents to handle cases where the input iterable might be null or undefined.
Match the exact ": " delimiter emitted by formatCompoundAccelerator, drop trim/empty guards already handled by the caller, keep the parent helper module-private, and consolidate unit tests. TAG=agy CONV=deb14588-e33d-42bb-b180-9ad652e1a8fa
janzak-dev
marked this pull request as ready for review
November 2, 2026 12:43
1 task done
janzak-dev
enabled auto-merge
November 2, 2026 14:58
AntonTyb
approved these changes
Nov 2, 2026
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.
Summary
Enables users to select generic accelerator parents (such as
nvidia.com/gpuorgoogle.com/tpu) in the Resource Observability Dashboard (ROD) "Smart Resource Finder" resource-type picker, even when cluster queues report only specific compound models (e.g.nvidia.com/gpu: nvidia-tesla-a100).Motivation & Context
In PR #605, the backend ROD data provider was updated to resolve generic accelerator resources into compound specific names like
nvidia.com/gpu: nvidia-tesla-a100via ResourceFlavor node labels. In PR #643, hierarchical filtering was introduced inmatchesResourceFilter, enabling a generic filter selection likenvidia.com/gputo match both generic queues and all specific models of that accelerator family.However, the dropdown options in
ResourceDashboardwere directly populated from the raw reported capacities inavailableResourceTypes. On production environments where every GPU or TPU ClusterQueue uses a labeled flavor, only specific compound types appeared in the dropdown, preventing users from searching across all GPU or TPU models with a single generic filter.Screenshots
All possible options - both generic and specific
When choosing generic
When choosing specific
Key Changes
expandResourceTypesWithParentsincmd/ui/app/resource_dashboard/resource_filter.ts. For every type containing the": "delimiter emitted byformatCompoundAccelerator, it adds the parent (e.g.nvidia.com/gpu), deduplicates, and sorts so each parent precedes its models.availableResourceTypesincmd/ui/app/resource_dashboard/resource_dashboard.tsto pass raw capacity resource types throughexpandResourceTypesWithParents.expandResourceTypesWithParentscases incmd/ui/app/resource_dashboard/resource_filter_test.tscovering parent synthesis/ordering, deduplication against an already-reported parent, and non-compound types (GPU and TPU).cmd/ui/app/resource_dashboard/resource_dashboard_test.tsverifying that when a queue only reportsnvidia.com/gpu: nvidia-tesla-a100, the dropdown offersnvidia.com/gpu, and selecting it displays the matching queue card.Assumptions
": "delimiter produced byformatCompoundAccelerator(cmd/rod_data_provider/kueue_resource_extractor.go) is handled. Its/passthrough branch only fires when the model already starts with<resource>/, which cannot happen because the model comes from a Kubernetes label value or ResourceFlavor name, neither of which may contain/. If the backend format changes, the picker simply won't synthesize a parent (no wrong filtering).Verification & Testing
bazel test //cmd/ui:ui_unit_tests(Passed: 694 of 694 Karma specs)../.githooks/pre-commit(Passed: Prettier, ESLint, license headers, affected-test scopenonefor UI-only change)../tools/analyze_diff_size.py --base-ref origin/main...(Split verifier not triggered; total diff is 4 files, +86/-11).expandResourceTypesWithParentsare exercised byresource_filter_test.ts; the end-to-end picker behavior is covered inresource_dashboard_test.ts. Screenshot baselines unchanged (mock data has no compound resource types)....dev environment viatools/dev_env/dev_env.py gke-upgrade; all pods healthy andverify_xmc.pypassed.Related Issues / Bugs
Follow-up to #605 and #643.
TAG=agy
CONV=deb14588-e33d-42bb-b180-9ad652e1a8fa