Skip to content

Conversation

perdasilva
Copy link
Contributor

@perdasilva perdasilva commented Oct 10, 2025

Description

This PR updates the ClusterExtensionRevision to set the Available condition to Unknown with reason Archived and message revision is archived on archived revisions.

It also adds the AVAILABLE print column to the ClusterExtensionRevision for visibility in kubectl get clusterextensionrevision ...

NAME              AVAILABLE   AGE
test-operator-1   Unknown     17s
test-operator-2   True        3s

We also remove the condition setting on finalizer errors due to transience. No need to hit the api server on something that will in all likelihood be fixed in the next reconciliation.

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

Per Goncalves da Silva added 2 commits October 10, 2025 15:34
Signed-off-by: Per Goncalves da Silva <[email protected]>
@perdasilva perdasilva requested a review from a team as a code owner October 10, 2025 13:39
@openshift-ci openshift-ci bot requested review from OchiengEd and trgeiger October 10, 2025 13:39
Copy link

netlify bot commented Oct 10, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 0b26ee5
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/68e91abe5a30180007d3fb2a
😎 Deploy Preview https://deploy-preview-2261--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pedjak pedjak changed the title :spakles: Set Availability condition to Unknown on archived revisions ✨ Set Availability condition to Unknown on archived revisions Oct 10, 2025
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

❌ Patch coverage is 72.91667% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.85%. Comparing base (95c5934) to head (0b26ee5).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...controllers/clusterextensionrevision_controller.go 72.91% 11 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2261      +/-   ##
==========================================
- Coverage   72.87%   72.85%   -0.02%     
==========================================
  Files          88       88              
  Lines        8733     8738       +5     
==========================================
+ Hits         6364     6366       +2     
- Misses       1955     1957       +2     
- Partials      414      415       +1     
Flag Coverage Δ
e2e 39.30% <0.00%> (+0.05%) ⬆️
experimental-e2e 46.18% <52.08%> (-0.14%) ⬇️
unit 58.10% <60.41%> (+0.10%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


revision, opts, previous := toBoxcutterRevision(rev)

// nolint:nestif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's fix the reporting linting issue if possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't figure out a way to do it that made sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've moved the teardown procedure to its own method - that solved the problem

Comment on lines 157 to 175
meta.SetStatusCondition(&rev.Status.Conditions, metav1.Condition{
Type: "Available",
Type: ocv1.ClusterExtensionRevisionTypeAvailable,
Status: metav1.ConditionFalse,
Reason: "ReconcileFailure",
Reason: ocv1.ClusterExtensionRevisionReasonReconcileFailure,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO we do not need to report in the status if there is an error in removing finalizer, because such errors are transient. to this point we have archived the revision, and only thing left is to remove the finalizer (btw, why we would like to remove it, if deletion is not requested)?

Copy link
Contributor Author

@perdasilva perdasilva Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is unreasonable. But could we address it as a follow up to keep this PR as small as possible? Also, since I didn't really write this bit, it would be good to get Nico involved in the discussion (more so on the finalizer side). I don't have strong opinions here. Given that the resource is not managing anything and there's no need for the finalizer when archived, both can make sense - unless there's good reasons to block deletion if the controller isn't up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the condition setting - but let's come back to the finalizer on Monday

@perdasilva perdasilva force-pushed the revision-status branch 2 times, most recently from ceb0255 to 75853a8 Compare October 10, 2025 14:37
Per Goncalves da Silva added 2 commits October 10, 2025 16:38
@tmshort
Copy link
Contributor

tmshort commented Oct 10, 2025

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 10, 2025
Copy link
Contributor

@pedjak pedjak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 13, 2025
Copy link

openshift-ci bot commented Oct 13, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pedjak, tmshort

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

@tmshort
Copy link
Contributor

tmshort commented Oct 13, 2025

/override codecov/patch
/override patch

Copy link

openshift-ci bot commented Oct 13, 2025

@tmshort: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • patch

Only the following failed contexts/checkruns were expected:

  • Verify PR title
  • codecov/patch
  • crd-diff
  • e2e-kind
  • extension-developer-e2e
  • go-apidiff
  • go-verdiff
  • goreleaser
  • lint
  • netlify/olmv1/deploy-preview
  • tide
  • unit-test-basic
  • upgrade-e2e
  • verify

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

In response to this:

/override codecov/patch
/override patch

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-sigs/prow repository.

@perdasilva
Copy link
Contributor Author

/override codecov/patch

Copy link

openshift-ci bot commented Oct 13, 2025

@perdasilva: Overrode contexts on behalf of perdasilva: codecov/patch

In response to this:

/override codecov/patch

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-sigs/prow repository.

@pedjak
Copy link
Contributor

pedjak commented Oct 13, 2025

/override codecov/patch

shall we investigate this job?

@openshift-merge-bot openshift-merge-bot bot merged commit 05375cb into operator-framework:main Oct 13, 2025
25 of 26 checks passed
@tmshort
Copy link
Contributor

tmshort commented Oct 13, 2025

No, it was a matter of the size of the patch coverage. Admittedly, we have a threshold, and the difference (72% vs 76%) exceeded that.

@pedjak
Copy link
Contributor

pedjak commented Oct 14, 2025

No, it was a matter of the size of the patch coverage. Admittedly, we have a threshold, and the difference (72% vs 76%) exceeded that.

How strictly we try to keep the coverage on a certain level? cc @perdasilva

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.

3 participants