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

Empty input directories are omitted #59

Closed
Monnoroch opened this issue May 28, 2020 · 6 comments
Closed

Empty input directories are omitted #59

Monnoroch opened this issue May 28, 2020 · 6 comments

Comments

@Monnoroch
Copy link

Monnoroch commented May 28, 2020

Rules proto grpc project runs cp -r on multiple input directories. Each directory is created by an aspect for a proto_library target. During local execution Bazel creates output directories defined by declare_directory() for aspects and then calls the action to populate them. If the action doesn't produce any files empty directories stay as they were. When the same build is executed remotely with Buildbarn empty directories are not present in the inputs (while non-empty ones are there). I assume this is a bug in Buildbarn -- it doesn't download empty directory trees. #47 makes me think that if there's no files the directory tree will not be built. Since declare_directory() was called I would expect it to be present in dependent actions no matter it's contents.

Monnoroch added a commit to Monnoroch/rules_proto_grpc that referenced this issue May 28, 2020
This is a temporary hack until the [buildbarn bug](buildbarn/bb-remote-execution#59) is fixed.
@Monnoroch
Copy link
Author

Any comments on this issue? Is it considered a bug of the buildbarn implementation or should I file a PR to the proto rules repo?

@EdSchouten
Copy link
Member

Can you check whether this still holds with the latest copy of Buildbarn? It may be that this was related to #46. Be sure to also explore the input root in bb-browser. If there is no directory there, then there is little we can do; Bazel doesn’t provide it to us then.

@Monnoroch
Copy link
Author

Nope, still the same problem.

@EdSchouten
Copy link
Member

EdSchouten commented Jul 2, 2020

Have you inspected bb-browser to see what the input root looks like? If the input root doesn't show these directories, then there is no way you can expect Buildbarn to create them for you.

@Monnoroch
Copy link
Author

Yes, it doesn't have the empty directories. Only directories with files in them.

@EdSchouten
Copy link
Member

Then in that case Buildbarn is working as expected. It instantiates the file system as provided by Bazel. Be sure to file a new issue against Bazel itself to report this issue!

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

No branches or pull requests

2 participants