-
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add env var to verify-typecheck for serial execution #108618
Conversation
/sig testing |
I'm not sure either /assign @thockin |
why not defaulting the tool to serial instead?
|
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'm skeptical. Does every verify* script take this argument and know to pass it down? At least a few others use "$@", so I'd expect them to break...
$ grep '$@' hack/verify-*.sh
hack/verify-boilerplate.sh:done < <("${boiler}" "$@")
hack/verify-golangci-lint.sh: golangci-lint run "$@" >&2 || res=$?
hack/verify-import-aliases.sh:go run cmd/preferredimports/preferredimports.go "$@" || ret=$?
hack/verify-typecheck.sh:go run test/typecheck/main.go "$@" || ret=$?
If the goal is to pass this down to a single script, like verify-typecheck.sh, I think you want something more like make verify TYPECHECK_ARGS="--parallel=1"
and then you can use that inside the typecheck script.
Or just change to tool for now, and revert it when our required Go version is safe again.
build/root/Makefile
Outdated
@@ -128,7 +128,7 @@ verify: | |||
echo "$$VERIFY_HELP_INFO" | |||
else | |||
verify: | |||
KUBE_VERIFY_GIT_BRANCH=$(BRANCH) hack/make-rules/verify.sh | |||
KUBE_VERIFY_GIT_BRANCH=$(BRANCH) hack/make-rules/verify.sh $(ARGS) |
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.
This variable is undefined and very ambiguously named, at best.
hack/make-rules/verify.sh
Outdated
@@ -133,10 +133,10 @@ function run-cmd { | |||
local tr | |||
|
|||
if ${SILENT}; then | |||
juLog -output="${output}" -class="verify" -name="${testname}" "$@" &> /dev/null | |||
juLog -output="${output}" -class="verify" -name="${testname}" "$@" "${ARGS:-}" &> /dev/null |
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 the goal to pass the args to EVERY verify-* script? Is that right?
1513d99
to
d3da771
Compare
hack/verify-typecheck.sh
Outdated
@@ -34,8 +34,13 @@ make --no-print-directory -C "${KUBE_ROOT}" generated_files | |||
# that library doesn't work well with multiple modules. Until that is done, | |||
# force this tooling to run in a fake GOPATH. | |||
ret=0 | |||
args=( "$@" ) |
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.
simpler?
TYPECHECK_SERIAL="${TYPECHECK_SERIAL:-false}"
hack/run-in-gopath.sh \
go run test/typecheck/main.go "$@" --serial "$TYPECHECK_SERIAL" || ret=$?
Signed-off-by: Eddie Zaneski <eddiezane@gmail.com>
d3da771
to
50bdc98
Compare
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eddiezane, 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 |
/triage accepted |
What type of PR is this?
/kind flake
What this PR does / why we need it:
This PR makes it possible to set serial execution for verify-typecheck.sh. This is needed bring down the memory usage of the flaking job that is getting oom killed. This is due to Go 1.17 requiring double the amount of memory for this (see golang/go#49035).
Which issue(s) this PR fixes:
Ref #107702
Special notes for your reviewer:
I'm not sure if this is the best way to pass these along.
Another option is to make typecheck support an env var
kubernetes/test/typecheck/main.go
Line 42 in 4763d75
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: