Skip to content

--remote_download_toplevel downloads stuff silently #17417

@jmmv

Description

@jmmv

Description of the bug:

When building anything on a remote build farm with --remote_download_toplevel, Bazel gets "stuck" after the INFO: Build completed successfully message. When this happen, the network is busy like crazy downloading the request artifacts, which "works" but has a bad UI.

Compare this to building without any --remote_download_* flags, where Bazel will properly print progress messages for every download it executes.

I traced this down to the BwtB downloader code, which enqueues downloads as futures and then... forgets about them until the command shutdown hook waits for their completion without any kind of progress reporting.

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

  1. Write a genrule that produces a multi-GB file.
  2. Build the target with --remote_download_toplevel.
  3. Notice how Bazel pauses after completing the command but before returning control to the user. Monitor network activity and notice the download happening in the background.

Which operating system are you running Bazel on?

Doesn't matter.

What is the output of bazel info release?

bazel release 6.0.0

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

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

Metadata

Metadata

Assignees

Labels

P2We'll consider working on this in future. (Assignee optional)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