You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
depot_tools/tests
Aleksei Khoroshilov 998f7bfaf2 Improve ensure_gsutil reliability
The current gsutil download code silently fails when the connection
drops mid-download, as read() returns an empty buffer instead of raising
an exception. This may lead to errors such as "zipfile.BadZipFile: File
is not a zip file" on Chromium sync with freshly-bootstrapped
depot_tools when downloading gcs deps.

This change solves this by hardening the process:
- Use retry mechanism with exponential backoff for gsutil download
- Switch to urlretrieve, which looks at Content-Length
- Compare MD5 of the downloaded file with the value from API
- Move exponential_backoff_retry from git_cache.py to gclient_utils.py

Change-Id: I25242948399e01373eb2afd9352e5c78a889051d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6485485
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Aleksei Khoroshilov <akhoroshilov@brave.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
3 months ago
..
gerrit_util_test.inputs [gerrit_util] Add some additional tests and fixes for SSOAuthenticator. 1 year ago
git_common_test.inputs Prefer direct git installation for Windows 8 months ago
gstools Upload script for first class gcs deps 1 year ago
split_cl_test.inputs `git cl split`: Save and load splittings from files 5 months ago
OWNERS Remove brucedawson@ from some depot_tools OWNERS files 10 months ago
auth_test.py [auth] Be able to generate id_token 2 years ago
autoninja_test.py autoninja: use build/toolchain/use_reclient_value.py 8 months ago
bazel_test.py tests: switch to 4 space indent 2 years ago
bot_update_coverage_test.py Fix multiline comment formatting 2 years ago
build_telemetry_test.py build_telemetry: Set timeout to 'cipd auth-info' command. 10 months ago
cipd_bootstrap_test.py Update cipd_bootstrap_test to use a newer cipd client binary. 2 years ago
detect_host_arch_test.py [detect_host_arch] Cache HostArch() function 2 years ago
download_from_google_storage_unittest.py Upload script for first class gcs deps 1 year ago
fetch_test.py fetch: stop setting submodules config as we are not using it at all 2 years ago
gclient_cipd_smoketest.py tests: switch to 4 space indent 2 years ago
gclient_eval_unittest.py run tests using python 3.8 1 year ago
gclient_gcs_smoketest.py Make the downloaded tarfile a dotfile 1 year ago
gclient_git_mutates_smoketest.py tests: switch to 4 space indent 2 years ago
gclient_git_smoketest.py Update CMDgitmodules to set `gclient-recursedeps` in .gitmodules file. 10 months ago
gclient_no_sync_smoketest.py tests: switch to 4 space indent 2 years ago
gclient_paths_test.py Cache values in gclient_paths.py 2 years ago
gclient_scm_test.py Make sure _UpdateMirrorIfNotContains fetches the specified revision 3 months ago
gclient_smoketest.py tests: switch to 4 space indent 2 years ago
gclient_smoketest_base.py Fix multiline comment formatting 2 years ago
gclient_test.py Fix multiline comment formatting 2 years ago
gclient_transitions_smoketest.py Fix multiline comment formatting 2 years ago
gclient_utils_test.py Explicitly propagate terminal size to gclient hooks. 6 months ago
gerrit_client_test.py gerrit: addmessage: support attention set control 6 months ago
gerrit_util_test.py [gerrit_util] Add CheckShouldUseSSO function 4 months ago
git_auth_test.py [git_auth] Move gitcookies to free backup name 3 months ago
git_cache_test.py [git_cache] support ssh url 1 year ago
git_cl_creds_check_report.txt Fix gerrit new-password URL 2 years ago
git_cl_test.py [git_cl_test] Fix test mocking for git_auth.AutoConfigure 3 months ago
git_common_test.py Modify git squash-branch to perform reparenting 5 months ago
git_dates_test.py tests: switch to 4 space indent 2 years ago
git_find_releases_test.py Skip tests not supported in non-git env if in non-git env 12 months ago
git_footers_test.py [git_footers] add support for multiline footers 8 months ago
git_hyper_blame_test.py Fix multiline comment formatting 2 years ago
git_map_test.py Fix git_map_test.py 4 months ago
git_number_test.py Revert "[git-number] Remove unused git-number script." 11 months ago
git_rebase_update_test.py Colorize branch names for rebase-update 5 months ago
git_squash_branch_test.py Modify git squash-branch to perform reparenting 5 months ago
git_squash_branch_tree_test.py Add git squash-branch-tree 1 year ago
gn_helper_test.py gn_helper: find correct directory for // 8 months ago
gsutil_test.py Improve ensure_gsutil reliability 3 months ago
hooks_test.py Require prompt from users to confirm submodules commit. 2 years ago
lockfile_test.py [gsutil] Fix race when downloading gsutil 1 year ago
metrics_test.py [metrics] Add new auth metric 11 months ago
metrics_xml_format_test.py Reland "Support formatting metrics xml(s) in the subfolders." 7 months ago
my_activity_test.py tests: switch to 4 space indent 2 years ago
ninjalog_uploader_test.py ninjalog_uploader: Add is_cloudtop, gce_machine_type, is_cog to the Ninjalog metadata 10 months ago
owners_client_test.py Select a minimal number of owners for a set of files 4 months ago
owners_finder_test.py tests: switch to 4 space indent 2 years ago
presubmit_canned_checks_test.py CheckNewDEPSHooksHasRequiredReviewers checks approval from required 4 months ago
presubmit_diff_test.py presubmit_diff: add support for -U 6 months ago
presubmit_support_test.py presubmit: add location data to presubmit result 3 months ago
presubmit_unittest.py presubmit: add location data to presubmit result 3 months ago
rdb_wrapper_test.py Remove __future__ imports 2 years ago
recipes_test.py Support recipes_test.py in non-git workspace 1 year ago
reclient_helper_test.py autoninja: Use AUTONINJA_BUILD_ID for RBE_invocation_id as is. 12 months ago
roll_dep_test.py roll_dep: Update README.chromium when rolling submodules 4 months ago
roll_downstream_gcs_deps_test.py Update roll_downstream_gcs_deps to take a list of source and destination packages. 10 months ago
scm_mock.py [scm_mock] Expose mocking of system config layer. 11 months ago
scm_unittest.py [scm] Handle empty .gitmodules file 9 months ago
split_cl_test.py split: update SelectReviewersForFiles to work with repository root 3 months ago
subcommand_test.py tests: switch to 4 space indent 2 years ago
subprocess2_test.py Fix multiline comment formatting 2 years ago
upload_to_google_storage_first_class_unittest.py Add generation version number to GCS first-class entries. 1 year ago
upload_to_google_storage_unittest.py Remove last py2 workarounds 2 years ago
utils_test.py Use $HOME/.config/depot_tools on linux for .cfg files 1 year ago
watchlists_unittest.py tests: switch to 4 space indent 2 years ago