operator-framework / operator-controller

A new and improved management framework for extending Kubernetes with Operators
https://operator-framework.github.io/operator-controller/
Apache License 2.0
61 stars 53 forks source link

🌱 use operator-registry's FBC types directly; add `Resolver` interface #1033

Closed joelanford closed 2 months ago

joelanford commented 3 months ago

Signed-off-by: Joe Lanford joe.lanford@gmail.com

Description

This is a code refactoring to:

  1. align operator-controller's resolver to use the FBC types directly, which seems like it would be able to evolve better alongside FBC evolution.
  2. introduce a resolver abstraction to the reconciler, which simplifies reconciler AND resolver testability

Reviewer Checklist

netlify[bot] commented 3 months ago

Deploy Preview for olmv1 ready!

Name Link
Latest commit b59ac9e63dc97ce173f873bae14fd69573b54c08
Latest deploy log https://app.netlify.com/sites/olmv1/deploys/6696b6016c7d880008b40fb2
Deploy Preview https://deploy-preview-1033--olmv1.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 87.25490% with 39 lines in your changes missing coverage. Please review.

Project coverage is 72.10%. Comparing base (957fc1b) to head (b59ac9e). Report is 1 commits behind head on main.

Files Patch % Lines
internal/catalogmetadata/filter/successors.go 74.46% 6 Missing and 6 partials :warning:
cmd/manager/main.go 52.17% 7 Missing and 4 partials :warning:
...nternal/controllers/clusterextension_controller.go 90.27% 5 Missing and 2 partials :warning:
internal/resolve/catalog.go 95.45% 2 Missing and 2 partials :warning:
internal/bundleutil/bundle.go 86.66% 1 Missing and 1 partial :warning:
internal/resolve/resolver.go 0.00% 2 Missing :warning:
internal/catalogmetadata/client/client.go 94.44% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1033 +/- ## ========================================== - Coverage 73.60% 72.10% -1.50% ========================================== Files 30 31 +1 Lines 1951 1807 -144 ========================================== - Hits 1436 1303 -133 + Misses 381 377 -4 + Partials 134 127 -7 ``` | [Flag](https://app.codecov.io/gh/operator-framework/operator-controller/pull/1033/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=operator-framework) | Coverage Δ | | |---|---|---| | [e2e](https://app.codecov.io/gh/operator-framework/operator-controller/pull/1033/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=operator-framework) | `55.67% <54.24%> (+1.29%)` | :arrow_up: | | [unit](https://app.codecov.io/gh/operator-framework/operator-controller/pull/1033/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=operator-framework) | `43.38% <78.43%> (-4.44%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=operator-framework#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tmshort commented 3 months ago

Upgrade e2e fails...

joelanford commented 3 months ago

I'm hoping #1050 improves the situation on the upgrade-e2e. I'll rebase after that merges.

joelanford commented 3 months ago

Rebased. Let's see if upgrade-e2e passes now.

EDIT: It did! 🎉

perdasilva commented 3 months ago

also it may impact #1030 @bentito

joelanford commented 2 months ago

Most recent push:

  1. Rebases to main
  2. Changes bundleutil.MetadataFor to fix GoDoc and avoid accepting a pointer to a blang semver version.