Skip to content

feat(httpx): retry 429 and 503 with Retry-After backoff#227

Open
TBX3D wants to merge 1 commit into
vmfunc:mainfrom
TBX3D:feat/httpx-retry-429
Open

feat(httpx): retry 429 and 503 with Retry-After backoff#227
TBX3D wants to merge 1 commit into
vmfunc:mainfrom
TBX3D:feat/httpx-retry-429

Conversation

@TBX3D

@TBX3D TBX3D commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

the shared transport paced outbound requests but ignored a server
asking it to slow down, so a 429 or 503 came straight back as a failed
probe. back off and retry both through the one chokepoint every scanner
shares, honoring Retry-After (delta-seconds or http-date) and falling
back to capped exponential backoff.

gated behind -max-retries (default 2, 0 disables). bodyless GETs and
GetBody-backed requests replay safely; anything else is returned as-is.

@TBX3D TBX3D requested a review from vmfunc as a code owner June 23, 2026 03:41
@github-actions github-actions Bot added size/l <500 lines changed tests test changes config configuration changes labels Jun 23, 2026
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

pr summary

4 files changed (+347 -22)

category files
go source 4
tests 1

@codecov-commenter

codecov-commenter commented Jun 23, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 72.72727% with 18 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@7c0eb0b). Learn more about missing BASE report.

Files with missing lines Patch % Lines
internal/httpx/httpx.go 79.66% 7 Missing and 5 partials ⚠️
sif.go 0.00% 6 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #227   +/-   ##
=======================================
  Coverage        ?   53.43%           
=======================================
  Files           ?       81           
  Lines           ?     6904           
  Branches        ?        0           
=======================================
  Hits            ?     3689           
  Misses          ?     2945           
  Partials        ?      270           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TBX3D TBX3D force-pushed the feat/httpx-retry-429 branch from 25f6cac to 14a34ee Compare June 23, 2026 04:07
the shared transport paced outbound requests but ignored a server
asking it to slow down, so a 429 or 503 came straight back as a failed
probe. back off and retry both through the one chokepoint every scanner
shares, honoring Retry-After (delta-seconds or http-date) and falling
back to capped exponential backoff.

gated behind -max-retries (default 2, 0 disables). bodyless GETs and
GetBody-backed requests replay safely; anything else is returned as-is.
@TBX3D TBX3D force-pushed the feat/httpx-retry-429 branch from 14a34ee to f4a8cf5 Compare June 23, 2026 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config configuration changes size/l <500 lines changed tests test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants