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

Set a download speed timeout in the curl session #565

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

bbhtt
Copy link
Contributor

@bbhtt bbhtt commented Oct 16, 2023

This will abort the download if it’s slower than 10KB/sec for 60 seconds with CURLE_OPERATION_TIMEDOUT

The limits are copied from flatpak/flatpak@d6b10c2

This seems it could be useful in CI which may want to proactively kill a pipeline if a download timeouts

I have no idea how to test this, but hopefully it works.

@nanonyme wanted this for Freedesktop SDK CI

@nanonyme
Copy link
Contributor

Yeah, so context for freedesktop-sdk is we have CI timeout around 24 hours since runtimes may take very long time to build, especially with qemu-binfmt. But we have a test at the end of pipeline that runs flatpak-builder which we want to fail reasonably fast. Occasionally mirror sources seem to hang resulting in entire pipeline hanging.

This will abort the download if it’s slower than 10KB/sec for 60 seconds
with CURLE_OPERATION_TIMEDOUT

The limits are copied from flatpak/flatpak@d6b10c2

This seems it could be useful in CI which may want to proactively kill a
pipeline if a download timeouts
@bbhtt bbhtt force-pushed the curl-download-timeout branch from bac7adc to 1660e9f Compare October 16, 2023 19:45
@TingPing TingPing merged commit 7715b40 into flatpak:main Oct 16, 2023
5 checks passed
@bbhtt bbhtt deleted the curl-download-timeout branch October 17, 2023 01:15
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