Skip to content

fix: lake: gracefully handle curl and IO errors during transfer - #14651

Merged
tydeu merged 1 commit into
leanprover:masterfrom
tydeu:lake/cache-transfer-errors
Aug 2, 2026
Merged

fix: lake: gracefully handle curl and IO errors during transfer#14651
tydeu merged 1 commit into
leanprover:masterfrom
tydeu:lake/cache-transfer-errors

Conversation

@tydeu

@tydeu tydeu commented Aug 2, 2026

Copy link
Copy Markdown
Member

This PR fixes a number of ways a failed artifact transfer in lake cache get / lake cache put could fail to be recorded or could lead to an early abort of the entire transfer batch. Sometimes this would leave a corrupted artifact in the local Lake cache, which could break downstream builds.

The transfer now handles any form of IO error with a custom error message, cross-references with curl's reported exitcode to determine errors, and stores downloaded artifacts in a sibling .tmp file before doing an atomic rename.

🤖 Diagnosed and reviewed by Claude Code

@tydeu tydeu added the changelog-lake Lake label Aug 2, 2026
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Aug 2, 2026
@mathlib-lean-pr-testing

Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Mathlib CI can not be attempted yet, as the nightly-testing-2026-08-01 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-mathlib, Mathlib CI should run now. You can force Mathlib CI using the force-mathlib-ci label. (2026-08-02 03:08:50)

@leanprover-bot leanprover-bot added the builds-manual CI has verified that the Lean Language Reference builds against this PR label Aug 2, 2026
@leanprover-bot

leanprover-bot commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Reference manual CI status:

@tydeu
tydeu marked this pull request as ready for review August 2, 2026 03:31
@tydeu
tydeu added this pull request to the merge queue Aug 2, 2026
Merged via the queue into leanprover:master with commit 0ccd6f7 Aug 2, 2026
38 checks passed
@tydeu
tydeu deleted the lake/cache-transfer-errors branch August 2, 2026 05:13
kim-em added a commit to TauCetiProject/TauCeti that referenced this pull request Aug 4, 2026
The stale-`s.didError` read that forces us to grep the fetch log is fixed
by leanprover/lean4#14651, which missed v4.33.0-rc2
by hours and was not backported to releases/v4.33.0, so it first ships in
v4.34.0.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
kim-em added a commit to TauCetiProject/TauCeti that referenced this pull request Aug 6, 2026
The comment attributed partial fetches to Cloudflare rate-limiting the public
`*.r2.dev` host, which was replaced by cache.taucetiproject.org. The cause is now
known: leanprover/lean4#14651 downloads to a temporary path
and renames on success, and tolerates an unreadable artifact instead of aborting the
batch. It lands in v4.34.0-rc1.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
kim-em added a commit to TauCetiProject/TauCeti that referenced this pull request Aug 6, 2026
Replace the stale r2.dev rate-limiting explanation with the actual cause: leanprover/lean4#14651, landing in v4.34.0-rc1.

🤖 Prepared with Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builds-manual CI has verified that the Lean Language Reference builds against this PR changelog-lake Lake toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants