-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
skip hack/tools/vendor folder #104610
skip hack/tools/vendor folder #104610
Conversation
@aojea: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
/assign @BenTheElder @thockin |
-name '_*' -o \ | ||
-name '.[^.]*' -o \ | ||
-path './vendor' -o \ | ||
-path './hack/tools/vendor' \ |
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.
How about this instead:
find -H . \
\( \
-not \( \
\( \
-name '_*' -o \
-name '.[^.]*' -o \
\( \
-name 'vendor' \
-type d \
\) \
\) -prune \
\) \
\) \
That will exclude ALL vendor directories, wherever they might pop up
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.
I wanted to do that but I was not confident
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 there any conflict with staging?
The makefiles scripts create a variable with all the go files that are part of the Kubernetes source tree, including staging. As today, this variable has a size of < 100kb wc .make/all_go_dirs.mk 2326 2326 98905 .make/all_go_dirs.mk This variable is passed as argument in the Makefiles, where it is expanded. In Linux, there is a limit to the max size of the arguments MAX_ARG_STRLEN. If the arguments go above 128k, you get a nice: execvp: /usr/bin/env: Argument list too long If you, for whatever reason, do some go mod vendor inside the hack/tools folder, these files will be added to the variable and most probably you'll go above the limit and get that error. Then, you'll learn a lot about Makefils, shell expansion, strace, execpve, ARG_MAX and MAX_ARG_STRLEN,until you realize what is the real problem :).
70658a5
to
2fee0c4
Compare
Thanks! /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aojea, thockin 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 |
/sig testing |
The makefiles scripts create a variable with all the go files
that are part of the Kubernetes source tree, including staging.
As today, this variable has a size of < 100kb
wc .make/all_go_dirs.mk
2326 2326 98905 .make/all_go_dirs.mk
This variable is passed as argument in the Makefiles, where it
is expanded. In Linux, there is a limit to the max size of
the arguments MAX_ARG_STRLEN.
If the arguments go above 128k, (depends on the kernel, by default #define MAX_ARG_STRLEN (PAGE_SIZE * 32))
you get a nice:
execvp: /usr/bin/env: Argument list too long
If you, for whatever reason, do some go mod vendor inside the
hack/tools folder, these files will be added to the variable
and most probably you'll go above the limit and get that error.
Then, you'll learn a lot about Makefils, shell expansion, strace,
execpve, ARG_MAX and MAX_ARG_STRLEN,until you realize what is
the real problem :).
/kind cleanup
How to reproduce it
Special notes
I know that nobody should vendor anything in that hack/tools/ folder, and I did it only to experiment with some things, but the fact that
make clean
don't delete the folder andgit status
doesn't report nothing made me spend more than 3 hours with this 馃檭