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

NETOBSERV-1076 Fix CR stuck in Updating state [1.3 backport] #375

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

jotak
Copy link
Member

@jotak jotak commented Jun 15, 2023

Backport of #374

The problem was that copying certificates across namespaces was done on every reconciliation call, with or without digest change. This is not a critical issue as it would only trigger a no-op update, but it was screwing up our "updating" state detection.

There's actually two changes in this commit:

  1. Fixing the "Updating" flag, so that it's not set when an update is actually performed (we need to fetch back the object (from cache) and check if the resource version was actually modified)
  2. Fixing the certificate watching process to avoid unnecessary tries to update

Also:

  • Add / fix tests
  • Modify some logs to make important information more visible
  • Makefile change for building manifest without error (unrelated)

The problem was that copying certificates across namespaces was done on
every reconciliation call, with or without digest change. This is not
a critical issue as it would only trigger a no-op update, but it was
screwing up our "updating" state detection.

There's actually two changes in this commit:
1. Fixing the "Updating" flag, so that it's not set when an update is
   actually performed (we need to fetch back the object (from cache) and
check if the resource version was actually modified)
2. Fixing the certificate watching process to avoid unnecessary tries to
   update

Also:
- Add / fix tests
- Modify some logs to make important information more visible
- Makefile change for building manifest without error (unrelated)
@codecov
Copy link

codecov bot commented Jun 15, 2023

Codecov Report

❗ No coverage uploaded for pull request base (release-1.3@ab739eb). Click here to learn what that means.
The diff coverage is n/a.

@@              Coverage Diff               @@
##             release-1.3     #375   +/-   ##
==============================================
  Coverage               ?   54.17%           
==============================================
  Files                  ?       45           
  Lines                  ?     5403           
  Branches               ?        0           
==============================================
  Hits                   ?     2927           
  Misses                 ?     2272           
  Partials               ?      204           
Flag Coverage Δ
unittests 54.17% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

@msherif1234
Copy link
Contributor

/lgtm

@Amoghrd
Copy link
Contributor

Amoghrd commented Jun 20, 2023

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Jun 20, 2023
@jotak jotak added ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. and removed ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. labels Jun 20, 2023
@jotak
Copy link
Member Author

jotak commented Jun 20, 2023

@Amoghrd I think we didn't backport to 1.3 branch the various fixes that we did regarding the ok-to-test workflow ... so maybe it can be verified post-merge, on the downstream build directly? (given you verified already the PR on main)

@Amoghrd
Copy link
Contributor

Amoghrd commented Jun 20, 2023

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved QE has approved this pull request label Jun 20, 2023
@jotak
Copy link
Member Author

jotak commented Jun 20, 2023

/approve

@openshift-ci
Copy link

openshift-ci bot commented Jun 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jotak

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

@jotak jotak merged commit fd0733a into netobserv:release-1.3 Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. qe-approved QE has approved this pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants