Commit 63db812
authored
Skip already-deleted caches in PR cleanup loop (#554)
GitHub's Actions Cache list endpoint is eventually consistent: a cache
just deleted in one outer iteration can reappear in the next list call,
causing the second `gh cache delete` to 404 and fail the job (as seen
in PR #553's Cleanup caches run). Track every ID the script has already
removed and filter subsequent list responses against it so each cache
is only deleted once.1 parent c6bf118 commit 63db812
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
61 | | - | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
0 commit comments