Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

work around trailing slash issue with protobuf codegen #10849

Merged
merged 1 commit into from Sep 24, 2020

Conversation

tdyas
Copy link
Contributor

@tdyas tdyas commented Sep 23, 2020

Problem

See #10802 for an issue with protobuf generation and remote execution. As it turns out, sending the output directory as out/ with a trailing slash caused BuildBarn to generate a Directory proto with a empty directory name in it.

The trailing slash is forbidden by the REAPI spec in any event: https://github.com/bazelbuild/remote-apis/blob/f54876595da9f2c2d66c98c318d00b60fd64900b/build/bazel/remote/execution/v2/remote_execution.proto#L507-L508

Solution

This solution is just a short-term work around. A better fix would provide better validation of REAPI requests.

Result

The example-python repository is buildable in remote execution with BuildBarn.

@stuhood
Copy link
Sponsor Member

stuhood commented Sep 23, 2020

@tdyas : If you can confirm that #10850 works in your repro, let's maybe land that instead?

EDIT: Or we can land both: fine either way.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling 84d28ee on tdyas:workaround_output_dir_issue into db2f0e5 on pantsbuild:master.

@tdyas tdyas changed the title work around trailing slash issue with BuildBarn work around trailing slash issue with protobuf codegen Sep 24, 2020
@tdyas tdyas merged commit 6a561c6 into pantsbuild:master Sep 24, 2020
@tdyas tdyas deleted the workaround_output_dir_issue branch September 24, 2020 02:11
Eric-Arellano pushed a commit to Eric-Arellano/pants that referenced this pull request Sep 24, 2020
)

### Problem

See pantsbuild#10802 for an issue with protobuf generation and remote execution. As it turns out, sending the output directory as `out/` with a trailing slash caused BuildBarn to generate a Directory proto with a empty directory name in it.

The trailing slash is forbidden by the REAPI spec in any event: https://github.com/bazelbuild/remote-apis/blob/f54876595da9f2c2d66c98c318d00b60fd64900b/build/bazel/remote/execution/v2/remote_execution.proto#L507-L508

### Solution

This solution is just a short-term work around. A better fix would provide better validation of REAPI requests.

### Result

The example-python repository is buildable in remote execution with BuildBarn.
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants