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

Remove usages of findAll for types supported by server-side pagination #10795

Merged
merged 64 commits into from
Jun 5, 2024

Conversation

richard-cox
Copy link
Member

@richard-cox richard-cox commented Apr 12, 2024

Blocked on #10786

Summary

Contributes to #9964

Occurred changes and/or fixed issues

In Addition

  • With the steve cache enabled the Workflow Workloads list should not be navigatable. This will be replaced at some point with an overview page
  • Fixed Rancher Backups --> Backups, Resource --> Create/edit page bottom bar (was not stuck to bottom)

Technical notes summary

  • There's two temp bools in shell/utils/pagination-utils.ts, TEMP_VAI_CACHE_MERGED and TEMP_PERF_ENABLED. These will be removed pre 2.9.0 when the steve cache is merged and we can just run on the FF and perf setting to enable/disable the features
  • For this PR would recommend
    • Provision Rancher with the vai image (available on request)
    • Enable the steve cache Feature Flag
    • Enable pagination via the Performance setting

Areas or cases that should be tested

  • PR wise with the new vai cache image and everything enabled. In addition maybe a bit with it disabled. QA should be looking at more thorough tests as per below

Areas which could experience regressions

With both the performance pagination setting and feature flag off

  • Harvester Machine Config gets correct config maps. Cluster Management --> Cluster list --> Create --> RKE2 Harvester --> User Data Template and Network Data Template contains correct config maps
  • New ResourceLabeledSelectcontinues to work. Nav tolocalcluster -->Cluster Tools-->Rancher Backup Install--> Next -->Use an SE-compatible object store-->Credential Secret should show values
  • SelectOrCreateAuthSecret continues to work. Nav to local cluster --> Apps --> Repositories --> Rancher row Edit Config --> http(s) URL to an index generaed by Helm --> Authentication user can create either type and also select an existing one
  • Cloud Credential API Key field correctly populates. (cloud creds should exist, type shouldn't matter ) Cluster management --> Cloud Credential --> API Key column should be populated
  • Ingress target should load correctly. Nav to local cluster --> Service Discovery --> Ingresses --> The Target columns should contain /
  • Ingress workflow detail page shows Certificate link. Nav to local cluster --> Service Discovery --> Ingress --> click on rancher --> Rules tab --> confirm Certificate column is populated
  • Ingress create/edit Certifcate secret selection works correct. Nav to local cluster --> Service Discovery --> Ingresses --> Create --> Certificates tab --> Certificate - Secret Name contain at least one option Default Ingress Controller Certificate and changing the namespace to kube-system should then reveal another option (depends on kube flavour, on k3s its k2s-serving).
  • Node Pods list is populated. Nav to local cluster --> Cluster --> Nodes --> click on any node --> Pods tab --> Confirm the pods list is populated
  • Backup Encryption key can be selected. Nav to local cluster --> (install Rancher Backups) --> Rancher Backups --> Backups --> Create --> Encryption --> Select Encrypt backsps using... --> Drop down below should be populated (conditions for secrets in tooltip must be met)
  • Restore Credential secret can be selected. Nav to local cluster --> (install Rancher Backups) --> Rancher Backups --> Restore --> Create --> Select An S3-compatible bject store --> Drop down below should be populated
  • ServiceAccounts secret can be selected. Nav to local cluster --> (ensure a secret of type kubernetes.io/dockerconfigjson has been created in a specific namespace) --> More Resources --> ServiceAccounts --> Create --> select specific namespace --> Service Account tab --> Pull Secrets should contain secret. Changing the namespace should result in the correct secrets relative to that namespace
  • Project Montioring CRUD is not broken. Nav to local cluster --> (Install monitoring and prometheus federator apps) --> Monitoring --> Project Monitoring --> can succesfully create and view one

The above should be repeated with the performance pagination setting and feature flag on. In Addition

  • With the steve cache enabled the Workflow list should not be navigatable. This will be replaced at some point with an overview page

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

- New visuals
- Pagination controls --> load more
- finished testing of label select with pagination off

# Conflicts:
#	shell/edit/provisioning.cattle.io.cluster/__tests__/Basics.tests.ts
- Setup pagination headers for the node type
- Define a pattern for fetching custom list secondary resources
- Major improvements to the way pagination settings are defined and created
- Lots of docs improvements
- Handle calling fetch again once fetch is in progress (nuxt caches running request)
- Validate filter fields (not all are supported by the vai cache
- General pagination fixes
- fix syntax
- catch scenario where a pr has no fixed issue

> There's duplication between files, see rancher#10534
- Everything is gated on `on-disk-steve-cache` feature flag
  - There's a backend in progress item to resolve a `revision` issue, until then disable watching a resource given it
- Global Settings - Performance
  - Added new setting to enable server side pagination
  - this is incompatible with two other performance settings
… form

Also
- improved labeled select pagination
- gate label select pagination functinality on steve cache being enabled
- project monitoring (and bug fixes)
- temp step until we get new overview
@richard-cox richard-cox added this to the v2.9.0 milestone Apr 12, 2024
@richard-cox richard-cox self-assigned this Apr 12, 2024
@richard-cox richard-cox changed the title Remove usages of findAll for types used in new pagination process Remove usages of findAll for types used in server-side pagination process Apr 12, 2024
@richard-cox richard-cox changed the title Remove usages of findAll for types used in server-side pagination process Remove usages of findAll for types used in server-side pagination Apr 12, 2024
@richard-cox richard-cox changed the title Remove usages of findAll for types used in server-side pagination Remove usages of findAll for types supported by server-side pagination Apr 12, 2024
@richard-cox richard-cox added the ci/skip-e2e Forcibly skip E2E tests in the CI label May 22, 2024
@richard-cox richard-cox removed the ci/skip-e2e Forcibly skip E2E tests in the CI label May 30, 2024
@richard-cox
Copy link
Member Author

@codyrancher @nwmac I'm having fun getting this one passed the gates (some might be geniune, but a lot of other prs are currently failing). The code should hopefully remain unchanged, would it be possible to review now to save time?

@richard-cox richard-cox marked this pull request as ready for review June 4, 2024 09:39
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.

I didn't verify Harvester or S3 due to access.

From what I could verify it looks like we're still populating resources just fine.

Do you have a script or something for generating the resources in the future? It's fairly time consuming testing something like this.

@richard-cox
Copy link
Member Author

@codyrancher Yeah there's a few requirements on certain types of secrets. I'm aiming to have some e2e tests where we can upload resources via YAML to populate pages.

@richard-cox richard-cox merged commit a5661c5 into rancher:master Jun 5, 2024
26 checks passed
@richard-cox richard-cox deleted the pagination-findall branch June 5, 2024 08:15
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.

2 participants