Fix findlabelSelector when vai enabled but resource type not supported#16734
Merged
richard-cox merged 1 commit intorancher:masterfrom Feb 26, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes labelSelector-based lookups when the Steve cache (VAI) is enabled by ensuring the code paths use the cache-backed pagination API rather than the legacy labelSelector request parameter, which is not supported in that mode.
Changes:
- Switch
findLabelSelectorand selector-typedmatching()to treat VAI enablement as the deciding factor (instead of per-type SSP enablement). - Fix selector/page caching bookkeeping so the store’s “what’s cached” record matches what is actually in the cache.
- Update
matchingLabelSelectorbehavior and add unit tests to cover key cache scenarios; also restore fetching Services in workload detail to populate related-services.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
shell/utils/selector-typed.ts |
Uses VAI enablement to choose findPage vs local filtering when matching label selectors. |
shell/plugins/dashboard-store/actions.js |
Updates findLabelSelector to use findPage whenever VAI is enabled. |
shell/plugins/dashboard-store/mutations.js |
Resets cache “haveX” tracking when loading selector results to avoid stale/incorrect selector bookkeeping. |
shell/plugins/dashboard-store/getters.js |
Adjusts matchingLabelSelector behavior when the cache contains a VAI page or all resources. |
shell/plugins/dashboard-store/__tests__/getters.test.ts |
Adds tests for matchingLabelSelector decision logic. |
shell/detail/workload/index.vue |
Fetches Services in the workload namespace so relatedServices can be resolved. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- vai on - old style not supported, so always use new style - so ignore if type is ssp enabled or not, just look at feature flag
34a82ef to
4ab442f
Compare
codyrancher
approved these changes
Feb 26, 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
Fixes #16621
Occurred changes and/or fixed issues
Technical notes summary
typeis not SSP enabledcatalog.cattle.io.clusterrepocluster.x-k8s.io.machinesetmatchingfnAreas or cases that should be tested
cluster.x-k8s.io.machinesetreturn 1 result when...Scale down.Areas which could experience regressions
Screenshot/Video
Checklist
Admin,Standard UserandUser Base