Repository navigation
Let Dot attachment downloads use the full download timeout - #41
Merged
Merged
Conversation
Contributor
Author
|
No issues found.
All CI checks passed on
Select any unchecked box below to run or rerun that agent. Full resultsIndent Review Agent
|
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.
Production logs show one account stuck retrying one ChatGPT attachment. Each of its five real attempts ended with "attachment download interrupted" after about 32 s and logged "Event handling is taking long" for that room. In between, the media retry schedule kept the attachment pending and backed off toward 15 minutes. The file never arrived. Later messages in the room were still delivered.
Cause: incomingFile gives the download a 2-minute context, but DownloadAttachment fetches the storage URL with the shared API client, whose http.Client.Timeout is 30 s. That timeout also covers reading the body, so io.ReadAll fails at 30 s and returns an AttachmentStorageError. Any file that needs more than 30 s to fetch fails the same way on every retry, forever.
Change: the storage GET uses a copy of the client with Timeout set to 0, so the caller's 2-minute context sets the limit. Metadata and other API calls keep the 30 s timeout.
go build ./...andgo vetpass.Tag
@indentto continue the conversation here.