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

go get / go install for projects depending on capi does not work #5184

Closed
enxebre opened this issue Sep 1, 2021 · 10 comments
Closed

go get / go install for projects depending on capi does not work #5184

enxebre opened this issue Sep 1, 2021 · 10 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@enxebre
Copy link
Member

enxebre commented Sep 1, 2021

What steps did you take and what happened:

go install sigs.k8s.io/[email protected]: sigs.k8s.io/[email protected]
	The go.mod file for the module providing named packages contains one or
	more replace directives. It must not contain directives that would cause
	it to be interpreted differently than if it were the main module.
Albertos-MacBook-Pro:~@albertogarla $ go get sigs.k8s.io/[email protected]
go get: sigs.k8s.io/[email protected] updating to
	sigs.k8s.io/[email protected] requires
	sigs.k8s.io/cluster-api/[email protected] requires
	sigs.k8s.io/[email protected]: invalid version: unknown revision 000000000000
go get: sigs.k8s.io/cluster-api/test@none updating to
	sigs.k8s.io/cluster-api/[email protected] requires
	sigs.k8s.io/[email protected]: invalid version: unknown revision 000000000000

What did you expect to happen:
go get / go install works

Anything else you would like to add:
This is the controversial clause https://github.com/kubernetes-sigs/cluster-api/blob/master/test/go.mod#L5
This can be workaround by adding a replace clause for capi in the invoking go.mod file. Nevertheless I'd expect us to provide a better solution so this commands work out of the box.

Environment:

  • Cluster-api version:
  • Minikube/KIND version:
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):

/kind bug
[One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels]

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 1, 2021
@enxebre enxebre changed the title go get / go install for capi providers does not work go get / go install for projects depending on capi does not work Sep 1, 2021
@killianmuldoon
Copy link
Contributor

adding a replace clause for capi in the invoking go.mod file

Can you expand on this?

Another solution I'm seeing is to avoid doing this for release versions of a project so that go install etc. will work for release versions but this easier method of testing the latest code can be used for whatever the local version is. c/f

@enxebre
Copy link
Member Author

enxebre commented Sep 7, 2021

Can you expand on this?

Basically what any consumer needs to do today, e.g any provider https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/go.mod#L5

Another solution I'm seeing is to avoid doing this for release versions of a project so that go install etc. will work for release versions but this easier method of testing the latest code can be used for whatever the local version is. c/f

Sounds interesting. This should possible be pointing to a pinned version https://github.com/kubernetes-sigs/cluster-api/blob/v0.4.2/test/go.mod#L5

@killianmuldoon
Copy link
Contributor

@fabriziopandini do you think we could update the release tools to pin this version for each release?

@vincepri
Copy link
Member

vincepri commented Sep 8, 2021

@killianmuldoon What did you have in mind to do the above? The current release process happens after the tag is published

@killianmuldoon
Copy link
Contributor

I was thinking maybe adding something to change this line in go.mod under 'make release' - but with the ordering there will be drift with the go.mod.

@vincepri
Copy link
Member

/milestone Next

@k8s-ci-robot k8s-ci-robot added this to the Next milestone Sep 30, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 29, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 28, 2022
@sbueringer
Copy link
Member

/close
in favor of #6081

@k8s-ci-robot
Copy link
Contributor

@sbueringer: Closing this issue.

In response to this:

/close
in favor of #6081

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

6 participants