Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Set download retries and log download exceptions for installer failures #7600

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

Merged
merged 3 commits into from
Feb 3, 2023

Conversation

dominikschubert
Copy link
Member

Motivation

PR was motivated by failing downloads of ffmpeg where the Installer tries to extract the empty installer file instead of just re-trying to download the archive first. It also didn't log any meaningful exceptions in this case since it wasn't a requests.exceptions.ReadTimeout

Changes

  • Downloads are retried up to 3 times
  • Exception + retry attempt number are logged in case of a failure
  • Extraction is not attempted on an empty "archive" file.

@dominikschubert dominikschubert self-assigned this Feb 2, 2023
@dominikschubert dominikschubert temporarily deployed to localstack-ext-tests February 2, 2023 10:02 — with GitHub Actions Inactive
@dominikschubert dominikschubert temporarily deployed to localstack-ext-tests February 2, 2023 10:04 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Feb 2, 2023

LocalStack integration with Pro

       3 files  ±0         3 suites  ±0   1h 31m 38s ⏱️ + 5m 40s
1 676 tests +1  1 344 ✔️ +2  332 💤  - 1  0 ±0 
2 388 runs  +1  1 718 ✔️ +2  670 💤  - 1  0 ±0 

Results for commit 1f10974. ± Comparison against base commit 3356e42.

♻️ This comment has been updated with latest results.

@dominikschubert dominikschubert temporarily deployed to localstack-ext-tests February 2, 2023 12:56 — with GitHub Actions Inactive
@dominikschubert dominikschubert marked this pull request as ready for review February 2, 2023 15:30
Copy link
Member

@alexrashed alexrashed left a comment

Choose a reason for hiding this comment

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

Thanks a lot for tackling one of the causes of the pipeline instability! 🚀
I only have a small nitpick, nothing blocking a merge.

Copy link
Member

@baermat baermat left a comment

Choose a reason for hiding this comment

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

Mostly LGTM 👍 I agree with what @alexrashed said, + one small thing that I wanted to clarify (but is not blocking in any way)

Comment on lines +208 to +209
if os.path.getsize(tmp_archive) <= 0:
raise Exception("Failed to download archive from %s: . Retries exhausted", archive_url)
Copy link
Member

Choose a reason for hiding this comment

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

question: can this actually ever be a negative value? The docs state that in case of inaccessibility, OSError is returned.

Copy link
Member Author

Choose a reason for hiding this comment

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

TBH, just copied this from L185.

Like you said, probably not, but I guess we still wouldn't want it if for some reason this would happen on some esoteric system 🤷‍♂️

@dominikschubert dominikschubert temporarily deployed to localstack-ext-tests February 3, 2023 10:44 — with GitHub Actions Inactive
@dominikschubert dominikschubert merged commit 0e9fa81 into master Feb 3, 2023
@dominikschubert dominikschubert deleted the installer-download-logging-and-retries branch February 3, 2023 12:48
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