You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CLOUDP-341578] Update client-go and related module to version to v0.31.11 (#370)
# Summary
As part of the release process we are planning to upgrade the client-go
version to `0.31.11`. This PR does that. Just updating the client-go
results into a compatibility issue with `controller-runtime`,
```
# sigs.k8s.io/controller-runtime/pkg/internal/controller
../../../go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:103:9: not enough arguments in call to fn
have (interface{})
want (context.Context, interface{})
# sigs.k8s.io/controller-runtime/pkg/webhook/admission
../../../go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/admission/webhook.go:158:9: not enough arguments in call to fn
have (interface{})
want (context.Context, interface{})
```
that's why we are also updating `controller-runtime` to newer version
(`v0.19.4`).
Updating controller-runtime was a breaking because most of the utilities
now are typed (using generics) that why we had to make respective go
file changes.
## Proof of Work
Running `go build` in the root of the repo works, that makes sure that
we are able to build the binary. Apart from that I also ran `go test` in
the dirs where I am changing the test files and that worked as well.
```
~/work/opensource/mongodb-kubernetes/mongodb-community-operator/controllers/watch (update-client-go) » go test -run TestWatcher vivek.s@M-HYXVRF7WDG
PASS
ok github.com/mongodb/mongodb-kubernetes/mongodb-community-operator/controllers/watch 0.374s
~/work/opensource/mongodb-kubernetes/controllers/operator (update-client-go*) » go test -run TestMongoDBSearchReconcile_Success 1 ↵ vivek.s@M-HYXVRF7WDG
2025-08-26T12:17:41.620+0200 INFO operator/mongodbsearch_controller.go:46 -> MongoDBSearch.Reconcile {"MongoDBSearch": "my-namespace/search"}
2025-08-26T12:17:41.621+0200 INFO search_controller/mongodbsearch_reconcile_helper.go:73 Reconciling MongoDBSearch {"MongoDBSearch": "my-namespace/search", "MongoDBSearch": "my-namespace/search"}
2025-08-26T12:17:41.621+0200 DEBUG search_controller/mongodbsearch_reconcile_helper.go:140 Updated search service my-namespace/search-search-svc: created
2025-08-26T12:17:41.621+0200 DEBUG search_controller/mongodbsearch_reconcile_helper.go:166 Updated mongot config yaml config map: my-namespace/search-search-config (created) with the following configuration: communityPrivatePreview:
dataPath: /mongot/data/config.yml
keyFilePath: /mongot/keyfile/keyfile
logging:
verbosity: DEBUG
metrics:
address: localhost:9946
enabled: true
mongodHostAndPort: mdb-svc.my-namespace.svc.cluster.local:27017
queryServerAddress: localhost:27027
2025-08-26T12:17:41.621+0200 DEBUG search_controller/mongodbsearch_reconcile_helper.go:122 Search statefulset my-namespace/search-search CreateOrUpdate result: created {"MongoDBSearch": "my-namespace/search", "MongoDBSearch": "my-namespace/search"}
2025-08-26T12:17:41.623+0200 DEBUG inspect/statefulset_inspector.go:32 StatefulSet search-search (wanted: 1, ready: 0, updated: 0, generation: 0, observedGeneration: 0)
2025-08-26T12:17:41.623+0200 DEBUG commoncontroller/resourcestatus.go:25 Updating status: phase=Pending, options=[{Message:StatefulSet not ready} {Warnings:[]} {ResourcesNotReady:[{Kind:StatefulSet Name:search-search Errors:[] Message:Not all the Pods are ready (wanted: 1, updated: 0, ready: 0, current: 0)}]}] {"MongoDBSearch": "my-namespace/search"}
PASS
ok github.com/mongodb/mongodb-kubernetes/controllers/operator 0.835s
```
0 commit comments