Skip to content

[9.1.1] Cache CAS interactions at lower layer to fix lost input handling#29673

Closed
iancha1992 wants to merge 2 commits into
bazelbuild:release-9.1.1from
iancha1992:cp5572634408f_new
Closed

[9.1.1] Cache CAS interactions at lower layer to fix lost input handling#29673
iancha1992 wants to merge 2 commits into
bazelbuild:release-9.1.1from
iancha1992:cp5572634408f_new

Conversation

@iancha1992
Copy link
Copy Markdown
Member

…ps://github.com//pull/29551)

The error handling for uploads in UploadTask depends on the exec path of the uploaded file, which wasn't part of the casUploadCache cache key. Fix this by moving deduplication logic for CAS uploads and FindMissing calls into RemoteCacheClient.

Avoids spurious Bazel failures caused by lost inputs that can't be recovered from via build or action rewinding due to CacheNotFoundException being marked with exec paths of inputs to concurrent actions (see the new test case).

No

  • I have added tests for the new use cases (if any).
  • I have updated the documentation (if applicable).

RELNOTES: Fixed an issue that caused Bazel to fail on a lost input even with build or action rewinding enabled.

Closes #29551.

PiperOrigin-RevId: 922775351
Change-Id: Ia22580325c3bc92b56d202e5c24d3630fc8c27a0

Description

Motivation

Build API Changes

No

Checklist

  • I have added tests for the new use cases (if any).
  • I have updated the documentation (if applicable).

Release Notes

RELNOTES: None

Commit 1002722 and 5572634

tjgq and others added 2 commits May 28, 2026 15:17
PiperOrigin-RevId: 919057784
Change-Id: Ie8d5f84654b5305add288e86768996fd0e648080
…elbuild#29551)

The error handling for uploads in `UploadTask` depends on the exec path of the uploaded file, which wasn't part of the `casUploadCache` cache key. Fix this by moving deduplication logic for CAS uploads and `FindMissing` calls into `RemoteCacheClient`.

Avoids spurious Bazel failures caused by lost inputs that can't be recovered from via build or action rewinding due to `CacheNotFoundException` being marked with exec paths of inputs to concurrent actions (see the new test case).

No

- [x] I have added tests for the new use cases (if any).
- [ ] I have updated the documentation (if applicable).

RELNOTES: Fixed an issue that caused Bazel to fail on a lost input even with build or action rewinding enabled.

Closes bazelbuild#29551.

PiperOrigin-RevId: 922775351
Change-Id: Ia22580325c3bc92b56d202e5c24d3630fc8c27a0
@iancha1992 iancha1992 requested a review from Wyverald May 28, 2026 22:22
@iancha1992 iancha1992 requested a review from a team as a code owner May 28, 2026 22:22
@iancha1992 iancha1992 added the awaiting-review PR is awaiting review from an assigned reviewer label May 28, 2026
@github-actions github-actions Bot added team-Core Skyframe, bazel query, BEP, options parsing, bazelrc team-Remote-Exec Issues and PRs for the Execution (Remote) team labels May 28, 2026
@iancha1992 iancha1992 requested a review from coeuvre May 28, 2026 22:24
@iancha1992
Copy link
Copy Markdown
Member Author

iancha1992 commented May 28, 2026

@Wyverald Do we need to cherry-pick 8f5af36 also or other commit?

@iancha1992 iancha1992 force-pushed the cp5572634408f_new branch from 394ce3c to a1f54c7 Compare May 28, 2026 22:33
@Wyverald
Copy link
Copy Markdown
Member

@fmeum how critical is this? This is now the last thing blocking 9.1.1. If you think we must include it, could you send a cherry-pick PR? Otherwise, we should just start rc1 to get 9.1.1 out to address the crash bugs that people are seeing.

@fmeum
Copy link
Copy Markdown
Collaborator

fmeum commented May 29, 2026

It fixes a feature released in 9.1.0, so it's less critical than a crash bug fix, but still meaningful. Sorry, I didn't monitor the milestone this time and didn't realize it was this close. Sent #29677, which cherry-picks two BUILD file refactorings.

@Wyverald Wyverald closed this May 29, 2026
@github-actions github-actions Bot removed the awaiting-review PR is awaiting review from an assigned reviewer label May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Core Skyframe, bazel query, BEP, options parsing, bazelrc team-Remote-Exec Issues and PRs for the Execution (Remote) team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants