bazelbuild / bazel

a fast, scalable, multi-language and extensible build system
https://bazel.build
Apache License 2.0
23.13k stars 4.05k forks source link

Undeclared outputs not uploaded to BES when --nozip_undeclared_test_outputs is set #17911

Closed tjgq closed 1 month ago

tjgq commented 1 year ago

Minimal repro:

$ cat .bazelrc
build --google_default_credentials
build --remote_instance_name=projects/bazel-untrusted/instances/default_instance
build --remote_executor=grpcs://remotebuildexecution.googleapis.com
build --remote_default_exec_properties=container-image=docker://gcr.io/bazel-public/ubuntu1804-bazel-java11@sha256:2d50853a7edbe59a99bc4141d7a03cb1068157b9766077302b46c4ec94eef151
build --remote_download_toplevel
build --bes_backend=buildeventservice.googleapis.com
build --bes_instance_name=bazel-untrusted
build --bes_results_url=https://source.cloud.google.com/results/invocations/
$ cat BUILD
sh_test(
    name = "test",
    srcs = ["test.sh"],
)
$ cat test.sh
#!/bin/sh
echo foo > "$TEST_UNDECLARED_OUTPUTS_DIR/text.txt"

First run: bazel test --zip_undeclared_test_outputs :test Result: go to BES results url, Artifacts tab, :test target. See undeclared_outputs.zip is present in the list and can be downloaded.

Second run: bazel test --nozip_undeclared_test_outputs :test Result: go to BES results URL, Artifacts tab, :test target. See that the individual files in the undeclared outputs directory are missing from list.

github-actions[bot] commented 4 months ago

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.

github-actions[bot] commented 1 month ago

This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please post @bazelbuild/triage in a comment here and we'll take a look. Thanks!

fmeum commented 1 month ago

This is still relevant

tjgq commented 1 month ago

Thanks for surfacing this; I had no memory of it. It looks like it's still a problem, though I'm not sure whether it's on the Bazel or ResultStore side. If it's on the Bazel side, it should either be fixed before Bazel 8, or we need to revert the --zip_undeclared_test_outputs flag flip.

iancha1992 commented 1 month ago

@bazel-io fork 7.4.0