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

fails to build with --incompatible_restrict_named_params #81382

mariusgrigoriu opened this issue Aug 13, 2019 · 1 comment


Copy link

commented Aug 13, 2019

What happened:
Running bazel 0.26.1 with --incompatible_restrict_named_params flag fails with

ERROR: /private/var/tmp/_bazel_marius/c39204db2cb7e0a79ba2096a64d88d76/external/io_k8s_kubernetes/staging/src/ Traceback (most recent call last):
	File "/private/var/tmp/_bazel_marius/c39204db2cb7e0a79ba2096a64d88d76/external/io_k8s_kubernetes/staging/src/", line 6
		gen_openapi(outs = ["zz_generated.openapi.go...], ...")
	File "/private/var/tmp/_bazel_marius/c39204db2cb7e0a79ba2096a64d88d76/external/io_k8s_kubernetes/build/code_generation.bzl", line 59, in gen_openapi
		go_genrule(name = "zz_generated.openapi", src...")], <4 more arguments>)
	File "/private/var/tmp/_bazel_marius/c39204db2cb7e0a79ba2096a64d88d76/external/io_k8s_kubernetes/build/code_generation.bzl", line 66, in go_genrule
		" ".join([(("cd $$GOPATH/src/" + go_prefi..."])
	File "/private/var/tmp/_bazel_marius/c39204db2cb7e0a79ba2096a64d88d76/external/io_k8s_kubernetes/build/code_generation.bzl", line 75, in " ".join
		",".join([go_pkg(pkg) for pkg in tags_val..."]])
	File "/private/var/tmp/_bazel_marius/c39204db2cb7e0a79ba2096a64d88d76/external/io_k8s_kubernetes/build/code_generation.bzl", line 75, in ",".join
	File "/private/var/tmp/_bazel_marius/c39204db2cb7e0a79ba2096a64d88d76/external/io_k8s_kubernetes/build/code_generation.bzl", line 44, in go_pkg
		pkg.replace("staging/src/", "vendor/", maxsplit ...)
unexpected keyword 'maxsplit', for call to method replace(old, new, maxsplit = None) of 'string'

What you expected to happen:
The build conforms to bazelbuild/bazel#8147

Other info: This was discovered when building an external project that imports Kubernetes for the purpose of building e2e tests. I expect the same error to occur when building Kubernetes itself with a future version of bazel or with the incompatible flag set.

Version: 1.15.2+


This comment has been minimized.

Copy link

commented Aug 13, 2019

@mariusgrigoriu: There are no sig labels on this issue. Please add a sig label by either:

  1. mentioning a sig: @kubernetes/sig-<group-name>-<group-suffix>
    e.g., @kubernetes/sig-contributor-experience-<group-suffix> to notify the contributor experience sig, OR

  2. specifying the label manually: /sig <group-name>
    e.g., /sig scalability to apply the sig/scalability label

Note: Method 1 will trigger an email to the group. See the group list.
The <group-suffix> in method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.