Skip to content

Added custom user inputted timeout#1155

Merged
kotewar merged 6 commits intomainfrom
kotewar/custom-cache-download-timeout
Aug 18, 2022
Merged

Added custom user inputted timeout#1155
kotewar merged 6 commits intomainfrom
kotewar/custom-cache-download-timeout

Conversation

@kotewar
Copy link
Contributor

@kotewar kotewar commented Aug 16, 2022

Added an env var SEGMENT_DOWNLOAD_TIMEOUT_MINS that overrides the 1 hour default timeout for decreasing the cache download timeout.

A successful run

@kotewar kotewar requested a review from a team as a code owner August 16, 2022 04:15
}
}

const customDownloadTimeoutMins = process.env['CACHE_DOWNLOAD_TIMEOUT_MINS']
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we name the env variable as SEGMENT_DOWNLOAD_TIMEOUT_MINS to be more accurate? This timeout will not necessary make the whole download timeout as it may be non-first segment which gets stuck.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the users are not aware of the internal working of the download client, hence kept it a generic one that everyone would understand. If we want to keep it SEGMENT_DOWNLOAD_TIMEOUT_MINS, we'll have to also explain more about what a segment is, how the download segment size differs in 32 bit and 64 bit systems, etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's a good point. It's just that customer might come back complaining that I set a timeout and the download timed out only after a longer time period.
If it is helpful, we can document the process to download in segments and mention the timeout there. But agree that this is additional complexity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will work on the documenting part then...

Copy link
Contributor

Choose a reason for hiding this comment

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

@aparna-ravindra @anuragc617 any thoughts here?

Copy link
Contributor

@tiwarishub tiwarishub Aug 18, 2022

Choose a reason for hiding this comment

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

CACHE_DOWNLOAD_TIMEOUT_MINS This is not complete cache download timeout, It is timeout for 2GB Should we rename to reflect this ? like CACHE_DOWNLOAD_TIMEOUT_PER_GB and we can compute the timeout for 2gb internally. This way we might not need to document internal working as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does readme work for the same? @tiwarishub

@kotewar kotewar merged commit a57a4fe into main Aug 18, 2022
@kotewar kotewar deleted the kotewar/custom-cache-download-timeout branch August 18, 2022 09:30
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.

3 participants