Skip to content

Commit 14d98a4

Browse files
committed
fix(Cache): Do not treat 201 Created as an error code (#35270)
`201 Created` is a success in the cache `PUT` operation: we are getting the failure log lines in every build (see [example](https://github.com/leanprover-community/mathlib4/actions/runs/21996999056/job/63559518669#step:25:39) but this happens every time): ``` Transfer failed (error code: 201) ``` because creating new blobs comes back with `201`.
1 parent a783932 commit 14d98a4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Cache/Requests.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,8 @@ def monitorCurl (args : Array String) (size : Nat)
333333
match Lean.Json.parse line.copy with
334334
| .ok result =>
335335
match result.getObjValAs? Nat "http_code" with
336-
| .ok 200 =>
336+
| .ok 200
337+
| .ok 201 =>
337338
if let .ok fn := result.getObjValAs? String "filename_effective" then
338339
if (← System.FilePath.pathExists fn) && fn.endsWith ".part" then
339340
IO.FS.rename fn (fn.dropEnd 5).copy

0 commit comments

Comments
 (0)