Remove refreshes from reconcile functions #451
Closed
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.
Fix #450
I gave this a local test as 0.25.0-pre.3 and it didn't seem to harm anything!
If I made the source and the kustomization both visible, then they are both still visible after reconcile with source. There should be no need to call refresh, if we have sent async reconciles to the resource, and all visible resources are already in the informer's subscriptions, then I think we don't need to call refresh, we'll just get a callback when it's happening.
In my test, this made it possible to briefly observe the Kustomization's temporary unready state while it was reconciling. The git repo was definitely reconciled through the command, but the visible representation didn't budge, possibly because I was reconciling a repo that had no changes, so there was never going to be any progress to report from the Git Repository's end.
I will test this more, if there are other calls to refresh we should remove them too. I think we generally don't need to call that function anymore, except for as a response to the user's request when they manually click the button to ask for a refresh.