Implement reclient metrics uploading

This cl will be submitted after the cl to add the metadata to the
reproxy.cfg file has been submitted to chromium/src: crrev/c/4513215

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

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.