Skip to content

experimental_sibling_repository_layout seems to create remote execution actions with invalid working_directory/output relationships #13188

@illicitonion

Description

@illicitonion

Description of the problem / feature request:

When testing out an unrelated feature, using remote execution (with buildbarn), I ran into issues where Bazel errored that it could not compile DumpPlatformClassPath.class because:

JavaToolchainCompileClasses tools/jdk/platformclasspath_classes/DumpPlatformClassPath.class failed: not all outputs were created or valid

I'm running in a workspace with name example_all.

As far as I can tell, this error is because on the Command we're setting working_directory: example_all but also prefixing the output_files with example_all/, for example the output_files for my execution is example_all/bazel-out/bazel_tools/darwin-fastbuild/bin/tools/jdk/platformclasspath_classes/DumpPlatformClassPath.class.

The remote execution API specifies that output_files should be relative to the working_directory, rather than relative to the input_root, so I believe this prefixing shouldn't be happening. See this section of the remote API spec:

https://github.com/bazelbuild/remote-apis/blob/0943dc4e70e1414735a85a3167557392c177ff45/build/bazel/remote/execution/v2/remote_execution.proto#L547-L551

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Run a buildbarn cluster, and try to build any Java with --experimental_sibling_repository_layout=true.

What operating system are you running Bazel on?

The Bazel client is on macOS, the buildbarn cluster is running Ubuntu Focal.

What's the output of bazel info release?

development version

If bazel info release returns "development version" or "(@Non-Git)", tell us how you built Bazel.

Checked out f182645 and ran bazel build //src:bazel

If I revert 7149f57 this error goes away (though others are introduced), so I'll cc @lberki who may have some thoughts :)

Metadata

Metadata

Assignees

Labels

P1I'll work on this now. (Assignee required)team-Remote-ExecIssues and PRs for the Execution (Remote) teamtype: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions