fix(runtime): honor refresh and retry in files write - #904
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #904 +/- ##
==========================================
+ Coverage 82.49% 82.55% +0.06%
==========================================
Files 254 254
Lines 21585 21645 +60
==========================================
+ Hits 17806 17869 +63
+ Misses 3080 3076 -4
- Partials 699 700 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Apply refresh/retry to the multipart /files path and keep context timeout errors visible instead of swallowing them inside the retry loop. Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
d72b9b2 to
6227fc9
Compare
|
I think the current CI test failure is related to #791. |
|
This E2E failure is separate from this PR. sandbox (with sandbox-gateway) failed during quota pool startup: Tracked the issue in #908. Created the PR: #909 which adds a liveness probe so failed Code Interpreter startup restarts instead of remaining permanently unready. The CI job lacks sandbox logs so the exact startup error is not proven there. Local reproduction matches this pod state. |
Description:
Honor runtime refresh and retry in the multipart files write path.
Before this change,
FilesystemAPI.Writeresolved transport once from the bound sandbox and sent a single multipart/filesrequest. As a result, a caller-providedWithRefreshhook could not surface a newly stamped runtime URL or TLS transport, and transient transport or HTTP 5xx failures ignored the configuredWithRetrypolicy.This PR keeps the existing outward
/fileserror behavior, but refreshes the sandbox before each attempt, rebuilds the request from a cached multipart payload, and adds regression tests for the missing-runtime-URL refresh path and a transient 500 response.Validation Tests run:
go test ./pkg/utils/runtime -run 'TestWriteFileWithRuntime_RefreshResolvesRuntimeURL|TestWriteFileWithRuntime_RetriesTransientServerError' -count=1 -vgo test ./pkg/utils/runtime -run 'TestWriteFileWithRuntime_(InputValidation|HTTPInteractions|TransportError|HonorsLargeArgsTimeout|RefreshResolvesRuntimeURL|RetriesTransientServerError)|TestTLSMode_CapabilityGroupsUseRuntimeTLS|TestTLSMode_CapabilityGroupsRejectInvalidBundle' -count=1Notes:
FilesystemAPI.Write.ListDirandRemoveare left for a follow up PR if needed.