Skip to content

Conversation

@EliteTK
Copy link
Contributor

@EliteTK EliteTK commented Dec 30, 2025

Summary

Fixes #17266.

The retry count was getting dropped by ErrorKind::from_retry_middleware and <Error as From<ErrorKind>>::from so we were doing more retries than we should have.

Test Plan

Added a testcase for the specific error path in the issue. Added an expect to the other retry test too.

@EliteTK EliteTK requested a review from konstin December 30, 2025 17:58
@EliteTK EliteTK added the bug Something isn't working label Dec 30, 2025
@EliteTK EliteTK temporarily deployed to uv-test-registries December 30, 2025 17:59 — with GitHub Actions Inactive
Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems more appropriate than #17267

@EliteTK
Copy link
Contributor Author

EliteTK commented Dec 30, 2025

@zanieb do you think its worth waiting on @konstin?

@EliteTK EliteTK changed the title Track retry counts originating from middleware errors Track retry counts originating from early middleware errors Dec 30, 2025

// Create a server that fails with a more fundamental error so we trigger
// earlier error paths
Mock::given(method("GET"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this to a helper too, with a doc comment about which error path this checks?

@EliteTK EliteTK merged commit df62ee6 into main Jan 5, 2026
102 checks passed
@EliteTK EliteTK deleted the tk/dont-drop-retries branch January 5, 2026 20:06
konstin added a commit that referenced this pull request Jan 6, 2026
Previously, we had a retry count both on the top level error type, and
on an error variant, and had a conversion step in between. When
reviewing #17274, I noticed we can simplify that.
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jan 9, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.9.21` → `0.9.22` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>astral-sh/uv (astral-sh/uv)</summary>

### [`v0.9.22`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0922)

[Compare Source](astral-sh/uv@0.9.21...0.9.22)

Released on 2026-01-06.

##### Enhancements

- Use a dedicated error message when lockfile can't be found ([#&#8203;17318](astral-sh/uv#17318))

##### Bug fixes

- Filter unusable wheels from the lockfile for more architectures ([#&#8203;17317](astral-sh/uv#17317))
- Correctly count retries originating from early middleware errors ([#&#8203;17274](astral-sh/uv#17274))

##### Documentation

- Clarify requirements file format in docs ([#&#8203;17284](astral-sh/uv#17284))

</details>

---

### Configuration

📅 **Schedule**: 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 MR becomes conflicted, or you tick the rebase/retry checkbox.

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

---

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

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi43NS4xIiwidXBkYXRlZEluVmVyIjoiNDIuNzUuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6OnBhdGNoIl19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0.9.20: DNS failures take ~4x longer due to nested retries

4 participants