Change:
In I tried to reorganize the kube-proxy build a bit, and ran into the problem that verify-typecheck failed because was no longer buildable on darwin/amd64 and darwin/arm64. This was surprising because we don't build kube-proxy on OS X. It seems like verify-typecheck ought to be taking / from into account when deciding what to check. There's no reason to be checking the OS X type compatibility of binaries that we don't build on OS X.
/sig network
/remove-sig network /sig testing Agree, we need to plumb this through. We should also consider plumbing through static vs non-static and cgo enable/disable while we're at it. The goal is to be a low-fidelity cross-build to catch most code errors that would break the full without actually having to run the computationally expensive cross build, but there's some mismatch ...
/triage accepted

Discussion:
cd "${KUBE_ROOT}" # verify the providerless build # https://github.com/kubernetes/enhancements/blob/master/keps/sig-cloud-provider/1179-building-without-in-tree-providers/README.md <del> hack/verify-typecheck.sh --skip-test --tags=providerless --ignore-dirs=test </del> <ins> hack/verify-typecheck.sh --skip-test --tags=providerless --ignore-dirs=test/e2e </ins> # verify using go list if _out="$(go list -mod=readonly -tags "providerless" -e -json  k8s.io/kubernetes/cmd/kubelet/... 

cd "${KUBE_ROOT}" <ins> ret=0 TYPECHECK_SERIAL="${TYPECHECK_SERIAL:-false}" SERVER_PLATFORMS=$(echo "${KUBE_SUPPORTED_SERVER_PLATFORMS[@]}" | tr ' ' ',') CLIENT_PLATFORMS=$(echo "${KUBE_SUPPORTED_CLIENT_PLATFORMS[@]}" | tr ' ' ',') NODE_PLATFORMS=$(echo "${KUBE_SUPPORTED_NODE_PLATFORMS[@]}" | tr ' ' ',') TEST_PLATFORMS=$(echo "${KUBE_SUPPORTED_TEST_PLATFORMS[@]}" | tr ' ' ',') </ins> # As of June, 2020 the typecheck tool is written in terms of go/packages, but # that library doesn't work well with multiple modules.  Until that is done, # force this tooling to run in a fake GOPATH. <del> ret=0 TYPECHECK_SERIAL="${TYPECHECK_SERIAL:-false}" </del> hack/run-in-gopath.sh  <del> go run test/typecheck/main.go "$@" "--serial=$TYPECHECK_SERIAL" || ret=$? </del> <ins> go run test/typecheck/main.go "$@" --serial="${TYPECHECK_SERIAL}" --platform "${SERVER_PLATFORMS}" "${KUBE_SERVER_TARGETS[@]}"  || ret=$? hack/run-in-gopath.sh  go run test/typecheck/main.go "$@" --serial="${TYPECHECK_SERIAL}" --platform "${CLIENT_PLATFORMS}" "${KUBE_CLIENT_TARGETS[@]}"  || ret=$? hack/run-in-gopath.sh  go run test/typecheck/main.go "$@" --serial="${TYPECHECK_SERIAL}" --platform "${NODE_PLATFORMS}" "${KUBE_NODE_TARGETS[@]}"  || ret=$? # $KUBE_TEST_TARGETS doesn't seem to work like the other TARGETS variables... hack/run-in-gopath.sh  go run test/typecheck/main.go "$@" --serial="${TYPECHECK_SERIAL}" --platform "${TEST_PLATFORMS}" test/e2e  || ret=$? </ins> if [[ $ret -ne 0 ]]; then echo "!!! Type Check has failed. This may cause cross platform build failures." >&2 echo "!!! Please see https://git.k8s.io/kubernetes/test/typecheck for more information." >&2

}() f := false <del> serialFprintf(os.Stdout, "type-checking %sn", plat) </del> <ins> if len(args) != 0 { serialFprintf(os.Stdout, "type-checking %s against %sn", plat, args) } else { serialFprintf(os.Stdout, "type-checking %sn", plat) } </ins> errors, err := c.verify(plat) if err != nil { serialFprintf(os.Stderr, "ERROR(%s): failed to verify: %vn", plat, err)