Repository navigation
Commit 3f959fc
committed
Drop the logr pin by moving to Kubernetes 1.23 libraries
The replace holding logr at v0.4.0 stopped go mod tidy working. grpc 1.79's
test packages reach github.com/go-logr/logr/funcr through OpenTelemetry, and
tidy walks tests of dependencies, so it reported:
github.com/go-logr/logr/funcr: module github.com/go-logr/logr@latest found
(replaced by github.com/go-logr/logr@v0.4.0), but does not contain package
github.com/go-logr/logr/funcr
Dependabot runs a strict go mod tidy, so every Go module update it opened
would have failed the same way.
The pin existed because klog v2.8.0 and controller-runtime v0.9.0 are written
against logr v0, where Logger is an interface. The way out is to raise those
rather than hold logr back. controller-runtime v0.11 is the first release
built against logr v1, and it pairs with the Kubernetes 1.23 libraries, so:
sigs.k8s.io/controller-runtime v0.9.0 -> v0.11.2
k8s.io/{api,apimachinery,client-go,
apiextensions-apiserver,code-generator}
v0.21.5 -> v0.23.17
github.com/go-logr/zapr v0.4.0 -> v1.2.4
k8s.io/klog/v2 (indirect) v2.8.0 -> v2.30.0
The only source change the move needs is the Kubernetes 1.23 rename of the
embedded Handler on corev1.Probe to ProbeHandler, in the three deployment
overrides that set gRPC-web probes. Everything else compiles as is; the
operator already passes logr.Logger by value.
Verified with go build, go vet, a strict go mod tidy, and the unit tests
(85 packages ok, controllers included). The integration and end-to-end
suites need a cluster and are left to CI.
Assisted-by: anthropic:claude-fable-5-1
Signed-off-by: Ry Jones <ry@linux.com>1 parent 6ea612b commit 3f959fc
5 files changed
Lines changed: 87 additions & 68 deletions
File tree
- pkg/offering/base
- console/override
- orderer/override
- peer/override
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| |||
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
92 | | - | |
93 | 91 | | |
94 | 92 | | |
95 | 93 | | |
96 | 94 | | |
| 95 | + | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
101 | | - | |
| 100 | + | |
102 | 101 | | |
103 | 102 | | |
104 | 103 | | |
| |||
145 | 144 | | |
146 | 145 | | |
147 | 146 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | 156 | | |
161 | 157 | | |
162 | 158 | | |
| |||
0 commit comments