From 225924be4297467769199a5b63e979f280ef4fdb Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 12:32:21 -0600 Subject: [PATCH 01/18] [ci] enable macos on buildkite --- .bazelci/presubmit.yml | 15 +++++++-------- .bazelrc | 6 ++++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 91abdae24..687ed15df 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -15,14 +15,13 @@ tasks: - //... test_flags: - --config=buildkite - # TODO(user): re-enable testing on macos. - # default_workspace_macos: - # platform: macos - # test_targets: - # - //... - # test_flags: - # - --config=buildkite - # - --deleted_packages=tests/contrib,tests/docker/util + default_workspace_macos: + platform: macos + test_targets: + - //... + test_flags: + - --config=buildkite + - --deleted_packages=tests/contrib,tests/docker/util testing_examples: platform: ubuntu1804 working_directory: testing/examples diff --git a/.bazelrc b/.bazelrc index 178245be2..c153bc882 100644 --- a/.bazelrc +++ b/.bazelrc @@ -56,7 +56,13 @@ test:remote --google_default_credentials=true test:remote --remote_timeout=3600 test:remote --keep_going +build:bezel --bes_backend=grpcs://api.bzl.io:443 +build:bezel --bes_results_url=https://bzl.io/pipeline +build:bezel --bes_timeout=5s + # Configuration specific to buildkite CI testing the default workspace + +test:buildkite --config=bezel test:buildkite --action_env=PATH test:buildkite --define=ENV_KEY=my_key # for tests/container:set_env_make_vars_test test:buildkite --define=ENV_VALUE=my_value # for tests/container:set_env_make_vars_test From 3266e7a8fee4c0b2700340532779c827bfa9a713 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 12:41:38 -0600 Subject: [PATCH 02/18] Try autodetect docker binary location --- WORKSPACE | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 50b4bb3e4..3f29aeb23 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -19,10 +19,7 @@ load( docker_toolchain_configure = "toolchain_configure", ) -docker_toolchain_configure( - name = "docker_config", - docker_path = "/usr/bin/docker", -) +docker_toolchain_configure(name = "docker_config") # Consumers shouldn't need to do this themselves once WORKSPACE is # instantiated recursively. From acef76fd084f73c19021c86bb3bbafd5f6721a9c Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 13:09:30 -0600 Subject: [PATCH 03/18] Try skip digest tests on linux --- .bazelci/presubmit.yml | 4 ++++ WORKSPACE | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 687ed15df..2f2dc05bb 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -19,6 +19,10 @@ tasks: platform: macos test_targets: - //... + - # These digests tests have different values on macos than linux so they are skipped on mac + - -//tests/container:alpine_custom_attr_digest_test + - -//tests/container:new_alpine_linux_armv6_image_tar_digest_test + - -//tests/container:test_digest_output1 test_flags: - --config=buildkite - --deleted_packages=tests/contrib,tests/docker/util diff --git a/WORKSPACE b/WORKSPACE index 3f29aeb23..587bbc3ea 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -19,6 +19,9 @@ load( docker_toolchain_configure = "toolchain_configure", ) +# This will attempt to determine the location of the 'docker' binary that is +# used in some parts of rules_docker. On linux this is typically +# /usr/bin/docker; on macos /usr/local/bin/docker. docker_toolchain_configure(name = "docker_config") # Consumers shouldn't need to do this themselves once WORKSPACE is From 794576a8aa444fd06826c6498cf9c693c8046ee9 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 13:29:47 -0600 Subject: [PATCH 04/18] Try --test_tag_filters --- .bazelci/presubmit.yml | 5 +---- tests/container/BUILD | 3 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 2f2dc05bb..948f9fefa 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -19,11 +19,8 @@ tasks: platform: macos test_targets: - //... - - # These digests tests have different values on macos than linux so they are skipped on mac - - -//tests/container:alpine_custom_attr_digest_test - - -//tests/container:new_alpine_linux_armv6_image_tar_digest_test - - -//tests/container:test_digest_output1 test_flags: + - --test_tag_filters=-buildkite-macos-incompatible - --config=buildkite - --deleted_packages=tests/contrib,tests/docker/util testing_examples: diff --git a/tests/container/BUILD b/tests/container/BUILD index 4f9707321..122447dba 100644 --- a/tests/container/BUILD +++ b/tests/container/BUILD @@ -240,6 +240,7 @@ file_test( name = "test_digest_output1", content = "sha256:4ec78686f1edd4f30cca6222f17ace5a2b9f8db9708727c3a140c954af0a534d", file = ":deb_image_with_dpkgs.digest", + tags = ["buildkite-macos-incompatible"], # has different digest value on macos ) file_test( @@ -616,12 +617,14 @@ file_test( name = "alpine_custom_attr_digest_test", content = "sha256:2f3bf2d061a1bab130cdd98f10b73dfceb08bfbf94a610c62f20c787073e5178", file = ":new_push_test_legacy_from_container_img.digest", + tags = ["buildkite-macos-incompatible"], # has different digest value on macos ) file_test( name = "new_alpine_linux_armv6_image_tar_digest_test", content = "sha256:249804db68a05bb88cc353d4aff090b084d8b8312665638d2f8d7bdaeaa423b3", file = ":new_alpine_linux_armv6_image_tar.digest", + tags = ["buildkite-macos-incompatible"], # has different digest value on macos ) # END_DO_NOT_IMPORT From c943a1ec612fbff69943360f808c39101cbbaed3 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 13:39:16 -0600 Subject: [PATCH 05/18] Try manual docker_config --- WORKSPACE | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WORKSPACE b/WORKSPACE index 587bbc3ea..00da419b2 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -22,7 +22,10 @@ load( # This will attempt to determine the location of the 'docker' binary that is # used in some parts of rules_docker. On linux this is typically # /usr/bin/docker; on macos /usr/local/bin/docker. -docker_toolchain_configure(name = "docker_config") +docker_toolchain_configure( + name = "docker_config", + docker_path = "/usr/local/bin/docker", +) # Consumers shouldn't need to do this themselves once WORKSPACE is # instantiated recursively. From 9c51da8fd936435bdfb6954aefd9414cee0c9355 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 13:41:49 -0600 Subject: [PATCH 06/18] Revert manual docker_config --- WORKSPACE | 1 - 1 file changed, 1 deletion(-) diff --git a/WORKSPACE b/WORKSPACE index 00da419b2..f9b76f291 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -24,7 +24,6 @@ load( # /usr/bin/docker; on macos /usr/local/bin/docker. docker_toolchain_configure( name = "docker_config", - docker_path = "/usr/local/bin/docker", ) # Consumers shouldn't need to do this themselves once WORKSPACE is From e458e1ace33f3122c3b1ee9e4d0d50bc4266c9c7 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 14:01:58 -0600 Subject: [PATCH 07/18] Try keep_going --- .bazelci/presubmit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 948f9fefa..1a7e9a869 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -20,6 +20,7 @@ tasks: test_targets: - //... test_flags: + - --keep_going - --test_tag_filters=-buildkite-macos-incompatible - --config=buildkite - --deleted_packages=tests/contrib,tests/docker/util From 7f405403ab6641ce2c65d90498046ff4431112f8 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 14:09:03 -0600 Subject: [PATCH 08/18] Rename to --test_tag_filters=-buildkite-macos-todo --- .bazelci/presubmit.yml | 3 ++- tests/container/BUILD | 6 +++--- tests/docker/package_managers/BUILD | 4 ++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 1a7e9a869..18aec4f78 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -21,7 +21,8 @@ tasks: - //... test_flags: - --keep_going - - --test_tag_filters=-buildkite-macos-incompatible + - --build_tag_filters=-buildkite-macos-todo + - --test_tag_filters=-buildkite-macos-todo - --config=buildkite - --deleted_packages=tests/contrib,tests/docker/util testing_examples: diff --git a/tests/container/BUILD b/tests/container/BUILD index 122447dba..87faa6f8e 100644 --- a/tests/container/BUILD +++ b/tests/container/BUILD @@ -240,7 +240,7 @@ file_test( name = "test_digest_output1", content = "sha256:4ec78686f1edd4f30cca6222f17ace5a2b9f8db9708727c3a140c954af0a534d", file = ":deb_image_with_dpkgs.digest", - tags = ["buildkite-macos-incompatible"], # has different digest value on macos + tags = ["buildkite-macos-todo"], # has different digest value on macos ) file_test( @@ -617,14 +617,14 @@ file_test( name = "alpine_custom_attr_digest_test", content = "sha256:2f3bf2d061a1bab130cdd98f10b73dfceb08bfbf94a610c62f20c787073e5178", file = ":new_push_test_legacy_from_container_img.digest", - tags = ["buildkite-macos-incompatible"], # has different digest value on macos + tags = ["buildkite-macos-todo"], # has different digest value on macos ) file_test( name = "new_alpine_linux_armv6_image_tar_digest_test", content = "sha256:249804db68a05bb88cc353d4aff090b084d8b8312665638d2f8d7bdaeaa423b3", file = ":new_alpine_linux_armv6_image_tar.digest", - tags = ["buildkite-macos-incompatible"], # has different digest value on macos + tags = ["buildkite-macos-todo"], # has different digest value on macos ) # END_DO_NOT_IMPORT diff --git a/tests/docker/package_managers/BUILD b/tests/docker/package_managers/BUILD index d658bf481..4193997f0 100644 --- a/tests/docker/package_managers/BUILD +++ b/tests/docker/package_managers/BUILD @@ -58,6 +58,7 @@ sh_test( name = "download_pkgs_run_test", srcs = ["download_pkgs_run_test.sh"], data = [":test_download_pkgs.tar"], + tags = ["buildkite-macos-todo"], # gpg key issue ) add_apt_key( @@ -83,6 +84,7 @@ sh_test( name = "download_pkgs_with_additional_repos_run_test", srcs = ["download_pkgs_with_additional_repos_run_test.sh"], data = [":test_download_pkgs_with_additional_repos.tar"], + tags = ["buildkite-macos-todo"], # gpg key issue ) install_pkgs( @@ -114,6 +116,7 @@ container_test( name = "gpg_test", configs = [":gpg_test.yaml"], image = ":gpg_image", + tags = ["buildkite-macos-todo"], # gpg key issue ) # Testing reproducibility of install_pkgs @@ -146,4 +149,5 @@ compare_ids_test( ":install_git_for_reproducibility_1", ":install_git_for_reproducibility_2", ], + tags = ["buildkite-macos-todo"], # gpg key issue ) From 2a3252e9096026a94c62396d4042045a17f93490 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 14:15:13 -0600 Subject: [PATCH 09/18] Disable structure_test_at_workspace_root --- BUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/BUILD b/BUILD index 26b6ded5e..a8e26cbd8 100644 --- a/BUILD +++ b/BUILD @@ -52,4 +52,5 @@ container_test( name = "structure_test_at_workspace_root", configs = ["//tests/container/configs:test.yaml"], image = "//testdata:link_with_files_base", + tags = ["buildkite-macos-todo"], # docker not found? ) From 631772fe19c1332afcb34eb3c3a8959ab5d0b740 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 14:16:47 -0600 Subject: [PATCH 10/18] Disable tests/container --- .bazelci/presubmit.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 18aec4f78..f30b72707 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -24,7 +24,8 @@ tasks: - --build_tag_filters=-buildkite-macos-todo - --test_tag_filters=-buildkite-macos-todo - --config=buildkite - - --deleted_packages=tests/contrib,tests/docker/util + # docker not found issues + - --deleted_packages=tests/contrib,tests/docker/util,tests/container testing_examples: platform: ubuntu1804 working_directory: testing/examples From a70437d49400dd496f31ef5541ec9b4baee3248e Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 14:25:10 -0600 Subject: [PATCH 11/18] Which docker --- .bazelci/presubmit.yml | 2 +- toolchains/docker/toolchain.bzl | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index f30b72707..b9159b19c 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -25,7 +25,7 @@ tasks: - --test_tag_filters=-buildkite-macos-todo - --config=buildkite # docker not found issues - - --deleted_packages=tests/contrib,tests/docker/util,tests/container + - --deleted_packages=tests/contrib,tests/docker/util testing_examples: platform: ubuntu1804 working_directory: testing/examples diff --git a/toolchains/docker/toolchain.bzl b/toolchains/docker/toolchain.bzl index a4166831d..1b5ac481a 100644 --- a/toolchains/docker/toolchain.bzl +++ b/toolchains/docker/toolchain.bzl @@ -87,6 +87,9 @@ docker_toolchain = rule( def _toolchain_configure_impl(repository_ctx): if repository_ctx.attr.gzip_target and repository_ctx.attr.gzip_path: fail("Only one of gzip_target or gzip_path can be set.") + docker = repository_ctx.which("docker") + print("which docker: %s" % docker) + tool_path = "" if repository_ctx.attr.docker_path: tool_path = repository_ctx.attr.docker_path From 4bf32c1f0a808824a84eceea1c7156edd49a07c4 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 14:40:35 -0600 Subject: [PATCH 12/18] Make test list explicit --- .bazelci/presubmit.yml | 144 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 139 insertions(+), 5 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index b9159b19c..f991bfd2b 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -18,14 +18,148 @@ tasks: default_workspace_macos: platform: macos test_targets: - - //... + - //tests/docker/util:test_extracted_file + - //tests/docker/util:test_extracted_file_impl + - //tests/docker/util:test_extract_script + - //tests/docker/util:test_extract_script_impl + - //tests/docker/util:test_container_extract_rule + - //tests/docker/util:test_container_extract_rule_impl + - //tests/docker/util:test_container_commit_rule + - //tests/docker/util:test_container_commit_rule_impl + - //tests/docker/util:test_container_commit_metadata + - //tests/docker/util:test_container_commit_layer_rule + - //tests/docker/util:test_container_commit_layer_rule_impl + - //tests/docker/util:test_container_commit_layer_metadata + - //tests/docker/toolchain_container:test-rbe-test-xenial-with-pkgs + - //tests/docker/security:security_check_test + - //tests/docker/security:security_check_test_impl + - //tests/docker/security:security_check_expect_cve_test + - //tests/docker/security:security_check_expect_cve_test_impl + - //tests/docker/package_managers:test_install_pkgs_rule + - //tests/docker/package_managers:test_install_pkgs_rule_impl + - //tests/docker/package_managers:test_download_pkgs_rule + - //tests/docker/package_managers:test_download_pkgs_rule_impl + - //tests/docker/package_managers:test_download_pkgs_docker_run + - //tests/docker/package_managers:test_download_pkgs_docker_run_impl + - //tests/docker/package_managers:test_download_pkgs_docker_cp + - //tests/docker/package_managers:test_download_pkgs_docker_cp_impl + - //tests/docker/package_managers:install_pkgs_reproducibility_test + - //tests/docker/package_managers:gpg_test + - //tests/docker/package_managers:download_pkgs_with_additional_repos_run_test + - //tests/docker/package_managers:download_pkgs_run_test + - //tests/contrib/automatic_container_release:test_packages_metadata + - //tests/contrib/automatic_container_release:test_packages_metadata_impl + - //tests/contrib/automatic_container_release:test_metadata_merge + - //tests/contrib/automatic_container_release:test_metadata_merge_impl + - //tests/contrib/automatic_container_release:configs_test_deps_spec_only + - //tests/contrib/automatic_container_release:configs_test + - //tests/contrib:test_id_compare_ids_test + - //tests/contrib:test_dockerfile_image_docker + - //tests/contrib:test_compare_ids_test_wrong_id_fails + - //tests/contrib:test_compare_ids_test_one_tar_no_id_fails + - //tests/contrib:test_compare_ids_test_no_images_with_id_fails + - //tests/contrib:test_compare_ids_test_invalid_tar_fails_multi_regex + - //tests/contrib:test_compare_ids_test_invalid_tar_fails + - //tests/contrib:test_compare_ids_test_diff_ids_fails_no_regex + - //tests/contrib:test_compare_ids_test_diff_ids_fails + - //tests/contrib:test_compare_ids_test + - //tests/contrib:set_cmd_repro_test + - //tests/contrib:rename_image_test + - //tests/contrib:rbe-test-xenial_repro_test + - //tests/contrib:random_file_img_non_repro_test + - //tests/contrib:derivative_with_volume_repro_test + - //tests/container/scala:scala_image_test + - //tests/container/rust:rust_image_test + - //tests/container/python3:py3_image_test + - //tests/container/python:py_image_test + - //tests/container/nodejs:nodejs_image_test + - //tests/container/nodejs:nodejs_image_none_args_test + - //tests/container/nodejs:nodejs_image_no_args_test + - //tests/container/nodejs:nodejs_image_list_with_empty_string_args_test + - //tests/container/nodejs:nodejs_image_empty_list_args_test + - //tests/container/nodejs:nodejs_image_custom_binary_with_args_test + - //tests/container/nodejs:nodejs_image_custom_binary_test + - //tests/container/kotlin:kotlin_image_test + - //tests/container/java:simple_java_entrypoint_image_test + - //tests/container/java:java_runfiles_image_test + - //tests/container/java:java_runfiles_as_lib_image_test + - //tests/container/java:java_partial_entrypoint_image_test + - //tests/container/java:java_image_test + - //tests/container/groovy:groovy_image_test + - //tests/container/go:go_static_image_test + - //tests/container/go:go_image_test + - //tests/container/cc:cc_image_test + - //tests/container:test_push_digest_output + - //tests/container:test_push_digest_output_impl + - //tests/container:test_digest_output2 + - //tests/container:test_digest_output2_impl + - //tests/container:test_digest_output1 + - //tests/container:test_digest_output1_impl + - //tests/container:structure_test + - //tests/container:stripped_directory_name_test + - //tests/container:special_characters_test + - //tests/container:set_env_make_vars_test + - //tests/container:set_env_equals_test + - //tests/container:set_env_csv_test + - //tests/container:set_entrypoint_test + - //tests/container:set_cmd_test_host + - //tests/container:set_cmd_test + - //tests/container:set_cmd_and_entrypoint_test + - //tests/container:set_cmd_and_entrypoint_null_on_base_test + - //tests/container:pull_info_validation_test + - //tests/container:pause_tar_test_config + - //tests/container:pause_tar_test_config_impl + - //tests/container:pause_tar_test_1_tar_gz + - //tests/container:pause_tar_test_1_tar_gz_impl + - //tests/container:pause_tar_test_0_tar_gz + - //tests/container:pause_tar_test_0_tar_gz_impl + - //tests/container:null_cmd_and_entrypoint_none_test + - //tests/container:null_cmd_and_entrypoint_empty_str_test + - //tests/container:null_cmd_and_entrypoint_empty_list_test + - //tests/container:new_distroless_base_oci_test_config + - //tests/container:new_distroless_base_oci_test_config_impl + - //tests/container:new_distroless_base_oci_test_0_tar_gz + - //tests/container:new_distroless_base_oci_test_0_tar_gz_impl + - //tests/container:new_alpine_linux_ppc64le_image_tar_test + - //tests/container:new_alpine_linux_ppc64le_image_oci_test + - //tests/container:new_alpine_linux_ppc64le_image_oci_tar_test + - //tests/container:new_alpine_linux_ppc64le_image_oci_go_join_layers_test + - //tests/container:new_alpine_linux_armv6_image_tar_test + - //tests/container:new_alpine_linux_armv6_image_tar_digest_test + - //tests/container:new_alpine_linux_armv6_image_tar_digest_test_impl + - //tests/container:new_alpine_linux_armv6_image_oci_test + - //tests/container:new_alpine_linux_armv6_image_oci_tar_test + - //tests/container:k8s_pause_arm64_digest_test + - //tests/container:k8s_pause_arm64_digest_test_impl + - //tests/container:distroless_fixed_id_image_digest_test + - //tests/container:distroless_fixed_id_image_digest_test_impl + - //tests/container:distroless_fixed_id_digest_test + - //tests/container:distroless_fixed_id_digest_test_impl + - //tests/container:deb_image_with_dpkgs_test + - //tests/container:build_tar_test + - //tests/container:basic_windows_image_test + - //tests/container:base_with_cmd_and_entrypoint_test + - //tests/container:architecture_test + - //tests/container:alpine_ppc64le_image_test + - //tests/container:alpine_linux_armv6_tar_test_image_tar + - //tests/container:alpine_linux_armv6_tar_test_image_tar_impl + - //tests/container:alpine_linux_amd64_image_tar_test + - //tests/container:alpine_linux_amd64_image_oci_test + - //tests/container:alpine_linux_amd64_image_oci_tar_test + - //tests/container:alpine_custom_attr_digest_test + - //tests/container:alpine_custom_attr_digest_test_impl + - //tests/container:alpine_arm_image_test + - //tests/container:alpine_amd64_image_test + - //testing/new_pusher_tests:new_push_verify_pushed_configs_and_files + - //docs:copy_image + - //docker/util:config_stripper_test + - //container/go/pkg/oci:go_default_test + - //container/go/pkg/compat:go_default_test + - //container:image_test + - //:structure_test_at_workspace_root test_flags: - --keep_going - - --build_tag_filters=-buildkite-macos-todo - - --test_tag_filters=-buildkite-macos-todo - --config=buildkite - # docker not found issues - - --deleted_packages=tests/contrib,tests/docker/util testing_examples: platform: ubuntu1804 working_directory: testing/examples From 31ee7ab2a5922cf9dcafab70fb4a22a7cb6299f0 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 14:41:52 -0600 Subject: [PATCH 13/18] Make test list explicit --- .bazelci/presubmit.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index f991bfd2b..e3aa38255 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -18,6 +18,8 @@ tasks: default_workspace_macos: platform: macos test_targets: + # NOTE: per Philipp Wollermann, docker is not installed on the macos + # buildkite runners due to security concerns. - //tests/docker/util:test_extracted_file - //tests/docker/util:test_extracted_file_impl - //tests/docker/util:test_extract_script From bf9de3b59634a11825ca39edd800251a9db13eed Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 14:57:03 -0600 Subject: [PATCH 14/18] Manually sort passing and failing tests --- .bazelci/presubmit.yml | 278 ++++++++++++++++++++--------------------- 1 file changed, 139 insertions(+), 139 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index e3aa38255..934c7890c 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -20,145 +20,145 @@ tasks: test_targets: # NOTE: per Philipp Wollermann, docker is not installed on the macos # buildkite runners due to security concerns. - - //tests/docker/util:test_extracted_file - - //tests/docker/util:test_extracted_file_impl - - //tests/docker/util:test_extract_script - - //tests/docker/util:test_extract_script_impl - - //tests/docker/util:test_container_extract_rule - - //tests/docker/util:test_container_extract_rule_impl - - //tests/docker/util:test_container_commit_rule - - //tests/docker/util:test_container_commit_rule_impl - - //tests/docker/util:test_container_commit_metadata - - //tests/docker/util:test_container_commit_layer_rule - - //tests/docker/util:test_container_commit_layer_rule_impl - - //tests/docker/util:test_container_commit_layer_metadata - - //tests/docker/toolchain_container:test-rbe-test-xenial-with-pkgs - - //tests/docker/security:security_check_test - - //tests/docker/security:security_check_test_impl - - //tests/docker/security:security_check_expect_cve_test - - //tests/docker/security:security_check_expect_cve_test_impl - - //tests/docker/package_managers:test_install_pkgs_rule - - //tests/docker/package_managers:test_install_pkgs_rule_impl - - //tests/docker/package_managers:test_download_pkgs_rule - - //tests/docker/package_managers:test_download_pkgs_rule_impl - - //tests/docker/package_managers:test_download_pkgs_docker_run - - //tests/docker/package_managers:test_download_pkgs_docker_run_impl - - //tests/docker/package_managers:test_download_pkgs_docker_cp - - //tests/docker/package_managers:test_download_pkgs_docker_cp_impl - - //tests/docker/package_managers:install_pkgs_reproducibility_test - - //tests/docker/package_managers:gpg_test - - //tests/docker/package_managers:download_pkgs_with_additional_repos_run_test - - //tests/docker/package_managers:download_pkgs_run_test - - //tests/contrib/automatic_container_release:test_packages_metadata - - //tests/contrib/automatic_container_release:test_packages_metadata_impl - - //tests/contrib/automatic_container_release:test_metadata_merge - - //tests/contrib/automatic_container_release:test_metadata_merge_impl - - //tests/contrib/automatic_container_release:configs_test_deps_spec_only - - //tests/contrib/automatic_container_release:configs_test - - //tests/contrib:test_id_compare_ids_test - - //tests/contrib:test_dockerfile_image_docker - - //tests/contrib:test_compare_ids_test_wrong_id_fails - - //tests/contrib:test_compare_ids_test_one_tar_no_id_fails - - //tests/contrib:test_compare_ids_test_no_images_with_id_fails - - //tests/contrib:test_compare_ids_test_invalid_tar_fails_multi_regex - - //tests/contrib:test_compare_ids_test_invalid_tar_fails - - //tests/contrib:test_compare_ids_test_diff_ids_fails_no_regex - - //tests/contrib:test_compare_ids_test_diff_ids_fails - - //tests/contrib:test_compare_ids_test - - //tests/contrib:set_cmd_repro_test - - //tests/contrib:rename_image_test - - //tests/contrib:rbe-test-xenial_repro_test - - //tests/contrib:random_file_img_non_repro_test - - //tests/contrib:derivative_with_volume_repro_test - - //tests/container/scala:scala_image_test - - //tests/container/rust:rust_image_test - - //tests/container/python3:py3_image_test - - //tests/container/python:py_image_test - - //tests/container/nodejs:nodejs_image_test - - //tests/container/nodejs:nodejs_image_none_args_test - - //tests/container/nodejs:nodejs_image_no_args_test - - //tests/container/nodejs:nodejs_image_list_with_empty_string_args_test - - //tests/container/nodejs:nodejs_image_empty_list_args_test - - //tests/container/nodejs:nodejs_image_custom_binary_with_args_test - - //tests/container/nodejs:nodejs_image_custom_binary_test - - //tests/container/kotlin:kotlin_image_test - - //tests/container/java:simple_java_entrypoint_image_test - - //tests/container/java:java_runfiles_image_test - - //tests/container/java:java_runfiles_as_lib_image_test - - //tests/container/java:java_partial_entrypoint_image_test - - //tests/container/java:java_image_test - - //tests/container/groovy:groovy_image_test - - //tests/container/go:go_static_image_test - - //tests/container/go:go_image_test - - //tests/container/cc:cc_image_test - - //tests/container:test_push_digest_output - - //tests/container:test_push_digest_output_impl - - //tests/container:test_digest_output2 - - //tests/container:test_digest_output2_impl - - //tests/container:test_digest_output1 - - //tests/container:test_digest_output1_impl - - //tests/container:structure_test - - //tests/container:stripped_directory_name_test - - //tests/container:special_characters_test - - //tests/container:set_env_make_vars_test - - //tests/container:set_env_equals_test - - //tests/container:set_env_csv_test - - //tests/container:set_entrypoint_test - - //tests/container:set_cmd_test_host - - //tests/container:set_cmd_test - - //tests/container:set_cmd_and_entrypoint_test - - //tests/container:set_cmd_and_entrypoint_null_on_base_test - - //tests/container:pull_info_validation_test - - //tests/container:pause_tar_test_config - - //tests/container:pause_tar_test_config_impl - - //tests/container:pause_tar_test_1_tar_gz - - //tests/container:pause_tar_test_1_tar_gz_impl - - //tests/container:pause_tar_test_0_tar_gz - - //tests/container:pause_tar_test_0_tar_gz_impl - - //tests/container:null_cmd_and_entrypoint_none_test - - //tests/container:null_cmd_and_entrypoint_empty_str_test - - //tests/container:null_cmd_and_entrypoint_empty_list_test - - //tests/container:new_distroless_base_oci_test_config - - //tests/container:new_distroless_base_oci_test_config_impl - - //tests/container:new_distroless_base_oci_test_0_tar_gz - - //tests/container:new_distroless_base_oci_test_0_tar_gz_impl - - //tests/container:new_alpine_linux_ppc64le_image_tar_test - - //tests/container:new_alpine_linux_ppc64le_image_oci_test - - //tests/container:new_alpine_linux_ppc64le_image_oci_tar_test - - //tests/container:new_alpine_linux_ppc64le_image_oci_go_join_layers_test - - //tests/container:new_alpine_linux_armv6_image_tar_test - - //tests/container:new_alpine_linux_armv6_image_tar_digest_test - - //tests/container:new_alpine_linux_armv6_image_tar_digest_test_impl - - //tests/container:new_alpine_linux_armv6_image_oci_test - - //tests/container:new_alpine_linux_armv6_image_oci_tar_test - - //tests/container:k8s_pause_arm64_digest_test - - //tests/container:k8s_pause_arm64_digest_test_impl - - //tests/container:distroless_fixed_id_image_digest_test - - //tests/container:distroless_fixed_id_image_digest_test_impl - - //tests/container:distroless_fixed_id_digest_test - - //tests/container:distroless_fixed_id_digest_test_impl - - //tests/container:deb_image_with_dpkgs_test - - //tests/container:build_tar_test - - //tests/container:basic_windows_image_test - - //tests/container:base_with_cmd_and_entrypoint_test - - //tests/container:architecture_test - - //tests/container:alpine_ppc64le_image_test - - //tests/container:alpine_linux_armv6_tar_test_image_tar - - //tests/container:alpine_linux_armv6_tar_test_image_tar_impl - - //tests/container:alpine_linux_amd64_image_tar_test - - //tests/container:alpine_linux_amd64_image_oci_test - - //tests/container:alpine_linux_amd64_image_oci_tar_test - - //tests/container:alpine_custom_attr_digest_test - - //tests/container:alpine_custom_attr_digest_test_impl - - //tests/container:alpine_arm_image_test - - //tests/container:alpine_amd64_image_test - - //testing/new_pusher_tests:new_push_verify_pushed_configs_and_files - - //docs:copy_image - - //docker/util:config_stripper_test - - //container/go/pkg/oci:go_default_test - - //container/go/pkg/compat:go_default_test - - //container:image_test - - //:structure_test_at_workspace_root + - -//:structure_test_at_workspace_root + - -//testing/new_pusher_tests:new_push_verify_pushed_configs_and_files + - -//tests/container:alpine_amd64_image_test + - -//tests/container:alpine_arm_image_test + - -//tests/container:alpine_linux_amd64_image_oci_tar_test + - -//tests/container:alpine_linux_amd64_image_oci_test + - -//tests/container:alpine_linux_amd64_image_tar_test + - -//tests/container:alpine_ppc64le_image_test + - -//tests/container:base_with_cmd_and_entrypoint_test + - -//tests/container:deb_image_with_dpkgs_test + - -//tests/container:null_cmd_and_entrypoint_empty_list_test + - -//tests/container:null_cmd_and_entrypoint_empty_str_test + - -//tests/container:null_cmd_and_entrypoint_none_test + - -//tests/container:set_cmd_and_entrypoint_null_on_base_test + - -//tests/container:set_cmd_and_entrypoint_test + - -//tests/container:set_cmd_test + - -//tests/container:set_entrypoint_test + - -//tests/container:set_env_csv_test + - -//tests/container:set_env_equals_test + - -//tests/container:set_env_make_vars_test + - -//tests/container:stripped_directory_name_test + - -//tests/container:structure_test + - -//tests/container/cc:cc_image_test + - -//tests/container/go:go_image_test + - -//tests/container/go:go_static_image_test + - -//tests/container/groovy:groovy_image_test + - -//tests/container/java:java_image_test + - -//tests/container/java:java_partial_entrypoint_image_test + - -//tests/container/java:java_runfiles_as_lib_image_test + - -//tests/container/java:java_runfiles_image_test + - -//tests/container/java:simple_java_entrypoint_image_test + - -//tests/container/kotlin:kotlin_image_test + - -//tests/container/nodejs:nodejs_image_custom_binary_test + - -//tests/container/nodejs:nodejs_image_custom_binary_with_args_test + - -//tests/container/nodejs:nodejs_image_empty_list_args_test + - -//tests/container/nodejs:nodejs_image_list_with_empty_string_args_test + - -//tests/container/nodejs:nodejs_image_no_args_test + - -//tests/container/nodejs:nodejs_image_none_args_test + - -//tests/container/nodejs:nodejs_image_test + - -//tests/container/python:py_image_test + - -//tests/container/python3:py3_image_test + - -//tests/container/rust:rust_image_test + - -//tests/container/scala:scala_image_test + - -//tests/contrib:derivative_with_volume_repro_test + - -//tests/contrib:random_file_img_non_repro_test + - -//tests/contrib:rbe-test-xenial_repro_test + - -//tests/contrib:set_cmd_repro_test + - -//tests/contrib:test_dockerfile_image_docker + - -//tests/contrib/automatic_container_release:configs_test + - -//tests/contrib/automatic_container_release:configs_test_deps_spec_only + - -//tests/docker/package_managers:download_pkgs_run_test + - -//tests/docker/package_managers:download_pkgs_with_additional_repos_run_test + - -//tests/docker/package_managers:gpg_test + - -//tests/docker/package_managers:install_pkgs_reproducibility_test + - -//tests/docker/security:security_check_expect_cve_test + - -//tests/docker/security:security_check_expect_cve_test_impl + - -//tests/docker/security:security_check_test + - -//tests/docker/security:security_check_test_impl + - -//tests/docker/toolchain_container:test-rbe-test-xenial-with-pkgs + - -//tests/docker/util:test_container_commit_layer_metadata + - -//tests/docker/util:test_container_commit_metadata + - -//tests/docker/util:test_extracted_file + - -//tests/docker/util:test_extracted_file_impl + - +//container:image_test + - +//container/go/pkg/compat:go_default_test + - +//container/go/pkg/oci:go_default_test + - +//docker/util:config_stripper_test + - +//docs:copy_image + - +//tests/container:alpine_custom_attr_digest_test + - +//tests/container:alpine_custom_attr_digest_test_impl + - +//tests/container:alpine_linux_armv6_tar_test_image_tar + - +//tests/container:alpine_linux_armv6_tar_test_image_tar_impl + - +//tests/container:architecture_test + - +//tests/container:basic_windows_image_test + - +//tests/container:build_tar_test + - +//tests/container:distroless_fixed_id_digest_test + - +//tests/container:distroless_fixed_id_digest_test_impl + - +//tests/container:distroless_fixed_id_image_digest_test + - +//tests/container:distroless_fixed_id_image_digest_test_impl + - +//tests/container:k8s_pause_arm64_digest_test + - +//tests/container:k8s_pause_arm64_digest_test_impl + - +//tests/container:new_alpine_linux_armv6_image_oci_tar_test + - +//tests/container:new_alpine_linux_armv6_image_oci_test + - +//tests/container:new_alpine_linux_armv6_image_tar_digest_test + - +//tests/container:new_alpine_linux_armv6_image_tar_digest_test_impl + - +//tests/container:new_alpine_linux_armv6_image_tar_test + - +//tests/container:new_alpine_linux_ppc64le_image_oci_go_join_layers_test + - +//tests/container:new_alpine_linux_ppc64le_image_oci_tar_test + - +//tests/container:new_alpine_linux_ppc64le_image_oci_test + - +//tests/container:new_alpine_linux_ppc64le_image_tar_test + - +//tests/container:new_distroless_base_oci_test_0_tar_gz + - +//tests/container:new_distroless_base_oci_test_0_tar_gz_impl + - +//tests/container:new_distroless_base_oci_test_config + - +//tests/container:new_distroless_base_oci_test_config_impl + - +//tests/container:pause_tar_test_0_tar_gz + - +//tests/container:pause_tar_test_0_tar_gz_impl + - +//tests/container:pause_tar_test_1_tar_gz + - +//tests/container:pause_tar_test_1_tar_gz_impl + - +//tests/container:pause_tar_test_config + - +//tests/container:pause_tar_test_config_impl + - +//tests/container:pull_info_validation_test + - +//tests/container:set_cmd_test_host + - +//tests/container:special_characters_test + - +//tests/container:test_digest_output1 + - +//tests/container:test_digest_output1_impl + - +//tests/container:test_digest_output2 + - +//tests/container:test_digest_output2_impl + - +//tests/container:test_push_digest_output + - +//tests/container:test_push_digest_output_impl + - +//tests/contrib:rename_image_test + - +//tests/contrib:test_compare_ids_test + - +//tests/contrib:test_compare_ids_test_diff_ids_fails + - +//tests/contrib:test_compare_ids_test_diff_ids_fails_no_regex + - +//tests/contrib:test_compare_ids_test_invalid_tar_fails + - +//tests/contrib:test_compare_ids_test_invalid_tar_fails_multi_regex + - +//tests/contrib:test_compare_ids_test_no_images_with_id_fails + - +//tests/contrib:test_compare_ids_test_one_tar_no_id_fails + - +//tests/contrib:test_compare_ids_test_wrong_id_fails + - +//tests/contrib:test_id_compare_ids_test + - +//tests/contrib/automatic_container_release:test_metadata_merge + - +//tests/contrib/automatic_container_release:test_metadata_merge_impl + - +//tests/contrib/automatic_container_release:test_packages_metadata + - +//tests/contrib/automatic_container_release:test_packages_metadata_impl + - +//tests/docker/package_managers:test_download_pkgs_docker_cp + - +//tests/docker/package_managers:test_download_pkgs_docker_cp_impl + - +//tests/docker/package_managers:test_download_pkgs_docker_run + - +//tests/docker/package_managers:test_download_pkgs_docker_run_impl + - +//tests/docker/package_managers:test_download_pkgs_rule + - +//tests/docker/package_managers:test_download_pkgs_rule_impl + - +//tests/docker/package_managers:test_install_pkgs_rule + - +//tests/docker/package_managers:test_install_pkgs_rule_impl + - +//tests/docker/util:test_container_commit_layer_rule + - +//tests/docker/util:test_container_commit_layer_rule_impl + - +//tests/docker/util:test_container_commit_rule + - +//tests/docker/util:test_container_commit_rule_impl + - +//tests/docker/util:test_container_extract_rule + - +//tests/docker/util:test_container_extract_rule_impl + - +//tests/docker/util:test_extract_script + - +//tests/docker/util:test_extract_script_impl test_flags: - --keep_going - --config=buildkite From 2dcbb516bb7eb2aaeec1f1b0b846543f76e441b5 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 14:59:12 -0600 Subject: [PATCH 15/18] Fix selector syntax --- .bazelci/presubmit.yml | 153 +++++++++++++++++++++-------------------- 1 file changed, 77 insertions(+), 76 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 934c7890c..f42c255e5 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -83,82 +83,83 @@ tasks: - -//tests/docker/util:test_container_commit_metadata - -//tests/docker/util:test_extracted_file - -//tests/docker/util:test_extracted_file_impl - - +//container:image_test - - +//container/go/pkg/compat:go_default_test - - +//container/go/pkg/oci:go_default_test - - +//docker/util:config_stripper_test - - +//docs:copy_image - - +//tests/container:alpine_custom_attr_digest_test - - +//tests/container:alpine_custom_attr_digest_test_impl - - +//tests/container:alpine_linux_armv6_tar_test_image_tar - - +//tests/container:alpine_linux_armv6_tar_test_image_tar_impl - - +//tests/container:architecture_test - - +//tests/container:basic_windows_image_test - - +//tests/container:build_tar_test - - +//tests/container:distroless_fixed_id_digest_test - - +//tests/container:distroless_fixed_id_digest_test_impl - - +//tests/container:distroless_fixed_id_image_digest_test - - +//tests/container:distroless_fixed_id_image_digest_test_impl - - +//tests/container:k8s_pause_arm64_digest_test - - +//tests/container:k8s_pause_arm64_digest_test_impl - - +//tests/container:new_alpine_linux_armv6_image_oci_tar_test - - +//tests/container:new_alpine_linux_armv6_image_oci_test - - +//tests/container:new_alpine_linux_armv6_image_tar_digest_test - - +//tests/container:new_alpine_linux_armv6_image_tar_digest_test_impl - - +//tests/container:new_alpine_linux_armv6_image_tar_test - - +//tests/container:new_alpine_linux_ppc64le_image_oci_go_join_layers_test - - +//tests/container:new_alpine_linux_ppc64le_image_oci_tar_test - - +//tests/container:new_alpine_linux_ppc64le_image_oci_test - - +//tests/container:new_alpine_linux_ppc64le_image_tar_test - - +//tests/container:new_distroless_base_oci_test_0_tar_gz - - +//tests/container:new_distroless_base_oci_test_0_tar_gz_impl - - +//tests/container:new_distroless_base_oci_test_config - - +//tests/container:new_distroless_base_oci_test_config_impl - - +//tests/container:pause_tar_test_0_tar_gz - - +//tests/container:pause_tar_test_0_tar_gz_impl - - +//tests/container:pause_tar_test_1_tar_gz - - +//tests/container:pause_tar_test_1_tar_gz_impl - - +//tests/container:pause_tar_test_config - - +//tests/container:pause_tar_test_config_impl - - +//tests/container:pull_info_validation_test - - +//tests/container:set_cmd_test_host - - +//tests/container:special_characters_test - - +//tests/container:test_digest_output1 - - +//tests/container:test_digest_output1_impl - - +//tests/container:test_digest_output2 - - +//tests/container:test_digest_output2_impl - - +//tests/container:test_push_digest_output - - +//tests/container:test_push_digest_output_impl - - +//tests/contrib:rename_image_test - - +//tests/contrib:test_compare_ids_test - - +//tests/contrib:test_compare_ids_test_diff_ids_fails - - +//tests/contrib:test_compare_ids_test_diff_ids_fails_no_regex - - +//tests/contrib:test_compare_ids_test_invalid_tar_fails - - +//tests/contrib:test_compare_ids_test_invalid_tar_fails_multi_regex - - +//tests/contrib:test_compare_ids_test_no_images_with_id_fails - - +//tests/contrib:test_compare_ids_test_one_tar_no_id_fails - - +//tests/contrib:test_compare_ids_test_wrong_id_fails - - +//tests/contrib:test_id_compare_ids_test - - +//tests/contrib/automatic_container_release:test_metadata_merge - - +//tests/contrib/automatic_container_release:test_metadata_merge_impl - - +//tests/contrib/automatic_container_release:test_packages_metadata - - +//tests/contrib/automatic_container_release:test_packages_metadata_impl - - +//tests/docker/package_managers:test_download_pkgs_docker_cp - - +//tests/docker/package_managers:test_download_pkgs_docker_cp_impl - - +//tests/docker/package_managers:test_download_pkgs_docker_run - - +//tests/docker/package_managers:test_download_pkgs_docker_run_impl - - +//tests/docker/package_managers:test_download_pkgs_rule - - +//tests/docker/package_managers:test_download_pkgs_rule_impl - - +//tests/docker/package_managers:test_install_pkgs_rule - - +//tests/docker/package_managers:test_install_pkgs_rule_impl - - +//tests/docker/util:test_container_commit_layer_rule - - +//tests/docker/util:test_container_commit_layer_rule_impl - - +//tests/docker/util:test_container_commit_rule - - +//tests/docker/util:test_container_commit_rule_impl - - +//tests/docker/util:test_container_extract_rule - - +//tests/docker/util:test_container_extract_rule_impl - - +//tests/docker/util:test_extract_script - - +//tests/docker/util:test_extract_script_impl + + - //container:image_test + - //container/go/pkg/compat:go_default_test + - //container/go/pkg/oci:go_default_test + - //docker/util:config_stripper_test + - //docs:copy_image + - //tests/container:alpine_custom_attr_digest_test + - //tests/container:alpine_custom_attr_digest_test_impl + - //tests/container:alpine_linux_armv6_tar_test_image_tar + - //tests/container:alpine_linux_armv6_tar_test_image_tar_impl + - //tests/container:architecture_test + - //tests/container:basic_windows_image_test + - //tests/container:build_tar_test + - //tests/container:distroless_fixed_id_digest_test + - //tests/container:distroless_fixed_id_digest_test_impl + - //tests/container:distroless_fixed_id_image_digest_test + - //tests/container:distroless_fixed_id_image_digest_test_impl + - //tests/container:k8s_pause_arm64_digest_test + - //tests/container:k8s_pause_arm64_digest_test_impl + - //tests/container:new_alpine_linux_armv6_image_oci_tar_test + - //tests/container:new_alpine_linux_armv6_image_oci_test + - //tests/container:new_alpine_linux_armv6_image_tar_digest_test + - //tests/container:new_alpine_linux_armv6_image_tar_digest_test_impl + - //tests/container:new_alpine_linux_armv6_image_tar_test + - //tests/container:new_alpine_linux_ppc64le_image_oci_go_join_layers_test + - //tests/container:new_alpine_linux_ppc64le_image_oci_tar_test + - //tests/container:new_alpine_linux_ppc64le_image_oci_test + - //tests/container:new_alpine_linux_ppc64le_image_tar_test + - //tests/container:new_distroless_base_oci_test_0_tar_gz + - //tests/container:new_distroless_base_oci_test_0_tar_gz_impl + - //tests/container:new_distroless_base_oci_test_config + - //tests/container:new_distroless_base_oci_test_config_impl + - //tests/container:pause_tar_test_0_tar_gz + - //tests/container:pause_tar_test_0_tar_gz_impl + - //tests/container:pause_tar_test_1_tar_gz + - //tests/container:pause_tar_test_1_tar_gz_impl + - //tests/container:pause_tar_test_config + - //tests/container:pause_tar_test_config_impl + - //tests/container:pull_info_validation_test + - //tests/container:set_cmd_test_host + - //tests/container:special_characters_test + - //tests/container:test_digest_output1 + - //tests/container:test_digest_output1_impl + - //tests/container:test_digest_output2 + - //tests/container:test_digest_output2_impl + - //tests/container:test_push_digest_output + - //tests/container:test_push_digest_output_impl + - //tests/contrib:rename_image_test + - //tests/contrib:test_compare_ids_test + - //tests/contrib:test_compare_ids_test_diff_ids_fails + - //tests/contrib:test_compare_ids_test_diff_ids_fails_no_regex + - //tests/contrib:test_compare_ids_test_invalid_tar_fails + - //tests/contrib:test_compare_ids_test_invalid_tar_fails_multi_regex + - //tests/contrib:test_compare_ids_test_no_images_with_id_fails + - //tests/contrib:test_compare_ids_test_one_tar_no_id_fails + - //tests/contrib:test_compare_ids_test_wrong_id_fails + - //tests/contrib:test_id_compare_ids_test + - //tests/contrib/automatic_container_release:test_metadata_merge + - //tests/contrib/automatic_container_release:test_metadata_merge_impl + - //tests/contrib/automatic_container_release:test_packages_metadata + - //tests/contrib/automatic_container_release:test_packages_metadata_impl + - //tests/docker/package_managers:test_download_pkgs_docker_cp + - //tests/docker/package_managers:test_download_pkgs_docker_cp_impl + - //tests/docker/package_managers:test_download_pkgs_docker_run + - //tests/docker/package_managers:test_download_pkgs_docker_run_impl + - //tests/docker/package_managers:test_download_pkgs_rule + - //tests/docker/package_managers:test_download_pkgs_rule_impl + - //tests/docker/package_managers:test_install_pkgs_rule + - //tests/docker/package_managers:test_install_pkgs_rule_impl + - //tests/docker/util:test_container_commit_layer_rule + - //tests/docker/util:test_container_commit_layer_rule_impl + - //tests/docker/util:test_container_commit_rule + - //tests/docker/util:test_container_commit_rule_impl + - //tests/docker/util:test_container_extract_rule + - //tests/docker/util:test_container_extract_rule_impl + - //tests/docker/util:test_extract_script + - //tests/docker/util:test_extract_script_impl test_flags: - --keep_going - --config=buildkite From c11eeacc2a72053d93ec95f0d2f2ded0317ba964 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 15:06:30 -0600 Subject: [PATCH 16/18] More test reductions --- .bazelci/presubmit.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index f42c255e5..5edd255f8 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -67,9 +67,21 @@ tasks: - -//tests/contrib:random_file_img_non_repro_test - -//tests/contrib:rbe-test-xenial_repro_test - -//tests/contrib:set_cmd_repro_test + - -//tests/contrib:test_compare_ids_test + - -//tests/contrib:test_compare_ids_test_diff_ids_fails + - -//tests/contrib:test_compare_ids_test_diff_ids_fails_no_regex + - -//tests/contrib:test_compare_ids_test_invalid_tar_fails + - -//tests/contrib:test_compare_ids_test_invalid_tar_fails_multi_regex + - -//tests/contrib:test_compare_ids_test_no_images_with_id_fails + - -//tests/contrib:test_compare_ids_test_one_tar_no_id_fails + - -//tests/contrib:test_compare_ids_test_wrong_id_fails - -//tests/contrib:test_dockerfile_image_docker - -//tests/contrib/automatic_container_release:configs_test - -//tests/contrib/automatic_container_release:configs_test_deps_spec_only + - -//tests/contrib/automatic_container_release:test_metadata_merge + - -//tests/contrib/automatic_container_release:test_metadata_merge_impl + - -//tests/contrib/automatic_container_release:test_packages_metadata + - -//tests/contrib/automatic_container_release:test_packages_metadata_impl - -//tests/docker/package_managers:download_pkgs_run_test - -//tests/docker/package_managers:download_pkgs_with_additional_repos_run_test - -//tests/docker/package_managers:gpg_test @@ -83,7 +95,6 @@ tasks: - -//tests/docker/util:test_container_commit_metadata - -//tests/docker/util:test_extracted_file - -//tests/docker/util:test_extracted_file_impl - - //container:image_test - //container/go/pkg/compat:go_default_test - //container/go/pkg/oci:go_default_test @@ -131,19 +142,7 @@ tasks: - //tests/container:test_push_digest_output - //tests/container:test_push_digest_output_impl - //tests/contrib:rename_image_test - - //tests/contrib:test_compare_ids_test - - //tests/contrib:test_compare_ids_test_diff_ids_fails - - //tests/contrib:test_compare_ids_test_diff_ids_fails_no_regex - - //tests/contrib:test_compare_ids_test_invalid_tar_fails - - //tests/contrib:test_compare_ids_test_invalid_tar_fails_multi_regex - - //tests/contrib:test_compare_ids_test_no_images_with_id_fails - - //tests/contrib:test_compare_ids_test_one_tar_no_id_fails - - //tests/contrib:test_compare_ids_test_wrong_id_fails - //tests/contrib:test_id_compare_ids_test - - //tests/contrib/automatic_container_release:test_metadata_merge - - //tests/contrib/automatic_container_release:test_metadata_merge_impl - - //tests/contrib/automatic_container_release:test_packages_metadata - - //tests/contrib/automatic_container_release:test_packages_metadata_impl - //tests/docker/package_managers:test_download_pkgs_docker_cp - //tests/docker/package_managers:test_download_pkgs_docker_cp_impl - //tests/docker/package_managers:test_download_pkgs_docker_run From 1d3a3356a6b28604538a9c938fc653114050c485 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 15:11:58 -0600 Subject: [PATCH 17/18] Filter out more container tests --- .bazelci/presubmit.yml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 5edd255f8..9cd3f1175 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -20,6 +20,8 @@ tasks: test_targets: # NOTE: per Philipp Wollermann, docker is not installed on the macos # buildkite runners due to security concerns. + # + # Tests excluded from macos - -//:structure_test_at_workspace_root - -//testing/new_pusher_tests:new_push_verify_pushed_configs_and_files - -//tests/container:alpine_amd64_image_test @@ -30,6 +32,19 @@ tasks: - -//tests/container:alpine_ppc64le_image_test - -//tests/container:base_with_cmd_and_entrypoint_test - -//tests/container:deb_image_with_dpkgs_test + - -//tests/container:new_alpine_linux_armv6_image_oci_tar_test + - -//tests/container:new_alpine_linux_armv6_image_oci_test + - -//tests/container:new_alpine_linux_armv6_image_tar_digest_test + - -//tests/container:new_alpine_linux_armv6_image_tar_digest_test_impl + - -//tests/container:new_alpine_linux_armv6_image_tar_test + - -//tests/container:new_alpine_linux_ppc64le_image_oci_go_join_layers_test + - -//tests/container:new_alpine_linux_ppc64le_image_oci_tar_test + - -//tests/container:new_alpine_linux_ppc64le_image_oci_test + - -//tests/container:new_alpine_linux_ppc64le_image_tar_test + - -//tests/container:new_distroless_base_oci_test_0_tar_gz + - -//tests/container:new_distroless_base_oci_test_0_tar_gz_impl + - -//tests/container:new_distroless_base_oci_test_config + - -//tests/container:new_distroless_base_oci_test_config_impl - -//tests/container:null_cmd_and_entrypoint_empty_list_test - -//tests/container:null_cmd_and_entrypoint_empty_str_test - -//tests/container:null_cmd_and_entrypoint_none_test @@ -95,6 +110,7 @@ tasks: - -//tests/docker/util:test_container_commit_metadata - -//tests/docker/util:test_extracted_file - -//tests/docker/util:test_extracted_file_impl + # Tests included on macos - //container:image_test - //container/go/pkg/compat:go_default_test - //container/go/pkg/oci:go_default_test @@ -113,19 +129,6 @@ tasks: - //tests/container:distroless_fixed_id_image_digest_test_impl - //tests/container:k8s_pause_arm64_digest_test - //tests/container:k8s_pause_arm64_digest_test_impl - - //tests/container:new_alpine_linux_armv6_image_oci_tar_test - - //tests/container:new_alpine_linux_armv6_image_oci_test - - //tests/container:new_alpine_linux_armv6_image_tar_digest_test - - //tests/container:new_alpine_linux_armv6_image_tar_digest_test_impl - - //tests/container:new_alpine_linux_armv6_image_tar_test - - //tests/container:new_alpine_linux_ppc64le_image_oci_go_join_layers_test - - //tests/container:new_alpine_linux_ppc64le_image_oci_tar_test - - //tests/container:new_alpine_linux_ppc64le_image_oci_test - - //tests/container:new_alpine_linux_ppc64le_image_tar_test - - //tests/container:new_distroless_base_oci_test_0_tar_gz - - //tests/container:new_distroless_base_oci_test_0_tar_gz_impl - - //tests/container:new_distroless_base_oci_test_config - - //tests/container:new_distroless_base_oci_test_config_impl - //tests/container:pause_tar_test_0_tar_gz - //tests/container:pause_tar_test_0_tar_gz_impl - //tests/container:pause_tar_test_1_tar_gz From f6f8a58eeface8bc390ab510fdbc15aee5abe4d7 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 22 May 2021 15:17:03 -0600 Subject: [PATCH 18/18] Cleanup --- .bazelci/presubmit.yml | 2 ++ .bazelrc | 6 ------ BUILD | 1 - WORKSPACE | 4 +--- tests/container/BUILD | 3 --- tests/docker/package_managers/BUILD | 4 ---- toolchains/docker/toolchain.bzl | 3 --- 7 files changed, 3 insertions(+), 20 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 9cd3f1175..9930edaab 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -18,6 +18,8 @@ tasks: default_workspace_macos: platform: macos test_targets: + # Use "bazel query 'kind(".*_test", ...)'" to refresh this list. + # # NOTE: per Philipp Wollermann, docker is not installed on the macos # buildkite runners due to security concerns. # diff --git a/.bazelrc b/.bazelrc index c153bc882..178245be2 100644 --- a/.bazelrc +++ b/.bazelrc @@ -56,13 +56,7 @@ test:remote --google_default_credentials=true test:remote --remote_timeout=3600 test:remote --keep_going -build:bezel --bes_backend=grpcs://api.bzl.io:443 -build:bezel --bes_results_url=https://bzl.io/pipeline -build:bezel --bes_timeout=5s - # Configuration specific to buildkite CI testing the default workspace - -test:buildkite --config=bezel test:buildkite --action_env=PATH test:buildkite --define=ENV_KEY=my_key # for tests/container:set_env_make_vars_test test:buildkite --define=ENV_VALUE=my_value # for tests/container:set_env_make_vars_test diff --git a/BUILD b/BUILD index a8e26cbd8..26b6ded5e 100644 --- a/BUILD +++ b/BUILD @@ -52,5 +52,4 @@ container_test( name = "structure_test_at_workspace_root", configs = ["//tests/container/configs:test.yaml"], image = "//testdata:link_with_files_base", - tags = ["buildkite-macos-todo"], # docker not found? ) diff --git a/WORKSPACE b/WORKSPACE index f9b76f291..50b4bb3e4 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -19,11 +19,9 @@ load( docker_toolchain_configure = "toolchain_configure", ) -# This will attempt to determine the location of the 'docker' binary that is -# used in some parts of rules_docker. On linux this is typically -# /usr/bin/docker; on macos /usr/local/bin/docker. docker_toolchain_configure( name = "docker_config", + docker_path = "/usr/bin/docker", ) # Consumers shouldn't need to do this themselves once WORKSPACE is diff --git a/tests/container/BUILD b/tests/container/BUILD index 87faa6f8e..4f9707321 100644 --- a/tests/container/BUILD +++ b/tests/container/BUILD @@ -240,7 +240,6 @@ file_test( name = "test_digest_output1", content = "sha256:4ec78686f1edd4f30cca6222f17ace5a2b9f8db9708727c3a140c954af0a534d", file = ":deb_image_with_dpkgs.digest", - tags = ["buildkite-macos-todo"], # has different digest value on macos ) file_test( @@ -617,14 +616,12 @@ file_test( name = "alpine_custom_attr_digest_test", content = "sha256:2f3bf2d061a1bab130cdd98f10b73dfceb08bfbf94a610c62f20c787073e5178", file = ":new_push_test_legacy_from_container_img.digest", - tags = ["buildkite-macos-todo"], # has different digest value on macos ) file_test( name = "new_alpine_linux_armv6_image_tar_digest_test", content = "sha256:249804db68a05bb88cc353d4aff090b084d8b8312665638d2f8d7bdaeaa423b3", file = ":new_alpine_linux_armv6_image_tar.digest", - tags = ["buildkite-macos-todo"], # has different digest value on macos ) # END_DO_NOT_IMPORT diff --git a/tests/docker/package_managers/BUILD b/tests/docker/package_managers/BUILD index 4193997f0..d658bf481 100644 --- a/tests/docker/package_managers/BUILD +++ b/tests/docker/package_managers/BUILD @@ -58,7 +58,6 @@ sh_test( name = "download_pkgs_run_test", srcs = ["download_pkgs_run_test.sh"], data = [":test_download_pkgs.tar"], - tags = ["buildkite-macos-todo"], # gpg key issue ) add_apt_key( @@ -84,7 +83,6 @@ sh_test( name = "download_pkgs_with_additional_repos_run_test", srcs = ["download_pkgs_with_additional_repos_run_test.sh"], data = [":test_download_pkgs_with_additional_repos.tar"], - tags = ["buildkite-macos-todo"], # gpg key issue ) install_pkgs( @@ -116,7 +114,6 @@ container_test( name = "gpg_test", configs = [":gpg_test.yaml"], image = ":gpg_image", - tags = ["buildkite-macos-todo"], # gpg key issue ) # Testing reproducibility of install_pkgs @@ -149,5 +146,4 @@ compare_ids_test( ":install_git_for_reproducibility_1", ":install_git_for_reproducibility_2", ], - tags = ["buildkite-macos-todo"], # gpg key issue ) diff --git a/toolchains/docker/toolchain.bzl b/toolchains/docker/toolchain.bzl index 1b5ac481a..a4166831d 100644 --- a/toolchains/docker/toolchain.bzl +++ b/toolchains/docker/toolchain.bzl @@ -87,9 +87,6 @@ docker_toolchain = rule( def _toolchain_configure_impl(repository_ctx): if repository_ctx.attr.gzip_target and repository_ctx.attr.gzip_path: fail("Only one of gzip_target or gzip_path can be set.") - docker = repository_ctx.which("docker") - print("which docker: %s" % docker) - tool_path = "" if repository_ctx.attr.docker_path: tool_path = repository_ctx.attr.docker_path