Skip to content

fix: only report a saved cache when saving succeeded - #1110

Merged
eifinger merged 1 commit into
astral-sh:mainfrom
soujasK:fix/save-cache-success-log
Oct 25, 2026
Merged

eifinger merged 1 commit into
astral-sh:mainfrom
soujasK:fix/save-cache-success-log

Conversation

@soujasK

@soujasK soujasK commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Summary

The post step logs uv cache saved with key: ... (and Python cache saved with key: ...) even when the save failed. The log in #769 shows it right after Warning: Failed to save: ...:

Warning: Failed to save: "C:\Program failed with error: The process 'C:\Program Files\Git\usr\bin\tar.exe' failed with exit code 2
uv cache saved with key: setup-uv-2-x86_64-pc-windows-msvc-windows-11-3.12.12-pruned-...

@actions/cache's saveCache doesn't throw for these failures. It logs them and returns -1, and saveCacheToKey ignored the return value. This now checks for -1 before logging, which is the same check the actions/cache save step uses (if (cacheId != -1) core.info("Cache saved with key: ...")). @actions/cache already logs the reason, so nothing else is logged on failure, and the exit code stays the same.

This only changes the log line. It doesn't address the underlying tar/gzip failure in #769. One limitation: with the legacy (v1) cache service, an upload that fails after the cache was reserved still returns the reserved id, so that one case is still reported as saved. That's on the @actions/cache side and affects actions/cache the same way.

Related to #769

Test plan

  • Added __tests__/cache/save-cache.test.ts. The -1 case fails before the change and passes after it.
  • npm run all on Ubuntu (WSL) with Node 24.19.0 / npm 11.17.0: build, Biome (no fixes), packaging, and all 161 tests across 16 suites pass. The regenerated dist/save-cache/index.cjs only differs in the changed lines.

`@actions/cache` logs save failures itself and returns -1 instead of
throwing, but the post step logged "<name> saved with key" regardless of
the result. Check the returned cache id like the actions/cache save step
does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@soujasK
soujasK requested a review from eifinger as a code owner October 25, 2026 16:00
@eifinger

Copy link
Copy Markdown
Collaborator

Thank you!

@eifinger
eifinger merged commit 36b7b57 into astral-sh:main Oct 25, 2026
90 checks passed
luketainton pushed a commit to luketainton/luke_rsu that referenced this pull request Oct 28, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | action | patch | `v10.3.2` → `v10.3.3` |

---

### Release Notes

<details>
<summary>astral-sh/setup-uv</summary>

### [`v10.3.3`](https://github.com/astral-sh/setup-uv/releases/tag/v10.3.3): 🌈 Use Astral mirror for version manifests with GitHub fallback

[Compare Source](astral-sh/setup-uv@v10.3.2...v10.3.3)

##### Changes

This release contains something that should have been included a very long time ago. Sorry for sleeping on that.

This action now retrieves the release manifest that contains the available versions, their download links and checksums from the Astral mirror, rather than trying GitHub first. This should present much more stable.
(Known checksums are still checked, so the security impact does not change)

