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

Bug 2076187: Identify fail forward in csvSources #2743

Merged

Conversation

awgreene
Copy link
Member

Description of the change:

Motivation for the change:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /doc
  • Commit messages sensible and descriptive
  • Tests marked as [FLAKE] are truly flaky
  • Tests that remove the [FLAKE] tag are no longer flaky

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 14, 2022
@openshift-ci
Copy link

openshift-ci bot commented Apr 14, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: awgreene

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 Apr 14, 2022
@@ -196,80 +196,6 @@ func WithInstalledCSV(sub *v1alpha1.Subscription, csvName string) *v1alpha1.Subs
return sub
}

func TestSolveOperators_WithFailForward(t *testing.T) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed since the changes are not done on the resolver level anymore.

@awgreene awgreene force-pushed the update-csvSource branch 6 times, most recently from 92e64d7 to dba1434 Compare April 16, 2022 15:44
@awgreene awgreene changed the title WIP: Revert changes to the resolver Revert changes to the resolver Apr 16, 2022
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 16, 2022
@awgreene awgreene changed the title Revert changes to the resolver Identify fail forward in csvSources Apr 16, 2022
This commit undos changes to the Resolve and ResolveSteps methods and
updats the csvSourceProvider to infer whether or not fail forward is
enabled in a namespace.

Signed-off-by: Alexander Greene <greene.al1991@gmail.com>
Copy link
Contributor

@tylerslaton tylerslaton left a comment

Choose a reason for hiding this comment

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

Great quality of life improvement here for the resolver as we don't have to continuously add the "fail forward" boolean for resolution. Eventually we'll need to remove the concept of CSV's from the resolver package entirely as a result of the breakout but until then this look
good. One small non-blocking nit.

/lgtm

Comment on lines +12 to +17
// IsFailForwardEnabled takes a namespaced operatorGroup lister and returns
// True if an operatorGroup exists in the namespace and its upgradeStrategy
// is set to UnsafeFailForward and false otherwise. An error is returned if
// an more than one operatorGroup exists in the namespace.
// No error is returned if no OperatorGroups are found to keep the resolver
// backwards compatible.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
// IsFailForwardEnabled takes a namespaced operatorGroup lister and returns
// True if an operatorGroup exists in the namespace and its upgradeStrategy
// is set to UnsafeFailForward and false otherwise. An error is returned if
// an more than one operatorGroup exists in the namespace.
// No error is returned if no OperatorGroups are found to keep the resolver
// backwards compatible.
// IsFailForwardEnabled takes a namespaced operatorGroup lister and returns
// True if an operatorGroup exists in the namespace and its upgradeStrategy
// is set to UnsafeFailForward and false otherwise. An error is returned if
// more than one operatorGroup exists in the namespace. No error is returned
// if no OperatorGroups are found to keep the resolver backwards compatible.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 18, 2022
@openshift-merge-robot openshift-merge-robot merged commit 462ce61 into operator-framework:master Apr 18, 2022
@awgreene awgreene changed the title Identify fail forward in csvSources Bug 2076187: Identify fail forward in csvSources Apr 19, 2022
@openshift-ci
Copy link

openshift-ci bot commented Apr 19, 2022

@awgreene: All pull requests linked via external trackers have merged:

Bugzilla bug 2076187 has been moved to the MODIFIED state.

In response to this:

Bug 2076187: Identify fail forward in csvSources

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/test-infra repository.

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

3 participants