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
when updating status, do a live GET after conflict #1658
when updating status, do a live GET after conflict #1658
Conversation
pkg/operator/v1helpers/helpers.go
Outdated
err := retry.RetryOnConflict(retry.DefaultBackoff, func() error { | ||
_, oldStatus, resourceVersion, err := client.GetOperatorState() | ||
defer func() { | ||
numberOfFailedAttempts++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: to be accurate, this should be called numberOfAttempts
as it's going to be increased even on a success
a1945b6
to
bd5e34c
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, stlaz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@deads2k: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
…ateWithQuorum() * xref libray-go commit for details: openshift/library-go@bd5e34c, openshift/library-go#1658 Signed-off-by: Swarup Ghosh <swghosh@redhat.com>
…ateWithQuorum() * xref libray-go commit for details: openshift/library-go@bd5e34c, openshift/library-go#1658 Signed-off-by: Swarup Ghosh <swghosh@redhat.com>
…ateWithQuorum() * xref libray-go commit for details: openshift/library-go@bd5e34c, openshift/library-go#1658 Signed-off-by: Swarup Ghosh <swghosh@redhat.com>
…ateWithQuorum() * xref libray-go commit for details: openshift/library-go@bd5e34c, openshift/library-go#1658 Signed-off-by: Swarup Ghosh <swghosh@redhat.com>
…ateWithQuorum() * xref libray-go commit for details: openshift/library-go@bd5e34c, openshift/library-go#1658 Signed-off-by: Swarup Ghosh <swghosh@redhat.com>
The retry logic already existed, but relied on updating the cache. In runs like https://prow.ci.openshift.org/view/gs/test-platform-results/logs/periodic-ci-openshift-release-master-nightly-4.15-e2e-aws-sdn-cgroupsv2/1743684397107777536 (and others I've seen) this appears to be highly latent when observing the
messages. It's not likely to be connectivity since the updates are going through. The lister is still preferred, but after the first failure (made this easy to tune), the code does a live GET of the current state.
/assign @stlaz
eliminates the noise.