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

register toolchain only for container exec and use it in py*_image #1173

Merged
merged 12 commits into from
Oct 4, 2019
Prev Previous commit
Next Next commit
fix compatible_with in toolchain + remove positional-args warning
  • Loading branch information
Nicolas Lopez committed Oct 2, 2019
commit 33152b31212bc6039cd4a1270c97361d1c9a02db
2 changes: 1 addition & 1 deletion .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildifier:
# are enabled except:
# rule-impl-return, uninitialized, return-value, rule-impl-return
# TODO (suvanjan): Re-enable once issues are fixed.
warnings: "attr-cfg,attr-license,attr-non-empty,attr-output-default,attr-single-file,confusing-name,constant-glob,ctx-actions,ctx-args,depset-iteration,depset-union,dict-concatenation,duplicated-name,filetype,function-docstring,git-repository,http-archive,integer-division,load,load-on-top,module-docstring,name-conventions,native-build,native-package,no-effect,out-of-order-load,output-group,package-name,package-on-top,positional-args,redefined-variable,repository-name,same-origin-load,string-iteration,unreachable,unsorted-dict-items,unused-variable"
warnings: "attr-cfg,attr-license,attr-non-empty,attr-output-default,attr-single-file,confusing-name,constant-glob,ctx-actions,ctx-args,depset-iteration,depset-union,dict-concatenation,duplicated-name,filetype,function-docstring,git-repository,http-archive,integer-division,load,load-on-top,module-docstring,name-conventions,native-build,native-package,no-effect,out-of-order-load,output-group,package-name,package-on-top,redefined-variable,repository-name,same-origin-load,string-iteration,unreachable,unsorted-dict-items,unused-variable"
Copy link
Contributor Author

@nlopezgi nlopezgi Oct 2, 2019

Choose a reason for hiding this comment

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

removed "positional-args" due to bazelbuild/buildtools#726

platforms:
ubuntu1604:
test_targets:
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ dockerfile_image(
"kaniko_debug",
]]

# Register the default py_toolchain for containerized execution
# Register the default py_toolchain / platform for containerized execution
register_toolchains("//toolchains/python:container_py_toolchain")

register_execution_platforms("//toolchains/python:container_host_platform")
Expand Down
4 changes: 2 additions & 2 deletions toolchains/python/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ py_runtime_pair(
# registration of this one in @io_bazel_rules_docker//python:image.bzl
toolchain(
name = "container_py_toolchain",
target_compatible_with = [
":run_in_container",
exec_compatible_with = [
"@io_bazel_rules_docker//toolchains/python:run_in_container",
],
toolchain = ":default_container_py_runtime_pair",
toolchain_type = "@bazel_tools//tools/python:toolchain_type",
Expand Down