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

Set the output base for fitask #11411

Merged
merged 2 commits into from
May 11, 2021
Merged

Conversation

hakman
Copy link
Member

@hakman hakman commented May 8, 2021

> fitask --help
  -o, --output-base string               Output base; defaults to $GOPATH/src/ or ./ if $GOPATH is not set.

/cc @olemarkus @rifelpet

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 8, 2021
Makefile Outdated
@@ -152,7 +152,8 @@ ${KOPS}:
codegen:
go install k8s.io/kops/upup/tools/generators/...
${GOPATH_1ST}/bin/fitask --input-dirs k8s.io/kops/upup/pkg/fi/... \
--go-header-file "hack/boilerplate/boilerplate.generatego.txt"
--go-header-file "hack/boilerplate/boilerplate.generatego.txt" \
--output-base ${GOPATH_1ST}/src/k8s.io/kops/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe quote this one too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering that the fitask path is unquoted too, a better solution was to just escape the spaces at source.
Also, the quoting on the header file path was not very useful.

@hakman hakman force-pushed the fix-codegen branch 3 times, most recently from 29d55c6 to 54b4a1a Compare May 9, 2021 06:15
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 9, 2021
@hakman hakman requested a review from olemarkus May 9, 2021 06:38
@hakman
Copy link
Member Author

hakman commented May 9, 2021

/retest

Makefile Outdated
${GOPATH_1ST}/bin/fitask \
--input-dirs k8s.io/kops/upup/pkg/fi/... \
--go-header-file hack/boilerplate/boilerplate.generatego.txt \
--output-base ${GOPATH_1ST}/src/k8s.io/kops/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're trying to reduce our reliance on GOPATH, could we use KOPS_ROOT instead? It would probably be good to compile the fitask binary into _output/bin to match the TOOLS_BIN references in hack/.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Done.

@hakman hakman force-pushed the fix-codegen branch 2 times, most recently from 5ab5488 to 4eca458 Compare May 11, 2021 03:46
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 11, 2021
@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 May 11, 2021
@k8s-ci-robot k8s-ci-robot merged commit 6dd743f into kubernetes:master May 11, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone May 11, 2021
@johngmyers johngmyers modified the milestones: v1.21, v1.22 May 13, 2021
@hakman hakman deleted the fix-codegen branch October 22, 2021 07:13
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. 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants