Skip to content

fix(circleci): upload every shard's JUnit file, and failed attempts on opt-in - #1596

Open
jeffpignataro wants to merge 1 commit into
mainfrom
jeff/fix/cs-296-circleci-upload-all-shards-attempts
Open

jeffpignataro wants to merge 1 commit into
mainfrom
jeff/fix/cs-296-circleci-upload-all-shards-attempts

Conversation

@jeffpignataro

Copy link
Copy Markdown
Collaborator

CircleCITestResults uploaded at most one JUnit file per test target. It keyed each test.xml by the target's label, and the Build Event Protocol names every run's, shard's and attempt's file test.xml, so each one overwrote the one before it. A target with 12 shards reported about a twelfth of its test cases, and a test that failed and then passed under --flaky_test_attempts showed only the pass.

Each file is now placed with the testlog_dest_dir layout ArtifactUpload already uses for test logs: a run_N, shard_N or attempt_N segment is added only for a number above 1, so a test with one run and one shard keeps its current path.

By default only each shard's final attempt is uploaded. A later attempt replaces the earlier one even when its own status is not collected, so a flaky target that Bazel reports as passed shows as passed in CircleCI, including under upload_test_results = "failed". The new upload_failed_attempts option uploads every attempt as its own file, so an attempt that failed before a passing retry shows as a failure. It is opt-in because it shows a failure for a target Bazel reported as passed.

Linear: CS-296


Changes are visible to end-users: yes

  • Searched for relevant documentation and updated as needed: no
  • Breaking change (forces users to change their own code or config): no
  • Suggested release notes appear below: yes

Suggested release notes

  • CircleCITestResults now uploads the JUnit results of every shard and every --runs_per_test run of a test target. Before, only one file per target reached CircleCI's Tests tab.
  • New CircleCITestResults option upload_failed_attempts (default False): uploads each --flaky_test_attempts attempt as its own file, so a test that failed before passing on retry shows as a failure in CircleCI.

Test plan

  • New test cases added:
    • circleci_test_results_test.axl (aspect-cli dev test-circleci-test-results): a target with two shards, where shard 2 fails on attempt 1 and passes on attempt 2, plus a target with one shard. It checks the uploaded paths with upload_failed_attempts off and on, under upload_test_results all and failed.
  • Locally: aspect-cli tests axl (1017 tests), aspect-cli dev test-artifacts and aspect-cli dev test-circleci pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_014D5dBJA2eDKDosVdJUepMb

…n opt-in

CircleCITestResults keyed each test.xml by label, and BEP names every
run's, shard's and attempt's file test.xml, so each overwrote the last
and only one survived per target. Key by run, shard and attempt with the
existing testlog_dest_dir layout.

By default only each shard's final attempt is uploaded, so a flaky target
Bazel reports as passed still shows as passed. upload_failed_attempts
uploads each attempt as its own file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014D5dBJA2eDKDosVdJUepMb
@jeffpignataro jeffpignataro self-assigned this Oct 19, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T20:47:30.871353Z 2c1b8d8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@aspect-workflows

aspect-workflows Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Aspect Workflows Tasks

Task Results


Install aspect: aspect.build/docs/cli/install · Powered by Aspect CLI (v0.0.0-dev)

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant