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

Refactor legacy upgrade constraint semantics #450

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

m1kola
Copy link
Member

@m1kola m1kola commented Oct 10, 2023

Description

  • Make successors func swappable
  • Update test to not use Ginkgo & prepare the test to be able to switch between different states of the ForceSemverUpgradeConstraints feature flag

Closes #397

Reviewer Checklist

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

@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 Oct 10, 2023
@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (2b0984b) 84.00% compared to head (616bd9f) 83.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #450      +/-   ##
==========================================
- Coverage   84.00%   83.62%   -0.38%     
==========================================
  Files          23       23              
  Lines         844      849       +5     
==========================================
+ Hits          709      710       +1     
- Misses         93       95       +2     
- Partials       42       44       +2     
Flag Coverage Δ
e2e 65.84% <44.44%> (-0.28%) ⬇️
unit 76.67% <44.44%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...al/resolution/variablesources/installed_package.go 64.28% <44.44%> (-0.94%) ⬇️

... and 1 file with indirect coverage changes

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

@m1kola m1kola marked this pull request as ready for review October 10, 2023 12:33
@m1kola m1kola requested a review from a team as a code owner October 10, 2023 12:33
@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 Oct 10, 2023
@m1kola m1kola mentioned this pull request Oct 10, 2023
4 tasks
@@ -63,5 +62,24 @@ func NewInstalledPackageVariableSource(catalogClient BundleProvider, bundleImage
return &InstalledPackageVariableSource{
catalogClient: catalogClient,
bundleImage: bundleImage,
successors: legacySemanticsSuccessors,
Copy link
Member Author

Choose a reason for hiding this comment

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

Context: this will be swapable based on feature gate. More to come in #444.

Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

Looks good to me, after addressing my comment about use of require vs assert testify packages in the tests.

* Make successors func swappable
* Update test to not use Ginkgo & prepare the test to be able to switch between
  different states of the `ForceSemverUpgradeConstraints` feature flag

Signed-off-by: Mikalai Radchuk <mradchuk@redhat.com>
@m1kola m1kola added this pull request to the merge queue Oct 10, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 10, 2023
@m1kola m1kola added this pull request to the merge queue Oct 10, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 10, 2023
@m1kola m1kola added this pull request to the merge queue Oct 10, 2023
Merged via the queue into operator-framework:main with commit 205a487 Oct 10, 2023
10 checks passed
@m1kola m1kola deleted the 397_refactor_legacy branch October 10, 2023 14:29
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.

Refactor legacy upgrade constraint semantics behind an interface
2 participants