Closed mortent closed 2 years ago
/check-cla
/test cli-utils-presubmit-master
It seems like the TestApplier/apply_resource_with_existing_object_belonging_to_different_inventory test is flaking at times. I have created an issue for this and we can try to address that separately: https://github.com/kubernetes-sigs/cli-utils/issues/534
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: karlkfi, mortent
The full list of commands accepted by this bot can be found here.
The pull request process is described here
This updates the kstatus framework to better handle
context.Canceled
andcontext.DeadlineExceeded
. Currently, if the context is canceled or the deadline expires while calling theGet
orList
functions on the controller-runtime client, a context error is returned, but the status readers or the polling functionality doesn't handle this properly. The error is returned for every resource and the polling doesn't immediately stop. With this change, if the error returned from the ClusterReader is eithercontext.Canceled
orcontext.DeadlineExceeded
, the status reader will return those as a separate error instead of including it in the*event.ResourceStatus
. This is then handled appropriately by the poller to immediately stop work and return. This should address the issue referenced in https://github.com/fluxcd/pkg/blob/main/ssa/manager_wait.go#L89BREAKING CHANGE: The
ReadStatus
andReadStatusForObject
functions on theStatusReader
interface updated to return an error in addition to*event.ResourceStatus