Fix stale management cluster resources #8224
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #7819
Fixes #7815
Occurred changes and/or fixed issues
There's a number of 'stale' screen content when creating an RKE2 DO cluster, adding/removing machine pools (deployments) and scaling up/down a pool (deployment). Stale content covers
The only consistent way to reproduce any of these, is to scale down the last remaining machine in a second pool (deleted machine stays in second pool) and from the same cluster state edit the cluster to have one in the second pool and nav quickly to the cluster detail page (new machine does not show in pool two). For the others, it's just about getting lucky/unlucky when creating/editing/removing clusters and pools, and scaling pools.
From what I can tell there's three causes
Fixes
resource.stop
a resource sub and us trying to start it again.too old
(stop probably came from change of permision) it should mean we get all required resource change messages promptlytoo old
(stop probably came from 30 min socket death) it means we'll re-fetch entire state and re-watch from that revisionTechnical notes summary
Workings out - rancher/rancher#40558 (comment)
Areas or cases that should be tested
Areas which could experience regressions