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

🌱 Upgrade Deppy #560

Merged
merged 1 commit into from
Dec 4, 2023
Merged

🌱 Upgrade Deppy #560

merged 1 commit into from
Dec 4, 2023

Conversation

m1kola
Copy link
Member

@m1kola m1kola commented Dec 1, 2023

Description

New version contains breaking changes: Deppy no longer has variable source API. Instead it accepts a slice of variables as input.

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 Dec 1, 2023
Copy link

codecov bot commented Dec 1, 2023

Codecov Report

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

Comparison is base (6cb7029) 83.93% compared to head (5646c12) 84.06%.
Report is 1 commits behind head on main.

Files Patch % Lines
internal/controllers/operator_controller.go 71.42% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #560      +/-   ##
==========================================
+ Coverage   83.93%   84.06%   +0.13%     
==========================================
  Files          20       20              
  Lines         809      816       +7     
==========================================
+ Hits          679      686       +7     
  Misses         90       90              
  Partials       40       40              
Flag Coverage Δ
e2e 63.35% <77.77%> (-0.43%) ⬇️
unit 78.97% <73.91%> (+0.22%) ⬆️

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.

@m1kola m1kola force-pushed the update_deppy branch 2 times, most recently from 5cdfb1b to 5554ac6 Compare December 1, 2023 11:52
@m1kola m1kola marked this pull request as ready for review December 1, 2023 12:03
@m1kola m1kola requested a review from a team as a code owner December 1, 2023 12:03
@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 Dec 1, 2023
everettraven
everettraven previously approved these changes Dec 1, 2023
Copy link
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

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

Overall looks good to me. One nit about potentially confusing naming of a field but I don't think that should block this PR

// OperatorReconciler reconciles a Operator object
type OperatorReconciler struct {
client.Client
Scheme *runtime.Scheme
Resolver *solver.DeppySolver
CatalogClient BundleProvider
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I can see confusion occurring with this naming pattern. If unaware of the context one might assume that this is a fully featured client for retrieving catalog information where in reality this only provides an interface for fetching bundles. I'd prefer a name that more clearly signals that this is used for fetching bundles specifically. Maybe something like BundleClient?

Copy link
Member Author

Choose a reason for hiding this comment

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

I renamed the field to be BundleProvider to match BundleProvider interface. But I kept catalog client names in the client itself (at least for now). The client already fetches all the data from catalogs - It is just that we only provide a method to get bundles. This might change at some point.

Copy link
Contributor

@tmshort tmshort left a comment

Choose a reason for hiding this comment

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

The use of the name variables in multiple places might be a bit confusing... I'd suggest using vars in places where there's a function/method named variables. Or possibly renaming the variables() method. (Yes, golang is able to figure it out, but can we?)

internal/controllers/operator_controller.go Outdated Show resolved Hide resolved
internal/controllers/operator_controller.go Outdated Show resolved Hide resolved
@ncdc
Copy link
Member

ncdc commented Dec 4, 2023

I was about to approve (I'm ok w/the naming) but want to give @m1kola a chance to respond

@ncdc
Copy link
Member

ncdc commented Dec 4, 2023

Re ⚠️ - while deppy had breaking changes, users won't experience any breaking changes, will they?

@m1kola m1kola changed the title ⚠️ Upgrade Deppy 🌱 Upgrade Deppy Dec 4, 2023
@m1kola
Copy link
Member Author

m1kola commented Dec 4, 2023

Re ⚠️ - while deppy had breaking changes, users won't experience any breaking changes, will they?

Good point. I think for operator-controller users everything should stay the same. Replaced with 🌱

New version contains breaking changes: Deppy no longer
has variable source API. Instead it accepts a slice
of variables as input.

Signed-off-by: Mikalai Radchuk <mradchuk@redhat.com>
Copy link
Contributor

@tmshort tmshort left a comment

Choose a reason for hiding this comment

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

/lgtm

@m1kola m1kola added this pull request to the merge queue Dec 4, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 4, 2023
@m1kola
Copy link
Member Author

m1kola commented Dec 4, 2023

Quay failed with 502. Will try to merge again.

@m1kola m1kola added this pull request to the merge queue Dec 4, 2023
Merged via the queue into operator-framework:main with commit ba21cdf Dec 4, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants