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

update controller runtime to v0.15 #86

Merged
merged 7 commits into from
Nov 15, 2024

Conversation

ranakan19
Copy link
Contributor

Updates k8s dependencies to 0.28 and controller-runtime to v0.15.

All the other PRs update k8s dependencies to 0.27 but this one updates to 0.28 because of the following error:

../../../../pkg/mod/k8s.io/[email protected]/pkg/describe/describe.go:2667:65: cannot use ing.Status.LoadBalancer (variable of type "k8s.io/api/networking/v1".IngressLoadBalancerStatus) as "k8s.io/api/core/v1".LoadBalancerStatus value in argument to loadBalancerStatusStringer

and kubectl 0.28 was the only comptabile version.

With the update to controller-runtime v0.15 (changes in release detailed here), this PR has following changes to combat the breaking changes:

  • NewClient creation does not fail, so tests where the client is expected to fail specific api call needs to be made
  • replace apimachinery/runtime client with controller-runtime/client

Changes wrt - https://issues.redhat.com/browse/SANDBOX-675
DO NOT MERGE (All the PRs related to version updates need to be merged at once, but these PR are for early feedback so that there are not a lot of changes to review at once)

Copy link
Contributor

@alexeykazakov alexeykazakov 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. Just one comment to address.

pkg/client/client_test.go Show resolved Hide resolved
require.ErrorContains(t, err, "dial tcp: lookup fail-cluster.com")
// for ci the error message is dial tcp: lookup fail-cluster.com on 127.0.0.53:53: no such host, could go the regex way or string submatching with wildcards
// having two separate checks for different substrings is an easy fix
require.ErrorContains(t, err, "no such host")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did consider only checking for "no such host", but I do see value in checking for the host name as well - which we are setting explicitly in the test above.

@ranakan19 ranakan19 merged commit 5a14398 into kubesaw:master Nov 15, 2024
8 checks passed
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.00%. Comparing base (8d63298) to head (105a165).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #86   +/-   ##
=======================================
  Coverage   68.00%   68.00%           
=======================================
  Files          44       44           
  Lines        3175     3175           
=======================================
  Hits         2159     2159           
  Misses        825      825           
  Partials      191      191           
Files with missing lines Coverage Δ
pkg/client/client.go 53.19% <100.00%> (ø)
pkg/cmd/adm/install_operator.go 74.73% <100.00%> (ø)
pkg/cmd/adm/register_member.go 73.77% <100.00%> (ø)
pkg/cmd/adm/restart.go 59.29% <100.00%> (ø)

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