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

feat: retry download when decompression fails #75

Merged
merged 3 commits into from
May 6, 2023

Conversation

EricRibeiro
Copy link
Contributor

Checklist

  • All new jobs, commands, executors, parameters have descriptions
  • Examples have been added for any significant new features
  • README has been updated, if necessary

Motivation, issues

This PR closes #70 by addressing an issue where the Google Cloud SDK installation fails with an error related to a corrupt tar archive. This problem prevents users from successfully installing and using the Google Cloud SDK in their projects.

Description

This PR modifies the installation script to introduce two new functions, download_and_extract() and download_with_retry(). These functions improve the process of downloading and extracting the Google Cloud SDK tar file by implementing retries when download failures occur.

The download_and_extract() function is responsible for downloading the tar file and extracting it to the specified installation directory. The download_with_retry() function wraps around the download_and_extract() function and retries the download process up to three times if a failure occurs.

These new functions are utilized in the installation script to improve the reliability of the installation process, reducing the chances of encountering the "unexpected end of file" error during Google Cloud SDK installation.

The updated script also includes additional error handling and messages to provide clearer feedback to the user in case of any issues during the installation process.

@EricRibeiro EricRibeiro merged commit 047b84b into master May 6, 2023
2 checks passed
@EricRibeiro EricRibeiro deleted the feat/retry_download branch May 6, 2023 01:02
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.

gzip: stdin: unexpected end of file
2 participants