Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Switch from cfg = "host" to "exec" #2196

Merged
merged 1 commit into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion container/flatten.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ container_flatten = rule(
),
"_flattener": attr.label(
default = Label("//container/go/cmd/flattener"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand Down
4 changes: 2 additions & 2 deletions container/image.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ _attrs = dicts.add(_layer.attrs, {
),
"create_image_config": attr.label(
default = Label("//container/go/cmd/create_image_config:create_image_config"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand Down Expand Up @@ -749,7 +749,7 @@ _attrs = dicts.add(_layer.attrs, {
),
"_digester": attr.label(
default = "//container/go/cmd/digester",
cfg = "host",
cfg = "exec",
executable = True,
),
}, _hash_tools, _layer_tools)
Expand Down
2 changes: 1 addition & 1 deletion container/layer.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def _impl(
_layer_attrs = dicts.add({
"build_layer": attr.label(
default = Label("//container:build_tar"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand Down
4 changes: 2 additions & 2 deletions container/layer_tools.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def incremental_load(
tools = {
"extract_config": attr.label(
default = Label("//container/go/cmd/extract_config:extract_config"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand All @@ -319,7 +319,7 @@ tools = {
),
"_join_layers": attr.label(
default = Label("//container/go/cmd/join_layers"),
cfg = "host",
cfg = "exec",
executable = True,
),
}
8 changes: 4 additions & 4 deletions container/pull.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,25 @@ _container_pull_attrs = {
"puller_darwin": attr.label(
executable = True,
default = Label("@go_puller_darwin//file:downloaded"),
cfg = "host",
cfg = "exec",
doc = "Exposed to provide a way to test other pullers on macOS",
),
"puller_linux_amd64": attr.label(
executable = True,
default = Label("@go_puller_linux_amd64//file:downloaded"),
cfg = "host",
cfg = "exec",
doc = "Exposed to provide a way to test other pullers on Linux",
),
"puller_linux_arm64": attr.label(
executable = True,
default = Label("@go_puller_linux_arm64//file:downloaded"),
cfg = "host",
cfg = "exec",
doc = "Exposed to provide a way to test other pullers on Linux",
),
"puller_linux_s390x": attr.label(
executable = True,
default = Label("@go_puller_linux_s390x//file:downloaded"),
cfg = "host",
cfg = "exec",
doc = "Exposed to provide a way to test other pullers on Linux",
),
"registry": attr.string(
Expand Down
4 changes: 2 additions & 2 deletions container/push.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@ container_push_ = rule(
),
"_digester": attr.label(
default = "//container/go/cmd/digester",
cfg = "host",
cfg = "exec",
executable = True,
),
"_pusher": attr.label(
default = "//container/go/cmd/pusher",
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand Down
2 changes: 1 addition & 1 deletion contrib/automatic_container_release/metadata_merge.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ metadata_merge = rule(
),
"_merger": attr.label(
default = "@io_bazel_rules_docker//contrib/go/cmd/metadata_merge",
cfg = "host",
cfg = "exec",
executable = True,
doc = "The go binary that merges a given list of YAML files to " +
"produce a single output YAML.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ packages_metadata = rule(
),
"_converter": attr.label(
default = "@io_bazel_rules_docker//contrib/go/cmd/packages_metadata",
cfg = "host",
cfg = "exec",
executable = True,
),
},
Expand Down
2 changes: 1 addition & 1 deletion contrib/compare_ids_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ compare_ids_test = rule(
allow_files = True,
default = ":compare_ids_test",
executable = True,
cfg = "host",
cfg = "exec",
),
},
test = True,
Expand Down
2 changes: 1 addition & 1 deletion contrib/passwd.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ passwd_tar = rule(
attrs = {
"build_tar": attr.label(
default = Label("//container:build_tar"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand Down
2 changes: 1 addition & 1 deletion contrib/push-all.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ container_push = rule(
),
"_pusher": attr.label(
default = Label("//container/go/cmd/pusher"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand Down
2 changes: 1 addition & 1 deletion contrib/repro_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ container_repro_test = rule(
),
"_extract_image_id": attr.label(
default = Label("//contrib:extract_image_id"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand Down
2 changes: 1 addition & 1 deletion docker/package_managers/download_pkgs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ _attrs = {
),
"_extract_image_id": attr.label(
default = Label("//contrib:extract_image_id"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand Down
6 changes: 3 additions & 3 deletions docker/package_managers/install_pkgs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ _attrs = {
"_config_stripper": attr.label(
default = "//docker/util:config_stripper",
executable = True,
cfg = "host",
cfg = "exec",
),
"_extract_image_id": attr.label(
default = Label("//contrib:extract_image_id"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand All @@ -195,7 +195,7 @@ _attrs = {
),
"_to_json_tool": attr.label(
default = Label("//docker/util:to_json"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand Down
4 changes: 2 additions & 2 deletions docker/security/security_check.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ security_check = rule(
# JSON to YAML converter.
"_json_to_yaml": attr.label(
default = Label("@io_bazel_rules_docker//docker/security/cmd/json_to_yaml"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
# The security checker python executable.
"_security_check": attr.label(
default = Label("@io_bazel_rules_docker//docker/security:security_check"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand Down
2 changes: 1 addition & 1 deletion docker/toolchain_container/debian_pkg_tar.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ aggregate_debian_pkgs_attrs = {
"language_layers": attr.label_list(),
"_extract_image_id": attr.label(
default = Label("//contrib:extract_image_id"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand Down
10 changes: 5 additions & 5 deletions docker/util/run.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ _extract_attrs = {
),
"_extract_image_id": attr.label(
default = Label("//contrib:extract_image_id"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand Down Expand Up @@ -257,7 +257,7 @@ _commit_attrs = {
),
"_extract_image_id": attr.label(
default = Label("//contrib:extract_image_id"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand All @@ -271,7 +271,7 @@ _commit_attrs = {
),
"_to_json_tool": attr.label(
default = Label("//docker/util:to_json"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand Down Expand Up @@ -440,7 +440,7 @@ _commit_layer_attrs = dicts.add({
),
"_extract_image_id": attr.label(
default = Label("//contrib:extract_image_id"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand All @@ -450,7 +450,7 @@ _commit_layer_attrs = dicts.add({
),
"_last_layer_extractor_tool": attr.label(
default = Label("//contrib:extract_last_layer"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand Down
2 changes: 1 addition & 1 deletion skylib/hash.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def sha256(ctx, artifact, execution_requirements = None):
tools = {
"sha256": attr.label(
default = Label("//container/go/cmd/sha256:sha256"),
cfg = "host",
cfg = "exec",
executable = True,
allow_files = True,
),
Expand Down
2 changes: 1 addition & 1 deletion skylib/zip.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def gunzip(ctx, artifact):
tools = {
"_zipper": attr.label(
default = Label("//container/go/cmd/zipper"),
cfg = "host",
cfg = "exec",
executable = True,
),
}
14 changes: 7 additions & 7 deletions toolchains/docker/toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ docker_toolchain = rule(
"build_tar_target": attr.label(
allow_files = True,
doc = "Bazel target for the build_tar tool.",
cfg = "host",
cfg = "exec",
executable = True,
),
# client_config cannot be a Bazel label because this attribute will be used in
Expand All @@ -89,7 +89,7 @@ docker_toolchain = rule(
allow_files = True,
doc = "Bazel target for the gzip tool. " +
"Should only be set if gzip_path is unset.",
cfg = "host",
cfg = "exec",
executable = True,
),
"tool_path": attr.string(
Expand All @@ -99,7 +99,7 @@ docker_toolchain = rule(
allow_files = True,
doc = "Bazel target for the docker tool. " +
"Should only be set if tool_path is unset.",
cfg = "host",
cfg = "exec",
executable = True,
),
"xz_path": attr.string(
Expand All @@ -110,7 +110,7 @@ docker_toolchain = rule(
allow_files = True,
doc = "Bazel target for the xz tool. " +
"Should only be set if xz_path is unset.",
cfg = "host",
cfg = "exec",
executable = True,
),
},
Expand Down Expand Up @@ -189,7 +189,7 @@ toolchain_configure = repository_rule(
attrs = {
"build_tar_target": attr.label(
executable = True,
cfg = "host",
cfg = "exec",
allow_files = True,
mandatory = False,
doc = "The bazel target for the build_tar tool.",
Expand Down Expand Up @@ -233,7 +233,7 @@ toolchain_configure = repository_rule(
),
"gzip_target": attr.label(
executable = True,
cfg = "host",
cfg = "exec",
allow_files = True,
mandatory = False,
doc = "The bazel target for the gzip tool. " +
Expand All @@ -247,7 +247,7 @@ toolchain_configure = repository_rule(
),
"xz_target": attr.label(
executable = True,
cfg = "host",
cfg = "exec",
allow_files = True,
mandatory = False,
doc = "The bazel target for the xz tool. " +
Expand Down