-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: go-resty component download #1466
Conversation
Is the 5 minute timeout a hard limit? My expectation is the download will not timeout as long as there is progress. Example: I was on conference wifi, roughly 3mbit, and it took about 15 minutes to download the I would expect a sane timeout if the download does not start (something like 15 seconds), no timeout if there is progress, and maybe a longer timeout (1-5 minutes) if no data has been received. |
lwcomponent/http.go
Outdated
} | ||
|
||
if totalSize == 0 { | ||
fmt.Printf("Downloaded: %.0fkb\n", float64(size)/(1<<10)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lwcomponent
should not interact with STDOUT or STDERR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How should we indicate progress?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am now using a virtual terminal - is this the approach you had in mind?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@afiune Moved the code to the CLI package and showing progress in the spinner suffix
15 minutes! Ok yeah, we can't have a hard timeout then - unless configured with an environmental variable. The timeouts you describe are handled by default, those are connection timeout and idle connection timeout. |
4ea5ee8
to
de9304e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
go-resty
CDK_DOWNLOAD_TIMEOUT_MINUTES
How did you test this change?
Unit tests + manual
Screen.Recording.2023-12-04.at.11.25.45.mov
Issue
https://lacework.atlassian.net/browse/GROW-2596