Skip to content

chore: better bazel test logs#12576

Merged
bolinfest merged 2 commits intomainfrom
jif/better-bazel-logs
Feb 23, 2026
Merged

chore: better bazel test logs#12576
bolinfest merged 2 commits intomainfrom
jif/better-bazel-logs

Conversation

@jif-oai
Copy link
Collaborator

@jif-oai jif-oai commented Feb 23, 2026

Summary

Improve Bazel CI failure diagnostics by printing the tail of each failed target’s test.log directly in the GitHub Actions output.

Today, when a large Bazel test target fails (for example tests of codex-core), the workflow often only shows a target-level Exit 101 plus a path to Bazel’s test.log. That makes it hard to see the actual failing Rust test and panic without digging into artifacts or reproducing locally.

This change makes the workflow automatically surface that information inline.

What Changed

In .github/workflows/bazel.yml:

  • Capture Bazel console output via tee
  • Preserve the Bazel exit code when piping (PIPESTATUS[0])
  • On failure:
    • Parse failed Bazel test targets from FAIL: //... lines
    • Resolve Bazel test log directory via bazel info bazel-testlogs
    • Print tail -n 200 for each failed target’s test.log
    • Group each target’s output in GitHub Actions logs (::group::)

Bonus

Disable experimental_remote_repo_contents_cache to prevent "Permission Denied"

@bolinfest bolinfest merged commit 3b6c50d into main Feb 23, 2026
33 checks passed
@bolinfest bolinfest deleted the jif/better-bazel-logs branch February 23, 2026 16:13
@github-actions github-actions bot locked and limited conversation to collaborators Feb 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants