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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions pkg/operators/v1alpha1/subscription_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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.


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

// SubscriptionOperatorDeprecated indicates that the Channel used with this Subscription has been deprecated.
SubscriptionChannelDeprecated SubscriptionConditionType = "ChannelDeprecated"

// SubscriptionOperatorDeprecated indicates that the Bundle currently installed with this Subscription has been deprecated.
SubscriptionBundleDeprecated SubscriptionConditionType = "BundleDeprecated"
)

const (
Expand Down
Loading