trunk-merge/pr-1131/cf3510f6-d4cb-4746-a027-913699a5bf8d#1133
Closed
trunk-io[bot] wants to merge 2 commits into
Closed
trunk-merge/pr-1131/cf3510f6-d4cb-4746-a027-913699a5bf8d#1133trunk-io[bot] wants to merge 2 commits into
trunk-io[bot] wants to merge 2 commits into
Conversation
The API client's retry loop only honored a retry *count* (TRUNK_API_CLIENT_RETRY_COUNT); the total wall-clock time was otherwise unbounded (per-request timeouts + up to ~62s of exponential backoff across retries), so slow/failing calls could run for minutes. Add an optional overall deadline, read from TRUNK_API_CLIENT_RETRY_DEADLINE_SECS. The retry loop now gives up once the elapsed time plus the next backoff would exceed the budget, returning the most recent error. Pairs with TRUNK_API_CLIENT_RETRY_COUNT to tune how fast and how often the CLI gives up. Replace tokio-retry's RetryIf with an explicit loop so the deadline can short-circuit without needing to construct an error from nothing (the generic A::Error includes reqwest::Error, which has no public constructor). Behavior is identical to before when the deadline is unset. Capture the new env var in bundle metadata for debugging. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1133 +/- ##
==========================================
+ Coverage 82.43% 82.73% +0.29%
==========================================
Files 70 70
Lines 15505 15554 +49
==========================================
+ Hits 12782 12868 +86
+ Misses 2723 2686 -37 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request was created and is being managed by Trunk Merge.
This pull request is based on the main branch at SHA 0714b9acbaef42b98436f6cc73091f04761ba9e3.
See more details here.
When CI completes, this pull request will be closed automatically.
Pull Requests Being Tested
This pull request is testing the changes from pull request 1131.