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>
7 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 1 year ago
gstools
split_cl_test.inputs `git cl split`: Save and load splittings from files 9 months ago
OWNERS Remove brucedawson@ from some depot_tools OWNERS files 1 year ago
auth_test.py
autoninja_test.py autoninja: use build/toolchain/use_reclient_value.py 12 months ago
bazel_test.py
bot_update_coverage_test.py
build_telemetry_test.py build_telemetry: Set timeout to 'cipd auth-info' command. 1 year ago
cipd_bootstrap_test.py
detect_host_arch_test.py
download_from_google_storage_unittest.py
fetch_test.py
gclient_cipd_smoketest.py
gclient_eval_unittest.py run tests using python 3.8 1 year ago
gclient_gcs_smoketest.py Make the downloaded tarfile a dotfile 2 years ago
gclient_git_mutates_smoketest.py
gclient_git_smoketest.py Update CMDgitmodules to set `gclient-recursedeps` in .gitmodules file. 1 year ago
gclient_no_sync_smoketest.py
gclient_paths_test.py
gclient_scm_test.py Make sure _UpdateMirrorIfNotContains fetches the specified revision 7 months ago
gclient_smoketest.py
gclient_smoketest_base.py
gclient_test.py
gclient_transitions_smoketest.py
gclient_utils_test.py Explicitly propagate terminal size to gclient hooks. 10 months ago
gerrit_client_test.py gerrit: addmessage: support attention set control 10 months ago
gerrit_util_test.py [gerrit_util] Add CheckShouldUseSSO function 8 months ago
git_auth_test.py [git_auth] Move gitcookies to free backup name 7 months ago
git_cache_test.py
git_cl_creds_check_report.txt
git_cl_test.py [git_cl_test] Fix test mocking for git_auth.AutoConfigure 7 months ago
git_common_test.py Modify git squash-branch to perform reparenting 9 months ago
git_dates_test.py
git_find_releases_test.py Skip tests not supported in non-git env if in non-git env 1 year ago
git_footers_test.py [git_footers] add support for multiline footers 11 months ago
git_hyper_blame_test.py
git_map_test.py Fix git_map_test.py 7 months ago
git_number_test.py Revert "[git-number] Remove unused git-number script." 1 year ago
git_rebase_update_test.py Colorize branch names for rebase-update 9 months ago
git_squash_branch_test.py Modify git squash-branch to perform reparenting 9 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 // 12 months ago
gsutil_test.py Improve ensure_gsutil reliability 7 months ago
hooks_test.py
lockfile_test.py [gsutil] Fix race when downloading gsutil 2 years ago
metrics_test.py [metrics] Add new auth metric 1 year ago
metrics_xml_format_test.py Reland "Support formatting metrics xml(s) in the subfolders." 11 months ago
my_activity_test.py
ninjalog_uploader_test.py ninjalog_uploader: Add is_cloudtop, gce_machine_type, is_cog to the Ninjalog metadata 1 year ago
owners_client_test.py Select a minimal number of owners for a set of files 8 months ago
owners_finder_test.py
presubmit_canned_checks_test.py CheckNewDEPSHooksHasRequiredReviewers checks approval from required 8 months ago
presubmit_diff_test.py presubmit_diff: add support for -U 10 months ago
presubmit_support_test.py presubmit: add location data to presubmit result 7 months ago
presubmit_unittest.py presubmit: add location data to presubmit result 7 months ago
rdb_wrapper_test.py
recipes_test.py
reclient_helper_test.py autoninja: Use AUTONINJA_BUILD_ID for RBE_invocation_id as is. 1 year ago
roll_dep_test.py roll_dep: Update README.chromium when rolling submodules 7 months ago
roll_downstream_gcs_deps_test.py Update roll_downstream_gcs_deps to take a list of source and destination packages. 1 year ago
scm_mock.py [scm_mock] Expose mocking of system config layer. 1 year ago
scm_unittest.py [scm] Handle empty .gitmodules file 1 year ago
split_cl_test.py split: update SelectReviewersForFiles to work with repository root 7 months ago
subcommand_test.py
subprocess2_test.py
upload_to_google_storage_first_class_unittest.py
upload_to_google_storage_unittest.py
utils_test.py Use $HOME/.config/depot_tools on linux for .cfg files 1 year ago
watchlists_unittest.py