Retry CIPD client download on Linux / macOS

Transient network conditions can cause the CIPD client download to fail,
so add a retry to the download.

When using `wget` we additionally retry usually fatal errors like
"connection refused" via `--retry-connrefused`. `curl` also has that
parameter, but it was added more recently in version 7.52.0, which isn't
available on supported platforms like Ubuntu 16.04. Once we raise the
minimum supported version of curl, we should add that parameter as well.

In either case, we retry 3 times and wait 5 seconds between each try,
which matches the retries recently added for Windows.

Bug: 1145741
Change-Id: Ib73bb3413ba4d5251c2b027a87dabd1378ab6c44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2532896
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Matthew Kotsenas <mattkot@microsoft.com>
1 file changed
tree: e3dc5930df9701cd5181342ce69f76349a1c34db
  1. bootstrap/
  2. fetch_configs/
  3. git-templates/
  4. infra/
  5. man/
  6. python-bin/
  7. recipes/
  8. testing_support/
  9. tests/
  10. third_party/
  11. win_toolchain/
  12. zsh-goodies/
  13. .cipd_impl.ps1
  14. .gitattributes
  15. .gitignore
  16. .style.yapf
  17. .vpython
  18. .vpython3
  19. auth.py
  20. autoninja
  21. autoninja.bat
  22. autoninja.py
  23. bb
  24. bb.bat
  25. bootstrap_python3
  26. breakpad.py
  27. cipd
  28. cipd.bat
  29. cipd_bin_setup.bat
  30. cipd_bin_setup.sh
  31. cipd_client_version
  32. cipd_client_version.digests
  33. cipd_manifest.txt
  34. cipd_manifest.versions
  35. cit
  36. cit.bat
  37. cit.py
  38. clang-format
  39. clang-format.bat
  40. clang_format.py
  41. clang_format_merge_driver
  42. clang_format_merge_driver.bat
  43. clang_format_merge_driver.py
  44. codereview.settings
  45. compile_single_file
  46. compile_single_file.bat
  47. compile_single_file.py
  48. cpplint.bat
  49. cpplint.py
  50. cpplint_chromium.py
  51. cros
  52. CROS_OWNERS
  53. crosjobs
  54. detect_host_arch.py
  55. dirmd
  56. dirmd.bat
  57. download_from_google_storage
  58. download_from_google_storage.bat
  59. download_from_google_storage.py
  60. ensure_bootstrap
  61. fetch
  62. fetch.bat
  63. fetch.py
  64. fix_encoding.py
  65. gclient
  66. gclient-new-workdir.py
  67. gclient.bat
  68. gclient.py
  69. gclient_completion.sh
  70. gclient_eval.py
  71. gclient_paths.py
  72. gclient_scm.py
  73. gclient_utils.py
  74. gerrit_client.py
  75. gerrit_util.py
  76. git-cache
  77. git-cl
  78. git-crrev-parse
  79. git-drover
  80. git-find-releases
  81. git-footers
  82. git-freeze
  83. git-gs
  84. git-hyper-blame
  85. git-map
  86. git-map-branches
  87. git-mark-merge-base
  88. git-migrate-default-branch
  89. git-nav-downstream
  90. git-nav-upstream
  91. git-new-branch
  92. git-number
  93. git-rebase-update
  94. git-rename-branch
  95. git-reparent-branch
  96. git-retry
  97. git-runhooks
  98. git-squash-branch
  99. git-thaw
  100. git-upstream-diff
  101. git_cache.py
  102. git_cl.py
  103. git_cl_completion.sh
  104. git_common.py
  105. git_dates.py
  106. git_drover.py
  107. git_find_releases.py
  108. git_footers.py
  109. git_freezer.py
  110. git_hyper_blame.py
  111. git_map.py
  112. git_map_branches.py
  113. git_mark_merge_base.py
  114. git_migrate_default_branch.py
  115. git_nav_downstream.py
  116. git_new_branch.py
  117. git_number.py
  118. git_rebase_update.py
  119. git_rename_branch.py
  120. git_reparent_branch.py
  121. git_retry.py
  122. git_squash_branch.py
  123. git_upstream_diff.py
  124. gn
  125. gn.bat
  126. gn.py
  127. goma_auth
  128. goma_auth.bat
  129. goma_ctl
  130. goma_ctl.bat
  131. GOMA_OWNERS
  132. gsutil.py
  133. gsutil.py.bat
  134. gsutil.vpython
  135. led
  136. led.bat
  137. LICENSE
  138. lockfile.py
  139. luci-auth
  140. luci-auth.bat
  141. LUCI_OWNERS
  142. lucicfg
  143. lucicfg.bat
  144. mac_toolchain
  145. metrics.py
  146. metrics.README.md
  147. metrics_utils.py
  148. my_activity.py
  149. ninja
  150. ninja-linux32
  151. ninja-linux64
  152. ninja-mac
  153. ninja.exe
  154. ninjalog.README.md
  155. ninjalog_uploader.py
  156. ninjalog_uploader_wrapper.py
  157. OWNERS
  158. owners.py
  159. owners_client.py
  160. owners_finder.py
  161. post_build_ninja_summary.py
  162. PRESUBMIT.py
  163. presubmit_canned_checks.py
  164. presubmit_support.py
  165. profile.xml
  166. prpc
  167. prpc.bat
  168. pylint
  169. pylint-1.5
  170. pylint-1.6
  171. pylint-1.7
  172. pylint-1.8
  173. pylint-1.9
  174. pylint-2.6
  175. pylint.bat
  176. pylint_main.py
  177. pylintrc
  178. python_runner.sh
  179. rdb
  180. rdb.bat
  181. rdb_wrapper.py
  182. README.gclient.md
  183. README.git-cl.md
  184. README.md
  185. repo
  186. roll-dep
  187. roll-dep.bat
  188. roll_dep.py
  189. scm.py
  190. setup_color.py
  191. split_cl.py
  192. subcommand.py
  193. subprocess2.py
  194. update_depot_tools
  195. update_depot_tools.bat
  196. update_depot_tools_toggle.py
  197. upload_metrics.py
  198. upload_to_google_storage.py
  199. vpython
  200. vpython.bat
  201. vpython3
  202. vpython3.bat
  203. WATCHLISTS
  204. watchlists.py
  205. weekly
  206. win32imports.py
  207. wtf
  208. yapf
  209. yapf.bat
README.md

depot_tools

Tools for working with Chromium development. It requires python 2.7 or 3.8 for python 3 support.

Tools

The most important tools are:

  • fetch: A gclient wrapper to checkout a project. Use fetch --help for more details.
  • gclient: A meta-checkout tool. Think repo or git submodules, except that it support OS-specific rules, e.g. do not checkout Windows only dependencies when checking out for Android. Use gclient help for more details and README.gclient.md.
  • git cl: A code review tool to interact with Rietveld or Gerrit. Use git cl help for more details and README.git-cl.md.
  • roll-dep: A gclient dependency management tool to submit a dep roll, updating a dependency to a newer revision.

There are a lot of git utilities included.

Updating

depot_tools updates itself automatically when running gclient tool. To disable auto update, set the environment variable DEPOT_TOOLS_UPDATE=0.

To update package manually, run update_depot_tools.bat on Windows, or ./update_depot_tools on Linux or Mac.

On Windows only, running gclient will install git and python.

Contributing

To contribute change for review:

git new-branch <somename>
# Hack
git add .
git commit -a -m "Fixes goat teleporting"
# find reviewers
git cl owners
git log -- <yourfiles>

# Request a review.
git cl upload -r reviewer1@chromium.org,reviewer2@chromium.org --send-mail

# Edit change description if needed.
git cl desc

# If change is approved, flag it to be committed.
git cl set-commit

# If change needs more work.
git rebase-update
...
git cl upload -t "Fixes goat teleporter destination to be Australia"

See also open bugs, open reviews, forum or report problems.

cpplint.py

Until 2018, our cpplint.py was a copy of the upstream version at https://github.com/google/styleguide/tree/gh-pages/cpplint. Unfortunately, that repository is not maintained any more. If you want to update cpplint.py in depot_tools, just upload a patch to do so. We will figure out a long-term strategy via issue https://crbug.com/916550.

Note that the cpplint.py here is also used by the Tricium analyzer, so if the cpplint.py here changes, we should also update the copy used there.