You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bazel toolchain is failing in downstream projects #376
@philwo and I had the discussion yesterday about removing docker in Buildkite machines to increase security. I thought we should be fine without docker in the host machine. But it's strange that bazelbuild/bazel-toolchains#234 presubmit is fine. Maybe @philwo only removed docker in some of the machines for testing?
It's likely due to bazelbuild/bazel@3c7c273@katre. Now multiple execution platforms can be specified using --extra_execution_platform. We should let it select the container that has docker installed.
I would ideally like to keep the platform ordering logic simple. Fixing the CI to allow it to set the flags in the correct order seems best. @philwo, is this hard to do?
But from error message, it shows the wrong execution platform is used. With @meteorcloudy 's change in Buildkite config, it seems the situation is mitigated. Some actions or tests uses the right platform, but not all. (before all tests were using the wrong platform)
Activity
xingao267 commentedon Nov 8, 2018
@philwo and I had the discussion yesterday about removing docker in Buildkite machines to increase security. I thought we should be fine without docker in the host machine. But it's strange that bazelbuild/bazel-toolchains#234 presubmit is fine. Maybe @philwo only removed docker in some of the machines for testing?
xingao267 commentedon Nov 8, 2018
But I did try several remote builds in a docker container without docker installed and they succeeded.
xingao267 commentedon Nov 8, 2018
Oh, it looks the wrong execution platform is selected.
Execution platform: @bazel_toolchains//configs/ubuntu16_04_clang/1.1:rbe_ubuntu1604_r342117_jdk8
| ++ python external/io_bazel_rules_docker/contrib/extract_image_id.py bazel-out/k8-fastbuild/bin/external/ubuntu16_04/image/image.tar
| + image_id=37b1fb5420cd7e5b800874fe7039cc06ae34e22ebaee4b9a9379c91634801dc2
| + docker load -i bazel-out/k8-fastbuild/bin/external/ubuntu16_04/image/image.tar
| bazel-out/k8-fastbuild/bin/container/ubuntu16_04/layers/bazel/bazel_0.18.0_installer_image-download_pkgs_output_script.sh: line 6: docker: command not found
That remote container does not have container installed.
xingao267 commentedon Nov 8, 2018
It is using the default platform that we set in Buildkite CI (https://github.com/bazelbuild/continuous-integration/blob/master/buildkite/bazelci.py#L876)
But we have set testing flags here (https://github.com/bazelbuild/bazel-toolchains/blob/master/.bazelci/presubmit.yml#L27) to override the default platform which has docker installed.
xingao267 commentedon Nov 8, 2018
It's likely due to bazelbuild/bazel@3c7c273 @katre. Now multiple execution platforms can be specified using --extra_execution_platform. We should let it select the container that has docker installed.
xingao267 commentedon Nov 8, 2018
I'm gonna add a new constraint for support_docker.
Add new constraint and toolchain for docker support. (#235)
xingao267 commentedon Nov 8, 2018
Rerun the tests and still failing. Looks like it's still selecting the default pair of toolchain and the platform as they are ahead in the list.
xingao267 commentedon Nov 8, 2018
With the current Buildkite setup that the default flags are appended first (https://github.com/bazelbuild/continuous-integration/blob/master/buildkite/bazelci.py#L876), I'm not sure how we can actually override default platforms in this case. Maybe we should support some kind of priority in platform selection instead of selecting the first one? or for custom extra platform and toolchains flags set in .bazelci/presubmit.yml should go first? @katre @philwo
katre commentedon Nov 9, 2018
I would ideally like to keep the platform ordering logic simple. Fixing the CI to allow it to set the flags in the correct order seems best. @philwo, is this hard to do?
Add flags from config file (.yml) before default flags
meteorcloudy commentedon Nov 12, 2018
@xingao267 Thanks for investigating on this!
I filed #378
Add flags from config file (.yml) before default flags (#378)
meteorcloudy commentedon Nov 12, 2018
@xingao267
https://buildkite.com/bazel/bazel-with-downstream-projects-bazel/builds/579#bc7c1894-0f02-4d9a-b4a2-e06a1d04f246
Now we got a similar error, but it happens inside //container/experimental/rbe-debian9:toolchain-test
xingao267 commentedon Nov 12, 2018
I was able to reproduce it locally. Step to reproduce:
@katre From the toolchain resolution debug messages, it looks like the right pair of toolchain and platform is selected:
But from error message, it shows the wrong execution platform is used. With @meteorcloudy 's change in Buildkite config, it seems the situation is mitigated. Some actions or tests uses the right platform, but not all. (before all tests were using the wrong platform)
@katre any ideas in this?
Add flags from config file (.yml) before default flags (bazelbuild#378)