Skip to content

🐛 OCPBUGS-78092: fix: stale deprecation conditions after ClusterExtension upgrade#2590

Open
camilamacedo86 wants to merge 1 commit intooperator-framework:mainfrom
camilamacedo86:fix-refresh-deprecate-status
Open

🐛 OCPBUGS-78092: fix: stale deprecation conditions after ClusterExtension upgrade#2590
camilamacedo86 wants to merge 1 commit intooperator-framework:mainfrom
camilamacedo86:fix-refresh-deprecate-status

Conversation

@camilamacedo86
Copy link
Contributor

@camilamacedo86 camilamacedo86 commented Mar 25, 2026

Problem

When upgrading a ClusterExtension from a deprecated bundle (for example v1.0.1) to a non-deprecated bundle (for example v1.0.3), the deprecation conditions stay wrong.

  • Deprecated and BundleDeprecated remain True
  • The message still says "v1.0.1 is deprecated"
  • This is fixed only after the next reconcile

Why this happens:

  • During Resolve, deprecation is set using the old bundle
  • During Apply, the bundle is upgraded
  • But deprecation is not updated after the upgrade

Solution

After a successful apply (when rollout is done):

  • Call SetDeprecationStatus again
  • Use the new installed bundle name
  • This makes deprecation correct immediately (no second reconcile needed)

We also store the deprecation data in reconcile state so it can be reused after apply.


Before

Reconcile:

  1. Resolve → Deprecated=True (based on v1.0.1) ← stale
  2. Unpack
  3. Apply → upgrade to v1.0.3

Status:
install.bundle: v1.0.3 ✅ correct
Deprecated: True ("v1.0.1...") ❌ wrong
BundleDeprecated: True ❌ wrong


After

Reconcile:

  1. Resolve → Deprecated=True (based on v1.0.1)
  2. Unpack
  3. Apply → upgrade to v1.0.3
    → refresh deprecation using new bundle

Status:
install.bundle: v1.0.3 ✅ correct
Deprecated: False ✅ correct
BundleDeprecated: False ✅ correct


Note

This fix is only for the Helm path.

For Boxcutter path, no change is needed:

  • The old bundle is still running during rollout
  • So showing old deprecation is correct

Copilot AI review requested due to automatic review settings March 25, 2026 06:58
@netlify
Copy link

netlify bot commented Mar 25, 2026

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 5b0ea47
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/69c389fbfd77d00008e6bbae
😎 Deploy Preview https://deploy-preview-2590--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.

@openshift-ci openshift-ci bot requested review from pedjak and tmshort March 25, 2026 06:58
@openshift-ci
Copy link

openshift-ci bot commented Mar 25, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign perdasilva for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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

This comment was marked as outdated.

Refresh deprecation status after a successful apply so that upgrading
from a deprecated bundle to a non-deprecated one clears Deprecated and
BundleDeprecated conditions in the same reconciliation cycle.

Generated-by: Cursor/Claude
@camilamacedo86 camilamacedo86 force-pushed the fix-refresh-deprecate-status branch from cb1e03d to 5b0ea47 Compare March 25, 2026 07:08
@camilamacedo86 camilamacedo86 changed the title OCPBUGS-78092: fix: stale deprecation conditions after ClusterExtension upgrade 🐛 OCPBUGS-78092: fix: stale deprecation conditions after ClusterExtension upgrade Mar 25, 2026
@codecov
Copy link

codecov bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.84%. Comparing base (c16a97b) to head (5b0ea47).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2590      +/-   ##
==========================================
+ Coverage   67.78%   67.84%   +0.05%     
==========================================
  Files         137      137              
  Lines        9574     9578       +4     
==========================================
+ Hits         6490     6498       +8     
+ Misses       2585     2583       -2     
+ Partials      499      497       -2     
Flag Coverage Δ
e2e 38.40% <100.00%> (+0.29%) ⬆️
experimental-e2e 51.02% <50.00%> (+0.07%) ⬆️
unit 52.89% <100.00%> (+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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants