kubewarden-controller icon indicating copy to clipboard operation
kubewarden-controller copied to clipboard

refactor: use helper from controller runtime

Open flavio opened this issue 10 months ago • 5 comments

Use a more concise way to handle "not found" errors that is made possible by using a controller runtime helper.

flavio avatar Apr 19 '24 07:04 flavio

Codecov Report

Attention: Patch coverage is 50.00000% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 71.78%. Comparing base (9c3dd61) to head (783f2bd).

Files Patch % Lines
internal/pkg/admission/policy-server-ca-secret.go 0.00% 3 Missing :warning:
...g/admission/policy-server-pod-disruption-budget.go 0.00% 3 Missing :warning:
controllers/admissionpolicy_controller.go 0.00% 1 Missing :warning:
internal/pkg/admission/policy-server-configmap.go 0.00% 1 Missing :warning:
internal/pkg/admission/policy-server-deployment.go 0.00% 1 Missing :warning:
internal/pkg/admission/policy-server-service.go 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #725      +/-   ##
==========================================
- Coverage   72.84%   71.78%   -1.07%     
==========================================
  Files          28       28              
  Lines        1812     1804       -8     
==========================================
- Hits         1320     1295      -25     
- Misses        373      388      +15     
- Partials      119      121       +2     
Flag Coverage Δ
integration-tests 59.42% <45.00%> (-1.29%) :arrow_down:
unit-tests 50.11% <20.00%> (-0.08%) :arrow_down:

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

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

codecov[bot] avatar Apr 19 '24 07:04 codecov[bot]

@jvanz, @viccuad : I've updated golanglint-ci and then fixed all the warnings via 8d936333779b11f9cb2f1314341325b0f3af80a3. Please take a look at the commit description to see the reasons of the changes I've made

flavio avatar Apr 22 '24 16:04 flavio

Note: this cannot be merged until the 1.12 release is done

flavio avatar Apr 22 '24 16:04 flavio

It seems there is something wrong, because tests and linter are failing. =(

jvanz avatar Apr 24 '24 16:04 jvanz

@jvanz I'm a bit stuck with other tasks, would you be so kind to take this over once your PR about the owner reference is merged? :pray:

flavio avatar May 09 '24 11:05 flavio

@kubewarden/kubewarden-developers , I've updated this PR rebasing it on top of main and did some fixes to make the CI happy. To make all our CI green I had to update the controller-gen binary used. Otherwise, we get a nil pointer deref. That's why you can see so many line changes, I've commited the result of the generator after updating it. Let me know if you're fine with that. Otherwise, I can update the generator in another PR or commit the updated manifest files in another PR.

jvanz avatar May 20 '24 19:05 jvanz

@kubewarden/kubewarden-developers I've updated this branch rebasing it on top of main and squashing some commits to reduce the number of them.

jvanz avatar May 21 '24 15:05 jvanz