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

nephio-operator docker build is failing #254

Closed
johnbelamaric opened this issue Jun 2, 2023 · 5 comments
Closed

nephio-operator docker build is failing #254

johnbelamaric opened this issue Jun 2, 2023 · 5 comments

Comments

@johnbelamaric
Copy link
Member

https://prow.nephio.io/view/gs/prow-nephio-sig-release/logs/build-push-image-nephio-operator-commit-conf/1664510205079064576

Even after I update the Dockerfile to use go 1.20, I get this error:

[hi on] jbelamaric@jbelamaric:~/proj/gh/johnbelamaric/nephio/operators/nephio-controller-manager$ make docker-build
go test ./... -v -coverprofile lcov.info 
# github.com/nephio-project/nephio/controllers/pkg/resource
../../../../../../go/pkg/mod/github.com/nephio-project/nephio/controllers/pkg@v0.0.0-20230530181407-a74ad096acc7/resource/fake.go:27:23: cannot use &MockClient{} (value of type *MockClient) as client.Client value in variable declaration: *MockClient does not implement client.Client (missing method GroupVersionKindFor)
# sigs.k8s.io/cluster-api/api/v1beta1
../../../../../../go/pkg/mod/sigs.k8s.io/cluster-api@v1.4.2/api/v1beta1/machine_webhook.go:45:27: cannot use &Machine{} (value of type *Machine) as admission.Validator value in variable declaration: *Machine does not implement admission.Validator (wrong type for method ValidateCreate)
		have ValidateCreate() error
		want ValidateCreate() (admission.Warnings, error)
../../../../../../go/pkg/mod/sigs.k8s.io/cluster-api@v1.4.2/api/v1beta1/machinedeployment_webhook.go:56:27: cannot use &MachineDeployment{} (value of type *MachineDeployment) as admission.Validator value in variable declaration: *MachineDeployment does not implement admission.Validator (wrong type for method ValidateCreate)
		have ValidateCreate() error
		want ValidateCreate() (admission.Warnings, error)
../../../../../../go/pkg/mod/sigs.k8s.io/cluster-api@v1.4.2/api/v1beta1/machinedeployment_webhook.go:61:16: assignment mismatch: 2 variables but admission.NewDecoder returns 1 value
../../../../../../go/pkg/mod/sigs.k8s.io/cluster-api@v1.4.2/api/v1beta1/machinehealthcheck_webhook.go:63:27: cannot use &MachineHealthCheck{} (value of type *MachineHealthCheck) as admission.Validator value in variable declaration: *MachineHealthCheck does not implement admission.Validator (wrong type for method ValidateCreate)
		have ValidateCreate() error
		want ValidateCreate() (admission.Warnings, error)
../../../../../../go/pkg/mod/sigs.k8s.io/cluster-api@v1.4.2/api/v1beta1/machineset_webhook.go:45:27: cannot use &MachineSet{} (value of type *MachineSet) as admission.Validator value in variable declaration: *MachineSet does not implement admission.Validator (wrong type for method ValidateCreate)
		have ValidateCreate() error
		want ValidateCreate() (admission.Warnings, error)
FAIL
make: *** [../../default-go-test.mk:31: test] Error 1

@henderiw I seem to recall seeing some errors like this wrt the controller-runtime update?

@johnbelamaric
Copy link
Member Author

@johnbelamaric
Copy link
Member Author

So, I think we just have to not use a pinned release of cluster-api here. Trying it.

@johnbelamaric
Copy link
Member Author

johnbelamaric commented Jun 2, 2023

Ok, so, yeah, the pkg go.mod has a different cluster-api version that works. But somehow that pkg version is still not what's importing to this build. I really think we have to do something different here, as discussed in #253 (comment) - merging that PR didn't fix this the way I thought it would.

So...for now I manually built and pushed a new operator image.

@henderiw
Copy link
Contributor

henderiw commented Jun 3, 2023

we need to update the controllers/pkg version I believe

@johnbelamaric
Copy link
Member Author

This is fixed

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

No branches or pull requests

2 participants