Skip to content

Conversation

dtfranz
Copy link
Contributor

@dtfranz dtfranz commented Sep 10, 2025

Sets a limit to the number of previous ClusterExtensionRevisions we keep in the cluster, and trims the list of previous revisions when creating new revisions to stay at the limit. The limit has been set to 5 for now. Any revisions beyond this limit will be removed from the cluster EDIT: unless they are active.

Description

Reviewer Checklist

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

@dtfranz dtfranz requested a review from a team as a code owner September 10, 2025 13:47
Copy link

netlify bot commented Sep 10, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit b640387
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/68c3ecb19a92a3000825c52f
😎 Deploy Preview https://deploy-preview-2204--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.

Copy link

codecov bot commented Sep 10, 2025

Codecov Report

❌ Patch coverage is 76.19048% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.98%. Comparing base (1821160) to head (b640387).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
internal/operator-controller/applier/boxcutter.go 76.19% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2204      +/-   ##
==========================================
- Coverage   72.09%   71.98%   -0.12%     
==========================================
  Files          85       85              
  Lines        8401     8457      +56     
==========================================
+ Hits         6057     6088      +31     
- Misses       1941     1961      +20     
- Partials      403      408       +5     
Flag Coverage Δ
e2e 39.14% <0.00%> (-0.25%) ⬇️
experimental-e2e 46.08% <23.80%> (-0.07%) ⬇️
unit 56.84% <76.19%> (-0.01%) ⬇️

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.

@tmshort
Copy link
Contributor

tmshort commented Sep 11, 2025

You may need to rebase to get past the upgrade-experimental-e2e failure.

@dtfranz dtfranz force-pushed the boxcutter-revision-limit branch from 0686423 to 33610fa Compare September 11, 2025 04:28
@dtfranz
Copy link
Contributor Author

dtfranz commented Sep 11, 2025

You may need to rebase to get past the upgrade-experimental-e2e failure.

Thanks! It's passing now.

@perdasilva
Copy link
Contributor

/approve

Copy link

openshift-ci bot commented Sep 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: perdasilva

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

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

tmshort commented Sep 11, 2025

Should the title be s/CRE/CER/g?

@tmshort tmshort changed the title ✨ CRE Previous Limit ✨ CER Previous Limit Sep 11, 2025
@dtfranz dtfranz force-pushed the boxcutter-revision-limit branch 3 times, most recently from 331cc7c to 55ed73c Compare September 12, 2025 08:05

// setPreviousRevisions populates spec.previous of latestRevision, trimming the list of previous _archived_ revisions down to
// ClusterExtensionRevisionPreviousLimit or to the first _active_ revision and deletes trimmed revisions from the cluster
func (bc *Boxcutter) setPreviousRevisions(ctx context.Context, latestRevision *ocv1.ClusterExtensionRevision, revisionList []ocv1.ClusterExtensionRevision) error {
Copy link
Contributor

@perdasilva perdasilva Sep 12, 2025

Choose a reason for hiding this comment

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

should we call out that we expect revisionList to be sorted by revision number?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call, I'll add a comment here!

Sets a limit to the number of previous ClusterExtensionRevisions we keep in the cluster, and trims the list of previous revisions when creating new revisions to stay at the limit. The limit has been set to 5 for now. Any revisions beyond this limit will be removed from the cluster.

Signed-off-by: Daniel Franz <dfranz@redhat.com>
@dtfranz dtfranz force-pushed the boxcutter-revision-limit branch from 55ed73c to b640387 Compare September 12, 2025 09:49
@perdasilva
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 12, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 8c42457 into operator-framework:main Sep 12, 2025
23 checks passed
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