bazelbuild / bazelbuild/bazel-toolchains

rbe_configs_gen fails if image has bazel as its entrypoint

Open
#1,006 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
202
Forks
100
PR merge metrics
No merged PRs in 30d

Description

Due to not specifying `--entrypoint` to `docker create`, the container is immediately stopped after attempting `docker start`. This additionally leads to a misleading error that makes it appear that the container was killed as part of the `docker exec` command.

Captured output:

```
2024/03/15 12:03:04 Running: 'docker exec -w /workdir/cpp_configs_project -e USE_BAZEL_VERSION=7.1.0 -e ABI_VERSION=clang -e BAZEL_COMPILER=clang -e BAZEL_TARGET_LIBC=glibc_2.19 -e BAZEL_TARGET_SYSTEM=x86_64-unknown-linux-gnu -e ABI_LIBC_VERSION=glibc_2.19 -e BAZEL_HOST_SYSTEM=i686-unknown-linux-gnu -e BAZEL_TARGET_CPU=k8 -e CC=clang -e CC_TOOLCHAIN_NAME=linux_gnu_x86 b6f5da053b2802fd5f887ba457a2efbaef7d147341c87d25fc4604f0043e26f5 /workdir/bazelisk build @local_config_cc//...'
2024/03/15 12:03:13 Output: Extracting Bazel installation...
Starting local Bazel server and connecting to it...
2024/03/15 12:03:13 Running: 'docker stop -t 0 b6f5da053b2802fd5f887ba457a2efbaef7d147341c87d25fc4604f0043e26f5'
2024/03/15 12:03:13 Config generation failed: Config generation failed: failed to generate C++ configs: Bazel was unable to build the C++ config generation targets in the toolchain container: exit status 137
```

Contributor guide

Open the contributing guide

Research direction

Inspect the rbe_configs_gen path that creates and starts the Docker toolchain container, then reproduce the failure with an image whose entrypoint is bazel. Verify that config generation completes successfully for that image and that the misleading exit-status failure no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
build-system, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.