Repository navigation
Make response write and artifact download timeouts configurable - #531
Merged
andrew merged 1 commit intoOct 19, 2026
Merged
Conversation
Add independent write_timeout and artifact_timeout settings with environment overrides and unchanged five-minute defaults. Keep mirror downloads unlimited and validate timeout values. Refs git-pkgs#530
andrew
approved these changes
Oct 19, 2026
andrew
left a comment
Contributor
There was a problem hiding this comment.
Verified independent response and artifact timeouts through the running server, including delayed scanning and disabled timeouts. No blocking findings.
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.
Closes #530.
Cold artifact requests can spend more than five minutes downloading and scanning before returning a response. Both the response write deadline and upstream artifact download timeout currently use the same hard-coded five-minute value, so increasing
scanning.timeoutcannot extend the response deadline.This adds independent
write_timeoutandartifact_timeoutsettings, withPROXY_WRITE_TIMEOUTandPROXY_ARTIFACT_TIMEOUTenvironment overrides. Both default to5m;"0"disables the corresponding timeout, and malformed or negative values are rejected at startup. Existing metadata and scanning settings, transport safeguards, and unlimited CLI mirror downloads retain their behavior.The configuration reference explains that the write deadline includes time spent waiting for downloads and scans. Tests cover YAML/JSON loading, environment precedence, validation, real HTTP deadline behavior, and CLI mirror downloads with short serve-only timeouts configured.
Validation on Linux with Go 1.26.7:
go test -race ./...go vet ./...go build ./...golangci-lint run ./...(v2.13.1; zero issues)gofmt;git diff --checkpasses.PostgreSQL integration tests were skipped because
PROXY_DATABASE_URLwas unset. The macOS and Windows test matrix remains for CI.