Also a big thank you to [@&#8203;soujasK](https://github.com/soujasK) for a set of bugfixes 👏

##### 🐛 Bug fixes

- Use Astral mirror for version manifests with GitHub fallback [@&#8203;eifinger](https://github.com/eifinger) ([#&#8203;1119](astral-sh/setup-uv#1119))
- fix: allow whitespace in uv requirement specifiers [@&#8203;soujasK](https://github.com/soujasK) ([#&#8203;1112](astral-sh/setup-uv#1112))
- fix: resolve \~= specifiers with PEP 440 semantics [@&#8203;soujasK](https://github.com/soujasK) ([#&#8203;1111](astral-sh/setup-uv#1111))
- fix: only report a saved cache when saving succeeded [@&#8203;soujasK](https://github.com/soujasK) ([#&#8203;1110](astral-sh/setup-uv#1110))

##### 🧰 Maintenance

- chore: update known checksums for 0.13.6 @&#8203;[github-actions\[bot\]](https://github.com/apps/github-actions) ([#&#8203;1117](astral-sh/setup-uv#1117))

##### 📚 Documentation

- docs: use JSDoc for compatible release specifier comment [@&#8203;eifinger](https://github.com/eifinger) ([#&#8203;1113](astral-sh/setup-uv#1113))
- docs: update version references to v10.3.2 @&#8203;[github-actions\[bot\]](https://github.com/apps/github-actions) ([#&#8203;1104](astral-sh/setup-uv#1104))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE5MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==-->

Reviewed-on: https://git.tainton.uk/repos/rsu/pulls/64
Co-authored-by: renovate[bot] <renovate-bot@git.tainton.uk>
luketainton pushed a commit to luketainton/repos_labmcp that referenced this pull request Oct 28, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | action | patch | `v10.3.2` → `v10.3.3` |

---

### Release Notes

<details>
<summary>astral-sh/setup-uv</summary>

### [`v10.3.3`](https://github.com/astral-sh/setup-uv/releases/tag/v10.3.3): 🌈 Use Astral mirror for version manifests with GitHub fallback

[Compare Source](astral-sh/setup-uv@v10.3.2...v10.3.3)

##### Changes

This release contains something that should have been included a very long time ago. Sorry for sleeping on that.

This action now retrieves the release manifest that contains the available versions, their download links and checksums from the Astral mirror, rather than trying GitHub first. This should present much more stable.
(Known checksums are still checked, so the security impact does not change)

Also a big thank you to [@&#8203;soujasK](https://github.com/soujasK) for a set of bugfixes 👏

##### 🐛 Bug fixes

- Use Astral mirror for version manifests with GitHub fallback [@&#8203;eifinger](https://github.com/eifinger) ([#&#8203;1119](astral-sh/setup-uv#1119))
- fix: allow whitespace in uv requirement specifiers [@&#8203;soujasK](https://github.com/soujasK) ([#&#8203;1112](astral-sh/setup-uv#1112))
- fix: resolve \~= specifiers with PEP 440 semantics [@&#8203;soujasK](https://github.com/soujasK) ([#&#8203;1111](astral-sh/setup-uv#1111))
- fix: only report a saved cache when saving succeeded [@&#8203;soujasK](https://github.com/soujasK) ([#&#8203;1110](astral-sh/setup-uv#1110))

##### 🧰 Maintenance

- chore: update known checksums for 0.13.6 @&#8203;[github-actions\[bot\]](https://github.com/apps/github-actions) ([#&#8203;1117](astral-sh/setup-uv#1117))

##### 📚 Documentation

- docs: use JSDoc for compatible release specifier comment [@&#8203;eifinger](https://github.com/eifinger) ([#&#8203;1113](astral-sh/setup-uv#1113))
- docs: update version references to v10.3.2 @&#8203;[github-actions\[bot\]](https://github.com/apps/github-actions) ([#&#8203;1104](astral-sh/setup-uv#1104))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE5MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==-->

Reviewed-on: https://git.tainton.uk/repos/labmcp/pulls/87
Reviewed-by: Luke Tainton <luke@tainton.uk>
Co-authored-by: renovate[bot] <renovate-bot@git.tainton.uk>
Doridian pushed a commit to FoxDenHome/core that referenced this pull request Oct 28, 2026
…10.3.3 (#288)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [https://github.com/astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | action | patch | `v10.3.2` → `v10.3.3` |

---

### Release Notes

<details>
<summary>astral-sh/setup-uv (https://github.com/astral-sh/setup-uv)</summary>

### [`v10.3.3`](https://github.com/astral-sh/setup-uv/releases/tag/v10.3.3): 🌈 Use Astral mirror for version manifests with GitHub fallback

[Compare Source](astral-sh/setup-uv@v10.3.2...v10.3.3)

#### Changes

This release contains something that should have been included a very long time ago. Sorry for sleeping on that.

This action now retrieves the release manifest that contains the available versions, their download links and checksums from the Astral mirror, rather than trying GitHub first. This should present much more stable.
(Known checksums are still checked, so the security impact does not change)

Also a big thank you to [@&#8203;soujasK](https://github.com/soujasK) for a set of bugfixes 👏

#### 🐛 Bug fixes

- Use Astral mirror for version manifests with GitHub fallback [@&#8203;eifinger](https://github.com/eifinger) ([#&#8203;1119](astral-sh/setup-uv#1119))
- fix: allow whitespace in uv requirement specifiers [@&#8203;soujasK](https://github.com/soujasK) ([#&#8203;1112](astral-sh/setup-uv#1112))
- fix: resolve \~= specifiers with PEP 440 semantics [@&#8203;soujasK](https://github.com/soujasK) ([#&#8203;1111](astral-sh/setup-uv#1111))
- fix: only report a saved cache when saving succeeded [@&#8203;soujasK](https://github.com/soujasK) ([#&#8203;1110](astral-sh/setup-uv#1110))

#### 🧰 Maintenance

- chore: update known checksums for 0.13.6 @&#8203;[github-actions\[bot\]](https://github.com/apps/github-actions) ([#&#8203;1117](astral-sh/setup-uv#1117))

#### 📚 Documentation

- docs: use JSDoc for compatible release specifier comment [@&#8203;eifinger](https://github.com/eifinger) ([#&#8203;1113](astral-sh/setup-uv#1113))
- docs: update version references to v10.3.2 @&#8203;[github-actions\[bot\]](https://github.com/apps/github-actions) ([#&#8203;1104](astral-sh/setup-uv#1104))

</details>

---

### Configuration

📅 **Schedule**: (in timezone America/Los_Angeles)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE5MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://git.foxden.network/FoxDen/core/pulls/288
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants