Skip to content

Conversation

@richard-cox
Copy link
Member

@richard-cox richard-cox commented Nov 4, 2025

Summary

Fixes #15853

Occurred changes and/or fixed issues

  • a list may need secondary resources
  • these can either be to support the whole list (fetchSecondaryResources), or an individual page (fetchPageSecondaryResources)
  • for fetchSecondaryResources, often used when SSP is disabled, the list will call it concurrently with fetching the primary resource
  • however as soon as the primary resource was fetched, before the secondary resources were fetched, the list would calculate the first page
  • if the page depends on secondary resources for sorting/filtering then they would be missed
    • the home page shows prov clusters but then sorts them on mgmt clusters name
    • the mgmt clusters are fetched as secondary resources
    • the list was showing the prov clusters before the mgmt clusters were fetched and sorting on prov cluster id instead of mgmt cluster spec.displayName
  • fix
    • instead of fetching both primary at secondary in parallel fetch in sequence
    • this ensure the initial sort/filter is correct

Technical notes summary

  • this change does mean other usages of fetchSecondaryResources are affected, however looking at their comments it seems having a guaranteed order (secondary --> show list) is preferred

Areas or cases that should be tested

  • as per issue

Areas which could experience regressions

  • vai on and off
    • ingress, service lists
  • vai off
    • node, persistent volume lists

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes
  • The PR has been reviewed in terms of Accessibility
  • The PR has considered, and if applicable tested with, the three Global Roles Admin, Standard User and User Base

…sources

- a list may need secondary resources
- these can either be to support the whole list (fetchSecondaryResources), or an individual page (fetchPageSecondaryResources)
- for fetchSecondaryResources, often used when SSP is disabled, it was trying to block loading of the list on the primary resource and secondary resource fetch
- however as soon as the primary resource was fetched, before the secondary resources compelted, the list would render the page
- if the page depends on secondary resources for sorting/filtering then they would be missed
- fix
  - instead of fetching both primary at secondary in parallel fetch in sequence
  - this ensure the initial sort/filter is correct
@richard-cox richard-cox force-pushed the fix-home-page-cluster-list-sort branch from 281fb62 to 3a98bc4 Compare November 4, 2025 14:44
@richard-cox richard-cox marked this pull request as ready for review November 4, 2025 14:54
@richard-cox richard-cox requested a review from aalves08 November 4, 2025 14:55
Copy link
Member

@aalves08 aalves08 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@richard-cox richard-cox merged commit 5affe53 into rancher:master Nov 5, 2025
91 of 96 checks passed
@richard-cox richard-cox deleted the fix-home-page-cluster-list-sort branch November 5, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Home page cluster list displays incorrect initial sort order

2 participants