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

Additional Deprecation Types #307

Merged

Conversation

dtfranz
Copy link
Contributor

@dtfranz dtfranz commented Nov 10, 2023

Add additional deprecation conditions for each type (package, channel, bundle)

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6b3567d) 42.64% compared to head (6f8f2db) 42.64%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #307   +/-   ##
=======================================
  Coverage   42.64%   42.64%           
=======================================
  Files          42       42           
  Lines        3583     3583           
=======================================
  Hits         1528     1528           
  Misses       1903     1903           
  Partials      152      152           
Files Coverage Δ
pkg/operators/v1alpha1/subscription_types.go 0.00% <ø> (ø)

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

@@ -118,8 +118,18 @@ const (
// SubscriptionBundleUnpackFailed indicates that the unpack job failed
SubscriptionBundleUnpackFailed SubscriptionConditionType = "BundleUnpackFailed"

// SubscriptionOperatorDeprecated indicates that the Operator currently installed with this Subscription has been deprecated.
// SubscriptionOperatorDeprecated is a roll-up condition which indicates that the Operator currently installed with this Subscription
//has been deprecated. It will be present when any of the three deprecation types (Package, Channel, Bundle) are present.
SubscriptionOperatorDeprecated SubscriptionConditionType = "OperatorDeprecated"
Copy link
Member

Choose a reason for hiding this comment

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

WDYT about renaming this one to just Deprecated?

I'm concerned that OperatorDeprecated sounds too much like BundleDeprecated and might confuse users.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed, I've updated to Deprecated

// SubscriptionOperatorDeprecated indicates that the Package currently installed with this Subscription has been deprecated.
SubscriptionPackageDeprecated SubscriptionConditionType = "PackageDeprecated"

// SubscriptionOperatorDeprecated indicates that the Channel currently installed with this Subscription has been deprecated.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Channels aren't installable IIUC. Not serious enough to block this IMO.

Suggested change
// SubscriptionOperatorDeprecated indicates that the Channel currently installed with this Subscription has been deprecated.
// SubscriptionOperatorDeprecated indicates that the Channel used with this Subscription has been deprecated.

Copy link
Contributor Author

@dtfranz dtfranz Nov 10, 2023

Choose a reason for hiding this comment

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

Woops, I'll correct this in a follow up. Thanks for catching.
EDIT: I went ahead and fixed it.

@everettraven
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 10, 2023
…ndle).

Signed-off-by: dtfranz <dfranz@redhat.com>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 10, 2023
SubscriptionOperatorDeprecated SubscriptionConditionType = "OperatorDeprecated"
// SubscriptionDeprecated is a roll-up condition which indicates that the Operator currently installed with this Subscription
//has been deprecated. It will be present when any of the three deprecation types (Package, Channel, Bundle) are present.
SubscriptionDeprecated SubscriptionConditionType = "Deprecated"
Copy link
Member

Choose a reason for hiding this comment

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

I’m not seeing the point of this condition. There are three distinct conditions that reflect which resource is deprecated. I don’t see the need of a blanket condition unless there is a usage for it that is not described in the comment or commit. This is why we should start to do proof PR to show how these fields are being used as a part of reviewing process.

Copy link
Member

Choose a reason for hiding this comment

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

Or is this supposed to replace OperatorDeprecated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's replacing OperatorDeprecated as the roll-up condition name. Having the roll-up allows us and any users to determine deprecated status without having to check for all three different sup-types.

@@ -118,8 +118,18 @@ const (
// SubscriptionBundleUnpackFailed indicates that the unpack job failed
SubscriptionBundleUnpackFailed SubscriptionConditionType = "BundleUnpackFailed"

// SubscriptionOperatorDeprecated indicates that the Operator currently installed with this Subscription has been deprecated.
Copy link
Member

Choose a reason for hiding this comment

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

I suspect this condition is used on olm side. So this is kind of an api change. Is it necessary to remove this without deprecation warning?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For context, we just added that field yesterday and it's not in any release, so it's not in use anywhere. We're making a correction to the name here and also adding sub-types so that users can see which levels their installed Operators are deprecated at.

@oceanc80
Copy link

/lgtm

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

/approve

Copy link

openshift-ci bot commented Nov 10, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dtfranz, grokspawn

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 Nov 10, 2023
@openshift-merge-bot openshift-merge-bot bot merged commit 047dce1 into operator-framework:master Nov 10, 2023
5 of 6 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.

None yet

6 participants