- Moving the store setting to enable/disable filtering in the store to a function in a computed property caused havoc for churn
- Make this much neater by moving flag to the setup stage for both ns filter
- Given forced filtering is now not resource dependent have a high level utils function to determine if enabled
- This should have opened up the door to setting a nicer default then ALL_USER, however it's actually initially applied somewhere other than ns filter
- Fixed a bug where the all option [] was valid
> This uses a new endpoint that has yet to merge. See https://github.com/rancher/rancher/issues/40140
WIP
- Contains console.warns (via custom logger, can be disabled)
- Waiting for final BE endpoint changes to merge
- Contains TODOs to resolve on final enpoint changes delivered
Pertinent Points
- Incompatible with incremental loading / manual refresh
- Harder to get counts (need to sum up from different namespaces)
- Requires use of new steve pagination
- Enforced NS threshold has been removed
- The threshold only applies to the primary resource. This has issues when loading a low count primary (daemon sets) which depends on a very high count secondary (pods)
- Fixing this would involve knowing all secondary resources a list uses, which isn't currently possible (each resource is requested individually, need to know them all first)
- There is no way to subscribe to multiple namespaces (one or all)
- We mock this in subscribe by only persisting changes to resources from within target namespaces
- Everything should work with Advanced Worker enabled
* update resource fetching on list views so that secondary resources follow the logic of manual refres
h and/or incremental loading if the main resource defines it
* Update resource-fetch logic to take into consideration the storeType for each individual request + fix logic regarding namespace for fetching resources + update missing resources logic (nodes and prov clusters)
* fix tipo
* reinstate hash system to handle requests for nodes and prov cluster lists
* revert mutation code + add check to register type if it doesnt exist on loadDataPage action
* fix issue with timeout that wasnt working properly for the update of live and delayed cols after manual refresh
* Take in to account the per resource count when calculating `limit`
- This means primary resources with a smaller amount don't restrict secondary resources with larger amounts
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Richard Cox <richard.cox@suse.com>
- caused by circular dependency of
- index.vue --> resource-fetch mixin --> resource-fetch-namespaced mixin --> index.vue
- not sure why the works on most pages... but bugs out for this one... but the fix makes sense
- This might be possible (as fleet workspaces are similar to namespaces
- To address though would need to re-fetch resources when workspace changes
- Currently when ns changes we always go to an invalid state first
- Single NS (show list & fetch resources) --> Multiple NS (hide list) --> Single NS (show list & fetch resources)
- For workspace we skip the middle part and don't fetch with latest
- When there are over a configurable amount of resources to display in a list force the user to select a single namespace and use it to fetch resources related to the list
- Disabled by default, this can be enabled via the usual Global Settings --> Performance setting as usual
Functional Comments
- Gates for forcing the filter (count, resource type is namespaced, etc) apply only to the resources shown in the list.
- For example PV's aren't namespaced, so no enforced filtering. However they fetch PVC's which are namespaced
- For example we could have 10 resources to show in the list, but the resource types list component fetches 10000 other resources. The secondary resources are not taken in to account
- If we're under the threshold and have fetched all resources, if in that session we go over the threshold we won't fetch NS specific resources (because we have them all already)
- If we're over the threshold and have fetched namespaced resources, if in that session we go under the threshold we will fetch all resources
- If we're over the threshold and have fetched namespaced resources, going to a page that needs them all will result in us fetching them all (for instance from `events` to `cluster dashboard`)
- Deselecting a namespace and selecting it again should not kick off another http request
General Commit Comments
- The threshold to enforce the filter is set at 1500 as per manual fresh and incremental loading
- Optimised some code in ResourceList, resource-fetch and $loadingResources