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

Bare go mod init will pull the wrong deps #997

Closed
DirectXMan12 opened this issue Sep 17, 2019 · 1 comment · Fixed by #1011
Closed

Bare go mod init will pull the wrong deps #997

DirectXMan12 opened this issue Sep 17, 2019 · 1 comment · Fixed by #1011
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.

Comments

@DirectXMan12
Copy link
Contributor

We recommend running a bare go mod init if your project doesn't have an easily-discoverable module path. When this happens, we won't scaffold out a pinned go modules file, which means go mod tidy will try to pull the latest of everything. Since the k8s deps don't do proper versioning, this means we get all sorts of issues with deps.

We should probably at least recommend people also run go get sigs.k8s.io/controller-runtime@vX.Y.Z. Probably, instead though, if there's an existing go.mod file, we should use the go mod command (probably with the -json flag) to check if CR is already present, and, if not, use go get to add it.

/kind bug

@DirectXMan12 DirectXMan12 added the kind/bug Categorizes issue or PR as related to a bug. label Sep 17, 2019
@DirectXMan12
Copy link
Contributor Author

/priority critical-urgent

@k8s-ci-robot k8s-ci-robot added the priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. label Sep 17, 2019
teddyking added a commit to vmware-tanzu/projects-operator that referenced this issue Sep 19, 2019
Seems like something went terribly wrong and the author of
gomodules/jsonpatch moved a tag from one commit to another. This broker
everything (see info in:
gomodules/jsonpatch#21).

As a result, and because of the advice in this issue:
kubernetes-sigs/kubebuilder#997 we have bumped
our controller-runtime dependency to resolve the issue.

This seemed to work. Also bumped the go version in go.mod.

Co-authored-by: James Myers <jmyers@pivotal.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants