Skip to content

Build artifacts are missing with "--remote_download_toplevel" cache option #13625

@loshca

Description

@loshca

Description of the problem / feature request:

Assume we have two targets, one dependency of another:

genrule(
    name = "echo", 
    outs = ["echo.txt"],
    cmd = "echo \"something\" > $@",
)

genrule(
    name = "cat",  
    srcs = [":echo"],
    outs = ["cat.txt"],
    cmd = "cat $(locations :echo) > $@",
)

If we get cat target from cache with --remote_download_toplevel: bazel build cat --disk_cache=D:\bazel_disk_cache --remote_download_toplevel, then we will not be able to get output for echo with bazel build echo --disk_cache=D:\bazel_disk_cache --remote_download_toplevel. Instead we got an up to date message and that's it, bazel-bin/echo.txt is not presented :

INFO: Invocation ID: d8e174cf-83cd-49bf-9f51-3367241fd6e1
INFO: Analyzed target //:echo (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //:echo up-to-date:
  bazel-bin/echo.txt
INFO: Elapsed time: 0.153s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action

What operating system are you running Bazel on?

Windows & MacOS

What's the output of bazel info release?

4.0.0

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