presubmit: Report timing to rdb for individual checks
Rather than using CheckChangeOnCommit() or CheckChangeOnUpload() as the
sole entry points for PRESUBMIT.py files, this cl enables presubmit_support.py
to use any CheckXYZ[OnCommit/Upload] function to serve as an entry point.
This way, we can perform timing and RDB reporting for each of the
presubmit check functions and have check-specific data.
Bug: 1106943
Change-Id: Ifdabd68c0904a6d70a828f12de157369c6c1571d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2332321
Commit-Queue: Saagar Sanghavi <saagarsanghavi@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Update rdb version to git_revision:2e0910d2a82300df629ff979a8a958392b69714b to include change
2020-08-05 chanli@chromium.org [ResultDB] Update url schema for test result UI
Change-Id: Ib6d04f3d1a216e51b2b6a12bb5feed11f2606baa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2340081
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Right now git_cl.py inserts an extra colon if the bug prefix ends with
a colon. Fix this by detecting whether the bug prefix ends with a colon
or not, and only inserting the colon when necessary.
Bug: 1111955
Change-Id: I3db199435087abb17b9600fc208b11d2d8e6a615
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2333426
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Git commit message presubmit test might merge multiple commit messages
together if there is no newline in between.
Bug: angleproject:4923
Change-Id: I668b7d1f3c7e17d7499bf1fd2b9390d77ce70d5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2339754
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
A TODO in ninjalog_uploader.py referred to the closure_compile gn arg
which was recently renamed (as of crrev.com/c/2248564) to
enable_js_type_check. This updates it (and adds a missing space and a
bug number). This is purely a comment fix.
Change-Id: I117fa7910663491fd7c6e017fe98e2a977a75f13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2336176
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.
recipe_engine:
5d50d5f744
5d50d5f (akashmukherjee@google.com)
[3pp] Added compute_hash function to file module.
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
TBR=iannucci@chromium.org
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ibfa256fd08fb9c78e0a3417b363d7155a9a747c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2334982
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
We moved chromite to require python 3.6 all the time, so update
the wrappers to match.
Bug: 997354
Test: `cros_sdk` still works
Change-Id: I78f5dc101f98a074fdc92a1f270395e2d04a2ea1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2324825
Reviewed-by: Michael Mortensen <mmortensen@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Right now the default test data for bot_update doesn't transform
revisions specifying refs for the revision except for refs starting with
refs/ on the first solution. This means that the output will just have
the ref name as the revision value, which isn't compatible with code
that requires an actual revision value.
Bug: 1047893
Change-Id: I016ad5e8db5a293dd5e6dacb5b8beba51e000949
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: chrome_release
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2325761
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
Auto-Submit: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
dirmd is not available on bots, so we'll need to receive the path
where it's available as an argument.
Bug: 1102997
Change-Id: I8966225d8ded3eb06c504797280baaa6c6c64a9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2321510
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This modifies CheckAuthorizedAuthor parameters to be inclusive while
being backwards compatbile. Also, it fixes issue with empty lists.
R=ehmaldonado@chromium.org
Bug: 1098560
Change-Id: I992b25d6408d6cb906fa1696209de253e50c5156
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2316706
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
refs/branch-heads/ might be out of date, as bot_update is now fetching
refs/branch-heads/* as refs/remotes/branch-heads/*.
Bug: 1108638
Change-Id: I5a221e8e01017552f42c0c52d7ef7327acc5f63e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2316327
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Adding an optional --skip-title argument to git cl upload to
automatically use the latest commit message as the patch title, without
requiring the user to hit "enter" to accept.
Change-Id: I0e37b68c809d907a4f980f2be59865e14b1a2db2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2297803
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Mario Bianucci <mabian@microsoft.com>
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.
recipe_engine:
c89555ad4a
c89555a (vadimsh@chromium.org)
[context] Add api.context.realm property.
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
TBR=iannucci@chromium.org
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I5465b16fbe3aaa5fe2b89645afccf104e919f07e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2314837
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Remove cwd augmentation for good measure. This should be done by the
caller.
Bug: 923016
Change-Id: I7f6618d7a9e56f70168fc71046412c6d462f40fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2311320
Auto-Submit: Gregory Guterman <guterman@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Map refs to remote refs when fetching refs from origin
(e.g. refs/heads/master -> refs/remotes/origin/master)
so that a detached HEAD is not necessary.
Bug: 1104182
Change-Id: Icb751505de1bf443e5d45c4b37425223dbf6e088
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2310849
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This adds a parameter to bot_update.ensure_checkout that will cause
blamelist pins to be set for all of the repos whose revision is not
determined by DEPS files: the repo for the gitiles input, the repo for
each solution in the gclient config and any repos with the revision set
by the revisions field of the gclient config.
Bug: 1047893
Change-Id: Ie3eee41dbf15be014185b6f255ee3d4cfd40b4e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2293514
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Currently the output_json method generates revisions for projects that
are in the revision_mapping and only those projects appear in the
manifest and source_manifest, using the generated revision. This method
is used to construct the default json output for bot_update in tests.
This has 2 problems:
1. If a project has a fixed revision, its manifest entries and the
property used the generated revision, meaning the gitiles input revision
will not be used in the json output.
2. If a project has a fixed revision and isn't present in
revision_mapping then manifest entries aren't generated for it.
This changes the method to use the revisions in the fixed_revisions dict
and to create manifest entries for the projects that appear in the
fixed_revisions dict which should make fewer situations where
bot_update's output_json needs to be explicitly set.
Change-Id: I99de52edc9248c28e9d3aa3a04cc77bf9fccbe37
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: chrome_release
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2304644
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
This reverts commit b99e61c58a.
Reason for revert:
Doesn't work for refs/branch-heads/*
Original change's description:
> bot_update: Refactor branch to detach and checkout.
>
> Refactor _git_checkout to use information from
> get_target_branch_and_revision to know what branch to checkout after
> cloning.
>
> Bug: 1104182
> Change-Id: Ib3ba57ca0b6803f172b85121c2a4b123f17bfb8c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2303291
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
TBR=ehmaldonado@chromium.org,infra-scoped@luci-project-accounts.iam.gserviceaccount.com,sokcevic@google.com
Change-Id: If51423df99fd9c164f8e42e0220ee2d9bc2a39f6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1104182
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2310293
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Added an rdb wrapper and use it to time CheckChangeOn{Commit, Upload} from every PRESUBMIT.py file, then reports the results to ResultSink.
Bug: http://crbug.com/1107588
Change-Id: I9bc8a18ba615a76f3e0611eae5b2c4adc5924276
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2242097
Commit-Queue: Saagar Sanghavi <saagarsanghavi@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Garrett Beaty <gbeaty@chromium.org>
Refactor _git_checkout to use information from
get_target_branch_and_revision to know what branch to checkout after
cloning.
Bug: 1104182
Change-Id: Ib3ba57ca0b6803f172b85121c2a4b123f17bfb8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2303291
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
And merge it in use_relative_paths. In all Chromium repos,
use_relative_hooks is True iff:
- use_relative_paths is True, and
- there is at least one hook
It makes sense that you'd want to use relative hooks if you use relative
paths so this CL merges both flags into use_relative_paths.
Bug: chromium:1107325
Change-Id: I0fe40eba1e1c61be26c812c7ca4329efb72c7f90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2306795
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.
recipe_engine:
79f951ca7b
79f951c (iannucci@chromium.org)
[raw_io] Reland: Make output_dir lazy.
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
TBR=iannucci@chromium.org
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I928c1bb09fc0b453e2bc8c3151a7907802a725c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2308250
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
* First, we were treating the return value of HTTPResponse.read() as a
string when it is really a byte string.
* Second, the urlparse library was renamed to urllib.parse in Python 3,
so I made the appropriate substitution.
Change-Id: I0b23716e990eca8ddf77742f378ab54eda3d3717
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2307509
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Dan McArdle <dmcardle@chromium.org>
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.
recipe_engine:
0dbd020e42
0dbd020 (ddoman@chromium.org)
[swarming] integrate TaskRequest with resultdb and realm
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
TBR=iannucci@chromium.org
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I61c828df74eea4f15a1eb2c1d35d961179088e99
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2305450
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.
recipe_engine:
742a272b32
742a272 (bpastene@chromium.org)
Revert "[raw_io] Make output_dir lazy."
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
TBR=iannucci@chromium.org
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I998005b279006438cf456ae3a7276cadde24855a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2303884
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.
recipe_engine:
c1b7a3041f
c1b7a30 (iannucci@chromium.org)
[raw_io] Make output_dir lazy.
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
TBR=iannucci@chromium.org
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Id287a3112147a80e5478bb41cb5e71baa08503dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2303880
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
This reverts commit 5fcb48536c.
Reason for revert: Broke Git on my gWindows machine, it fails for many Git operations with the following error message:
git pull
2 [main] sh (54140) shared_info::initialize: size of shared memory region changed from 45944 to 38776
fatal: Could not read from remote repository
I've confirmed that reverting this CL fixes the problem.
Original change's description:
> Roll git to 2.27.0 on Windows
>
> Bug: 1070694
> Change-Id: I37af08864661ca92116776569b9285ceb6ff465c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2300204
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
TBR=ehmaldonado@chromium.org,apolito@google.com,infra-scoped@luci-project-accounts.iam.gserviceaccount.com,sokcevic@google.com
Change-Id: I4d27eaa1b17cb056635dceed5ad1562debfc2e06
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1070694
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2302489
Reviewed-by: Sébastien Marchand <sebmarchand@chromium.org>
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.
recipe_engine:
faf8628f68
faf8628 (tikuta@chromium.org)
update isolated client revision
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
TBR=iannucci@chromium.org
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ib80020f86a84b8f1e859403fe496cb3204ced37c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2301460
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Checkout 'HEAD' instead. This is needed to have a detached HEAD, so we
can fetch refs/heads/main:refs/heads/main, where main is the default
branch.
Bug: 1104182
Change-Id: I7b7457b21b7d98d29583555b62e27e96e900adb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2300533
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.
recipe_engine:
034831f384
034831f (iannucci@chromium.org)
[luciexe] zlib compress build.proto output.
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
TBR=iannucci@chromium.org
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ib8db59cfe720ff1c7e25c85d575af85d169b4b4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2300762
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Use the same set of default filters as presubmit checks. Presubmit
checks use filters to give better lint results as expected by Google C++
style. Give git-cl's lint subcommand the same benefit.
Bug: 1106028
Change-Id: I51ff0737b310990ab424376d2721e8a6a50dfc6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2298122
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Use continues to reduce the amount of nesting in a loop. At the same
time, give the variable involved better names.
Bug: 1097674
Change-Id: I105ed4a99da783fb235e304bbad4edd1f8a38889
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2298659
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>