Skip to content

Conversation

@richard-cox
Copy link
Member

@richard-cox richard-cox commented Dec 18, 2025

Summary

Fixes #16215

Occurred changes and/or fixed issues

Reduce the length of the filter used in SSP lists two ways

  1. use the NOTIN/IN equalities for all user + all system namespace filters.
    • This was previously done but only for filtering out obscure namespaces (Reduce the url length of requests used to support lists #16031)
    • However we were left in the case where the obscure filters were shortened... but the all user / all system filters increased the bloat again
    • Solution is to also use NOTIN/IN for for all user / all system filters
  2. reduce duplicates when filtering by obscure namespaces AND user/system namespaces
    • Instead of helper functions creating the filters and then combining them all together (with dupes) create a map with required in/out namespaces and at the end convert that to filters

Technical notes summary

Before - 948 chars

filter=metadata.namespace NOTIN (c-7sqjx,c-7sqjx-p-b8nfr,c-7sqjx-p-vzbhd,p-8nw96,p-tr99n)
filter=metadata.namespace=c-7sqjx,metadata.namespace=c-7sqjx-p-b8nfr,metadata.namespace=c-7sqjx-p-vzbhd,metadata.namespace=cattle-capi-system,metadata.namespace=cattle-fleet-clusters-system,metadata.namespace=cattle-fleet-local-system,metadata.namespace=cattle-fleet-system,metadata.namespace=cattle-global-data,metadata.namespace=cattle-impersonation-system,metadata.namespace=cattle-local-user-passwords,metadata.namespace=cattle-system,metadata.namespace=cattle-turtles-system,metadata.namespace=cattle-ui-plugin-system,metadata.namespace=cluster-fleet-default-c-7sqjx-10ee7a6fee14,metadata.namespace=cluster-fleet-local-local-1a3d67d0a899,metadata.namespace=fleet-default,metadata.namespace=fleet-local,metadata.namespace=kube-node-lease,metadata.namespace=kube-public,metadata.namespace=kube-system,metadata.namespace=p-8nw96,metadata.namespace=p-tr99n

After - 408 chars (the saving will scale bigger the more obscure + system namespaces there are)

filter=metadata.namespace IN (cattle-capi-system,cattle-fleet-clusters-system,cattle-fleet-local-system,cattle-fleet-system,cattle-global-data,cattle-impersonation-system,cattle-local-user-passwords,cattle-system,cattle-turtles-system,cattle-ui-plugin-system,cluster-fleet-default-c-7sqjx-10ee7a6fee14,cluster-fleet-local-local-1a3d67d0a899,fleet-default,fleet-local,kube-node-lease,kube-public,kube-system)

Areas or cases that should be tested

Exactly the same steps as in #16029

Areas which could experience regressions

Also as per #16029 (This changes the way requests that are used to populate resource lists are formulated, so pretty much any namespaces resource's list)

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

- Reduce the length of the filter used in SSP lists two ways
- 1. use the NOTIN/IN equalities for system namespaces. This was previously done only for obscure namespaces (rancher#16031)
- 2. reduce duplicates when filtering by obscure namespaces AND user/system namespaces
@richard-cox richard-cox force-pushed the pagination-fix-url-length-system branch from b1ec772 to 8ed3610 Compare December 18, 2025 15:52
@richard-cox
Copy link
Member Author

/backport v2.13.2 release-2.13

@richard-cox
Copy link
Member Author

/backport v2.12.6 release-2.12

Copy link
Member

@codyrancher codyrancher left a comment

Choose a reason for hiding this comment

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

By any chances is there a plan to move to requests that support bodies?

There's still theoretical clusters where url scaling could become an issue.

@richard-cox
Copy link
Member Author

The long term plan is to have both obscure and system filtering done server side.

rancher/rancher#52858

We might also have a better way to filter system resources soon - #16204

@richard-cox richard-cox merged commit abd8683 into rancher:master Dec 19, 2025
91 of 98 checks passed
@richard-cox richard-cox deleted the pagination-fix-url-length-system branch December 19, 2025 09:52
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.

Reduce the url length of requests used to support lists - system namespaces

2 participants