-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
"operator-sdk init" fails while updating "go.mod" #4027
Comments
Hi @umangachapagain, The default scaffold shows not download this dep. I am unable to get it as well.
Are your GOPROXY env with "https://proxy.golang.org,direct"? |
This worked for me for some reason. According to rook/rook#6428 (comment) it was always working.
I have |
So, could you please update your GOPROXY for the default configuration |
@umangachapagain It looks like one of your dependencies depends on |
We do use that. And, like I said |
Didn't work. |
Hi @umangachapagain,
You have a project already and then you are trying to init a project on it. it shows that you have conflicts of go mod dependencies whcih is related to your customizations. I'd recommend you do:
It might solve, however, the tool is not developed to address this scenario. I mean, it is expected the dir where the tool will be executed is empty. So, it is not possible to ensure that it will not face issues in your scenario. Shows that your goal is to migrate your project to use the tool then, I'd like to recommend you the following steps :
|
Hi @umangachapagain, This issue was discussed in the bug triage meeting and then we reach a consensus that the recommended path to make a pre-existing project to work with the tool would be scaffold a new project and then, copy and past your implementation accordingly. See that it would not be the only possible issue faced and try to make the project work with the tool by running Also, we are thinking about to limit this option for the v3+ plugins and make simplicity that the dir where was executed the command Anyway, a few options and explanation were provided in #4027 (comment) and #4027 (comment). So, we are closing this one since it would not be the workflow recommended. However, please feel free to ping us and/or raise new issues if you need. |
Bug Report
What did you do?
In a project that has
rook v1.4.5
as dependency ingo.mod
, I ranoperator-sdk init
What did you expect to see?
Project initialized correctly with updated dependency.
What did you see instead? Under which circumstances?
Environment
Operator type:
Kubernetes cluster type:
$ operator-sdk version
:operator-sdk version: "v1.0.1", commit: "4169b318b578156ed56530f373d328276d040a1b", kubernetes version: "v1.18.2", go version: "go1.13.15 linux/amd64", GOOS: "linux", GOARCH: "amd64"
$ go version
(if language is Go)go version go1.15.2 linux/amd64
$ kubectl version
Possible Solution
Additional context
go get github.com/rook/[email protected]
works butoperator-sdk init
complains about dependency.Bug raised on Rook: rook/rook#6428
The text was updated successfully, but these errors were encountered: