-
Notifications
You must be signed in to change notification settings - Fork 184
controller: fix module imports #71
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
controller: fix module imports #71
Conversation
The controller.test binary and the example still imported without the /v5 suffix. This resulted in spurious "sigs.k8s.io/sig-storage-lib-external-provisioner v4.1.0+incompatible // indirect" go.mod entries in projects using the lib (kubernetes-csi/external-provisioner#405 (comment)). The example needs to use the sources that it was checked out with. Otherwise it is impossible to change the API and the example in a single commit and/or there is a risk that breaking changes go undetected because the example continues to build with the unmodified lib.
| sigs.k8s.io/sig-storage-lib-external-provisioner/v5 v5.0.0 | ||
| ) | ||
|
|
||
| replace sigs.k8s.io/sig-storage-lib-external-provisioner/v5 => ../.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without it, "make" in examples/hostpath-provisioner will use the latest published release of sigs.k8s.io/sig-storage-lib-external-provisioner/v5 instead of the current source code.
Now consider what happens when a breaking API change is made:
- first the current implementation of the lib gets updated
- a new release must be tagged which contains an example that still uses the old API
- only now can the example be updated
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pohly, wongma7 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Change 'make test-vet' back to call 'go vet'
The controller.test binary and the example still imported without the
/v5 suffix. This resulted in spurious
"sigs.k8s.io/sig-storage-lib-external-provisioner v4.1.0+incompatible
// indirect" go.mod entries in projects using the
lib (kubernetes-csi/external-provisioner#405 (comment)).
The example needs to use the sources that it was checked out
with. Otherwise it is impossible to change the API and the example in
a single commit and/or there is a risk that breaking changes go
undetected because the example continues to build with the unmodified
lib.