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
Purge the root vendor directory #213
Purge the root vendor directory #213
Conversation
/cc @joelanford |
I realize we need to also bump this repository to Go 1.17. |
Interesting: "failed to get packages from new commit "HEAD" (5116b59): could not determine GOARCH and Go compiler". |
// Generate deepcopy and conversion. | ||
_ "sigs.k8s.io/controller-tools/cmd/controller-gen" | ||
// Manipulate YAML. | ||
_ "github.com/mikefarah/yq/v3" | ||
// Generate embedded files. | ||
_ "github.com/go-bindata/go-bindata/v3/go-bindata" |
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.
Are we able to use go-get-tool for go-bindata as well?
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.
Surprisingly, this was a bit more complicated that I had anticipated due to how bloated the manifests
target is right now, and exporting the PATH variable to point to this repositories' root ./bin
directory before running go generate ...
wasn't working, and that command was always searching for packages in the vendor directory, despite no GOFLAGS being set in my local environment.
It's possible I'm missing something obvious, but given the o-f/api recent changes that contain massive changelogs due to dependency bumps, maybe we can tackle this in a follow-up, and/or generalize the value we see in the tools.go file going forward throughout the OLM-controller repositories?
I'd like to resolve that go-apidiff before merging this to avoid putting this repository in a state where we break that action, and potentially evaluate purging the root tools.go file. /hold |
78d4989
to
0fed0bb
Compare
Ah, it looks like we don't have the workflow_dispatch event trigger enabled for this repository. Opened a quick PR (#214) for enabling that for the two workflow definitions. |
b3dc359
to
e2c4014
Compare
e2c4014
to
d50bba5
Compare
d50bba5
to
0c07d58
Compare
Signed-off-by: timflannagan <timflannagan@gmail.com>
7f1da35
to
2622e83
Compare
Signed-off-by: timflannagan <timflannagan@gmail.com>
49aff1e
to
0028053
Compare
/hold cancel |
I have seen how annoying the vendor directory is during PR. That said there are good reasons for keeping a copy of the dependencies. A possible mitigation could be to have the vendor directory stored in a separate repository when a new release is cut. What do you think? |
I think the value of the vendor directory has somewhat deteriorated as modules become more stable, and my preference would be to remove the vendor directory from upstream repositories, while maintaining the vendor directory in any downstream environments. That should serve as a nice balance where we can rely on dependencies being available for downstream builds, but help improve the upstream contributor/reviewer experience. Thoughts? |
Yes that sounds good to me. My main concern was indeed when there is a need to patch a downstream release and the dependency version is nowhere to be found. |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dinhxuanvu, timflannagan 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 |
/lgtm |
Update the repository layout and avoid commiting the root vendor directory into source. Update the root .gitignore and ignore the vendor directory. For any CI/CD (or utility-esq Makefile targets) avoid referencing the vendor equivalent through
go run ...
and instead use the go-get-tool from the operator-sdk/kubebuilder world) and pull down that dependency at runtime.