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

chore: Update dependencies client-go and controller-runtime #219

Merged
merged 7 commits into from
Jul 5, 2023

Conversation

troy0820
Copy link
Member

@troy0820 troy0820 commented Jul 5, 2023

What does this change

This updates client-go to 0.28.3-alpha while also having to update controller-runtime to 0.15.0
When updating it produced the following error:

../../go/pkg/mod/k8s.io/[email protected]/applyconfigurations/meta/v1/unstructured.go:64:38: cannot use doc (variable of type *"github.com/google/gnostic/openapiv2".Document) as *"github.com/google/gnostic-models/openapiv2".Document value in argument to proto.NewOpenAPIData

Both releases here:
kubernetes issue with why we need client-go 0.28.0-alpha
controller-runtime

What issue does it fix

Closes # Dependabot PR
Dependabot PR that tried to do this automatically went to client-go 0.27.0 but we have to skip that to get this to work with the above issues.

Notes for the reviewer

Because of the breaking change of controller-runtime, there are some adjustments added to the tests to get them to pass.

  • We have to add WithStatusSubResource(...) to the setup functions in the test or else we can't update the status on the reconcile
  • We have to remove some assertions that will not persist the objects (pvc, pv) as the object tracker can create them in the fake client but not list/get them during operations.
  • None of the logic has been changed to the controller responsible
  • I'm creating an issue to create smaller tests to coincide with how we expect this to work.

Checklist

  • Did you write tests?
    • No, modified test(s) to work with the uplifted dependency.
  • Did you write documentation?
    • No, documentation is not necessary
  • Did you make any API changes? Update the corresponding API documentation.
    • No changes to the api

troy0820 added 5 commits July 4, 2023 00:02
Signed-off-by: Troy Connor <[email protected]>
Signed-off-by: Troy Connor <[email protected]>
Signed-off-by: Troy Connor <[email protected]>
Signed-off-by: Troy Connor <[email protected]>
@troy0820 troy0820 changed the title Update dependencies chore: Update dependencies client-go and controller-runtime Jul 5, 2023
@troy0820 troy0820 force-pushed the troy0820/update-deps branch from ba0a80a to 093c00f Compare July 5, 2023 20:28
@troy0820 troy0820 force-pushed the troy0820/update-deps branch from 093c00f to ffb6560 Compare July 5, 2023 20:46
@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Merging #219 (2674c06) into main (d30ef0e) will decrease coverage by 7.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #219      +/-   ##
==========================================
- Coverage   76.67%   69.66%   -7.01%     
==========================================
  Files          13       13              
  Lines        1556     1556              
==========================================
- Hits         1193     1084     -109     
- Misses        230      352     +122     
+ Partials      133      120      -13     
Flag Coverage Δ
unit-tests 69.66% <ø> (-7.01%) ⬇️

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

Impacted Files Coverage Δ
controllers/installation_controller.go 59.84% <ø> (-15.91%) ⬇️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: Troy Connor <[email protected]>
Copy link
Member

@schristoff schristoff left a comment

Choose a reason for hiding this comment

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

Will ya throw a link to the issue to make codecov happy eventually

@schristoff schristoff merged commit dd5e786 into getporter:main Jul 5, 2023
@troy0820
Copy link
Member Author

troy0820 commented Jul 6, 2023

#220 <-- Issue link.
#221 <-- Issue PR (increases the coverage but not the lifecycle of the controller, so it partially resolves this issue)
@schristoff

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.

2 participants