camel-k: operator-sdk build fails on latest master with 'make images-dev'

Strange operator-sdk build behavior after some latest updates

operator-sdk build docker.io/apache/camel-k:1.0.0-M1-SNAPSHOT
build github.com/apache/camel-k/cmd/manager: cannot load github.com/knative/serving/pkg/apis/serving/v1beta1: open /home/dvolodin/go/src/github.com/apache/camel-k/vendor/github.com/knative/serving/pkg/apis/serving/v1beta1: no such file or directory
Error: failed to build operator binary: (failed to exec []string{"go", "build", "-o", "/home/dvolodin/go/src/github.com/apache/camel-k/build/_output/bin/camel-k", "-gcflags", "all=-trimpath=/home/dvolodin/go/src/github.com/apache", "-asmflags", "all=-trimpath=/home/dvolodin/go/src/github.com/apache", "-mod=vendor", "github.com/apache/camel-k/cmd/manager"}: exit status 1)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 30 (30 by maintainers)

Most upvoted comments

Btw, I’ve created https://github.com/apache/camel-k/pull/871 to avoid go mod vendor

So I have the same issue and the CI does not fail because it does not use the operator-sdk but plain docker 😃 so I would suggest to apply the same logic in the makefile. Another hacky way could be to run the operator from a different location so it does not find Gopkg.lock.

@astefanutti @nicolaferraro what do you think ?

We should also report the issue upstream