Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: extend http download timeout #369

Merged
merged 1 commit into from Sep 28, 2023

Conversation

migmartri
Copy link
Member

The issue in fact is a misconfiguration in the helm Chart and only Azure Blob Storage is affected.

The reason Azure is the only affected is because in its implementation we in fact use the parent context which by default has a timeout. The OCI implementation doesn't use context (it should)

The reason it only affects the HTTP endpoint is because grpc downloads don't have timeouts, http one does.

Fixes #366

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
@@ -91,6 +91,10 @@ func (s *DownloadService) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}

// if the buffer contains the actual data we expect we proceed with sending it to the browser
// Set headers
w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=%s", info.FileName))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been moved to just notify the browser early of what to expect.

Copy link
Member

@danlishka danlishka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@migmartri migmartri merged commit 42c24bf into chainloop-dev:main Sep 28, 2023
12 checks passed
@migmartri migmartri deleted the fix-download-process branch September 28, 2023 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timeout during http downloads
2 participants