Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pagination settings (almost) ready for production #13159

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

richard-cox
Copy link
Member

@richard-cox richard-cox commented Jan 20, 2025

Summary

Fixes #13089

Occurred changes and/or fixed issues

  • Previously the ui-performance object ssp object contained a required set of resources to apply ssp to
  • This isn't workable going forward where the available resources will be updated between versions
    • i.e upgraded clusters won't get the new settings
  • Now the default is to use a the inbuilt default resources which can change between versions
  • Users can override if they wish (for preference OR in case of bugs)

Areas or cases that should be tested

  • Fresh system (or with /v3/settings/ui-performance value set to an empty string). No pagination anywhere
  • Check SSP on, no other changes. Pagination on for places like the home page
  • When running in dev, in performance page, use the defaults button and enable SSP to populate the resources with default. Pagination on for places like the home page. Tweak the resources (store object) like changing the context of the prov cluster to not include home (like homeaaa`). Pagination on home page should not be on

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

@richard-cox richard-cox added this to the v2.11.0 milestone Jan 20, 2025
@richard-cox richard-cox self-assigned this Jan 20, 2025
@richard-cox
Copy link
Member Author

richard-cox commented Jan 23, 2025

TBD. With all the resource.changes issues it feels like having the Performance setting OFF but the vai cache ON is not a viable configuration. The perf setting enabled/disabled should just be removed and everything should just be gated on vai cache and perf setting resource list.

Previously the perf enabled/disabled flags controlled disabling the incompatible features as well, so need to ensure they are ignored if vai cache on (and inform user in perf page).

Update: The above is true, but a lot of work (where settings are read they need to override given others), so the pagination setting and feature flag will remain separate atm

@richard-cox richard-cox force-pushed the pagination-settings-update branch from d42522c to 387a4bb Compare February 4, 2025 16:20
@richard-cox richard-cox force-pushed the pagination-settings-update branch 2 times, most recently from 1d50efa to 7f7feb4 Compare February 26, 2025 16:18
@richard-cox richard-cox marked this pull request as ready for review February 26, 2025 16:57
applicable: "This applies to the following resource types"
checkboxUseDefault:
label: Enable Custom Resources
placeholder: Customize the resources that server-side pagination applies to. This is an advanced feature and must be managed outside of the UI. Customized resource types are not updated on Rancher upgrade and must be manually changed.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would think we'd like to link to some docs so the user can do this if they so choose.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good comment!

We're on a big push for a cleaner UI and stuff like this is pretty advanced, we wouldn't expect users to exercise it without direct instruction / instructions from us anyway. With all that in mind just nuked it.

@@ -189,11 +199,15 @@ export default {
});
},
setPaginationDefaults() {
sspApplyDefaults(defaultStore) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I understand what you're doing here but from a user perspective I find how we apply defaults jarring.

jarring.mp4

I expected to set the resources to the default not all the settings. I wanted to look at the resources to see if anything changed but everything got disabled and closed.

Copy link
Member Author

Choose a reason for hiding this comment

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

This was just a convenience thing for development (gated on isDev), removed

Copy link
Contributor

@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.

The changes work and the suggestions I have are minor, we also won't have these settings on by default so feel free to merge given the time we have left.

- 'almost' applies to enabling SSP by default
- Previously the ui-performance object contained a required set of resources to apply SSP to
- This isn't workable going forward where the available resources will be updated between versions
- Now the default is to use a set of default resources which can change between versions
- Users can override if they wish
 error  in ../../shell/plugins/steve/steve-pagination-utils.ts:37:50

TS2339: Property 'name' does not exist on type 'Namespace'.
    35 |       if (hideObscure || hideSystem) {
    36 |         res.push(PaginationParamFilter.createSingleField({
  > 37 |           field: 'metadata.namespace', value: ns.name, equals: false
       |                                                  ^^^^
    38 |         }));
    39 |       }
@richard-cox richard-cox force-pushed the pagination-settings-update branch from 5254ce5 to dcea7c6 Compare February 27, 2025 09:01
…e reliability

- there's some flakeyness in the test
- running it locally though crashes cypress browser session
- split into three to improve tests, which now pass locally
- bring back 'liable to change' notice and add 'not in prod'
- move location down below long term settings
@richard-cox
Copy link
Member Author

@codyrancher ok, think changes are done now. i've got e2e tests passing and also brought back the warning message given SSP is not on by default

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.

Server-side Pagination: Tidy up settings
2 participants