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

Move tools into separate hack go module #10308

Merged
merged 2 commits into from
Dec 9, 2020

Conversation

rifelpet
Copy link
Member

@rifelpet rifelpet commented Nov 24, 2020

This follows a pattern used in other projects moving imports used only in development tools into a separate go module. The new module does not use vendoring. all scripts and make targets that use the tools will now build them into _output/bin/.

I updated the goimports python scripts to rely less on GOPATH but the goimports tool itself still relies on it.

EDIT: i opted to keep go-bindata in the root module because bazel depends on it and I haven't yet figured out how we could best handle that without vendoring go-bindata somewhere:

cmd = """
$(location //vendor/github.com/go-bindata/go-bindata/go-bindata:go-bindata) \
-o "$(OUTS)" -pkg models \
-nometadata \
-nocompress \
-prefix $$(pwd) \
-prefix upup/models $(SRCS)
""",

also update-machinery.sh still relies on GOPATH, we can update this in a followup PR

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 24, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rifelpet

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 24, 2020
@rifelpet rifelpet changed the title Move tools into separate hack go module WIP Move tools into separate hack go module Nov 24, 2020
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 24, 2020
@rifelpet
Copy link
Member Author

I'll need to figure out how to reference the new go-bindata location within this bazel rule

cmd = """
$(location //vendor/github.com/go-bindata/go-bindata/go-bindata:go-bindata) \
-o "$(OUTS)" -pkg models \
-nometadata \
-nocompress \
-prefix $$(pwd) \
-prefix upup/models $(SRCS)
""",
tools = [
"//vendor/github.com/go-bindata/go-bindata/go-bindata",
],

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 3, 2020
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 9, 2020
@rifelpet rifelpet changed the title WIP Move tools into separate hack go module Move tools into separate hack go module Dec 9, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 9, 2020
@rifelpet
Copy link
Member Author

rifelpet commented Dec 9, 2020

this is ready for review. as mentioned in the original comment I had to back out some of the moves, we can address them in followup PRs.

@olemarkus
Copy link
Member

This looks good! Works as intended locally.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 9, 2020
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit f4c2bdb into kubernetes:master Dec 9, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/api cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants