Skip to content

Conversation

@richard-cox
Copy link
Member

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

Summary

Fixes #15846

Occurred changes and/or fixed issues

  • two store getters expected the store to contain all clusters and then find the local cluster from that list
    • isMultiCluster
    • isStandaloneHarvester
  • when ssp is enabled for cluster side nav no longer up front fetches all clusters
  • this means both getters could not find the local cluster
    • isMultiCluster was always incorrectly false
    • isStandaloneHarvester also feeds into
  • both getters were used to determine things in harvester, like the visibility of the side bar in standalone mode (incorrectly shown)
  • this is now fixed
    • functional changes are all in shell/store/index
    • when ssp is enabled we manually fetch local cluster
    • when ssp is disabled we already get all clusters
    • in both worlds we now cache the local cluster
    • this is then used straight away to determine harvester single product stuff
    • the cached copy is then used
      • in isMultiCluster, and we also get the count from COUNT resource instead of stored list
      • in isStandaloneHarvester
      • also used in the dynamic content world
  • Tidying up
    • fix regression where header.vue wasn't using correct getter to determine if toplevelmenu was shown
    • added clarification on where IF_HAVE.MULTI_CLUSTER was used (not in dashboard, but an extension)
    • snuck in an update to api docs

Technical notes summary

Areas or cases that should be tested

  • Standalone Mode - point the harvester extension at the PR and run in standalone mode.
    • setup steps
    • validate
      • the side bar (clusters, global products, settings, etc) should not be visible
      • RBAC group should not visible
      • Projects/Namespaces not visible, Namespaces visible
      • Create namespace should not show resource limit and PSA tabs
  • Embedded Mode - run the PR against a cluster with a harvester cluster imported to it
  • with both vai on and off
    • Request to https://updates.rancher.io/rancher/community/updates should contain lkv, lcp, and lnc query params (this request is made once a day, to repeat request again delete the rancher-updates-fetch-next local storage entry)

Areas which could experience regressions

  • top level menu placement (given it depends on isMultiCluster)
  • users who don't have access to the local cluster should still be able to log in and use the dashboard

Screenshot/Video

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

… don't fetch all clusters

- isMultiCluster depended on the store containing all clusters
- when ssp is enabled for cluster side nav we now no longer fetch all clusters
- this meant isMultiCluster was always incorrectly false and broke harvester standalone
  - it counted on the store containing all clusters to determine cluster count and find local cluster
- this is now fixed
  - functional changes in shell/store/index
  - when ssp is enabled we manually fetch local cluster and cache it
  - this is then used straight away to determine harvester single product stuff
  - the cached copy is then used in isMultiCluster, and we get the count from COUNT resource
  - the cached copy is also used in the dynamic content world
- Tidying up
  - fix regression where header.vue wasn't using correct getter to determine if toplevelmenu was shown
  - added clarrification on where IF_HAVE.MULTI_CLUSTER was used (not in dashboard, but an extension)
  - snuck in an update to api docs
@richard-cox richard-cox added this to the v2.13.0 milestone Nov 3, 2025
@richard-cox richard-cox self-assigned this Nov 3, 2025
@richard-cox richard-cox marked this pull request as ready for review November 4, 2025 12:05
@richard-cox richard-cox requested review from a110605 and nwmac November 4, 2025 12:05
return isAdminUser(getters);
}
case IF_HAVE.MCM_DISABLED: {
case IF_HAVE.MCM_DISABLED: { // There's a general MCM ff, this is conflating it with a harvester concept
Copy link
Member

Choose a reason for hiding this comment

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

Typo ff -> off.

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, i should have expanded that. ff here means Feature Flag.

I'll sneak an update in another PR

Copy link
Member

@a110605 a110605 left a comment

Choose a reason for hiding this comment

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

Tested with harvester standalone UI is good. The sidebar doesn't display.

image

@richard-cox richard-cox merged commit 5b9c214 into rancher:master Nov 5, 2025
44 of 49 checks passed
@richard-cox richard-cox deleted the fix-is-multi-cluster 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.

Unexpected sidebar pops up in harvester standalone UI

3 participants