Skip to content
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

Merged

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Jan 9, 2024

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

base_controller.go:268] ConsoleOperator reconciliation failed: Operation cannot be fulfilled on consoles.operator.openshift.io "cluster": the object has been modified; please apply your changes to the latest version and try again

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.

@openshift-ci openshift-ci bot requested review from mfojtik and soltysh January 9, 2024 19:58
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 9, 2024
err := retry.RetryOnConflict(retry.DefaultBackoff, func() error {
_, oldStatus, resourceVersion, err := client.GetOperatorState()
defer func() {
numberOfFailedAttempts++
Copy link
Member

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

@stlaz
Copy link
Member

stlaz commented Jan 10, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 10, 2024
Copy link
Contributor

openshift-ci bot commented Jan 10, 2024

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

openshift-ci bot commented Jan 10, 2024

@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.

@openshift-merge-bot openshift-merge-bot bot merged commit 07ee1a4 into openshift:master Jan 10, 2024
4 checks passed
swghosh added a commit to swghosh/cert-manager-operator that referenced this pull request Apr 22, 2024
…ateWithQuorum()

* xref libray-go commit for details: openshift/library-go@bd5e34c,
  openshift/library-go#1658

Signed-off-by: Swarup Ghosh <swghosh@redhat.com>
swghosh added a commit to swghosh/cert-manager-operator that referenced this pull request Apr 22, 2024
…ateWithQuorum()

* xref libray-go commit for details: openshift/library-go@bd5e34c,
  openshift/library-go#1658

Signed-off-by: Swarup Ghosh <swghosh@redhat.com>
swghosh added a commit to swghosh/cert-manager-operator that referenced this pull request Apr 22, 2024
…ateWithQuorum()

* xref libray-go commit for details: openshift/library-go@bd5e34c,
  openshift/library-go#1658

Signed-off-by: Swarup Ghosh <swghosh@redhat.com>
swghosh added a commit to swghosh/cert-manager-operator that referenced this pull request Apr 22, 2024
…ateWithQuorum()

* xref libray-go commit for details: openshift/library-go@bd5e34c,
  openshift/library-go#1658

Signed-off-by: Swarup Ghosh <swghosh@redhat.com>
swghosh added a commit to swghosh/cert-manager-operator that referenced this pull request Apr 26, 2024
…ateWithQuorum()

* xref libray-go commit for details: openshift/library-go@bd5e34c,
  openshift/library-go#1658

Signed-off-by: Swarup Ghosh <swghosh@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants