File marker '.dirty_bot_checkout' indicates that bot_update checkout has
started. Such marker is removed on successful checkout.
If such marker is present before creation, it means previous run wasn't
successful and may have left workspace in a bad state. In that case,
delete working directory and continue with a clean checkout.
R=apolito@google.com, ehmaldonado@chromium.org
Bug: 1074260
Change-Id: Ic089eedc26f7c269d5342fae366899571d8f8d41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2186273
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Introduce a process observer that terminates child process if there is
not stdout activity. It can be overridden by an environment variable.
R=apolito@google.com, ehmaldonado@chromium.org
Bug: 1074355
Change-Id: I11de9d29e716587614cf336725c8d4a368a9d61d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2167220
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
This was made by running `codespell` and `scspell`
and then checking the results.
Change-Id: I169fd5b40294f83015075b4a899fbca263821f25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2144602
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Auto-Submit: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
This is a reland of 72a245e4c6
The "git checkout master --detach" operation has been modified to run in the solution
directory.
Original change's description:
> Fetch the input commit ref when both ref and id are specified.
>
> This causes --refs refs/head/master to be added to bot_update calls when
> the input build message contains a commit id and the refs/head/master
> ref. This is an effective no-op.
>
> When bot_update clones a git repository, it results in HEAD referring to
> master in contrast to the non-clone case which results in a detached
> HEAD. This prevents fetching refs/heads/master, so detach the HEAD after
> cloning.
>
> Bug: 922150
> Change-Id: I357a78305020218e9f5d350832a706b8f2b27967
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Recipe-Nontrivial-Roll: infra
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1900735
> Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Bug: 922150
Change-Id: I7dc6ebed2dcbd880ff4d515f7e9fc6428ff24099
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: infra
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1910260
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
This reverts commit 72a245e4c6.
Reason for revert: crbug.com/1022617
Original change's description:
> Fetch the input commit ref when both ref and id are specified.
>
> This causes --refs refs/head/master to be added to bot_update calls when
> the input build message contains a commit id and the refs/head/master
> ref. This is an effective no-op.
>
> When bot_update clones a git repository, it results in HEAD referring to
> master in contrast to the non-clone case which results in a detached
> HEAD. This prevents fetching refs/heads/master, so detach the HEAD after
> cloning.
>
> Bug: 922150
> Change-Id: I357a78305020218e9f5d350832a706b8f2b27967
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Recipe-Nontrivial-Roll: infra
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1900735
> Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
TBR=ehmaldonado@chromium.org,gbeaty@chromium.org
Change-Id: Ibd6c6ed272b0c98f82be50cefa521aaee0444f11
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 922150, 1022617
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1904099
Reviewed-by: Stephen Martinis <martiniss@chromium.org>
Commit-Queue: Stephen Martinis <martiniss@chromium.org>
This causes --refs refs/head/master to be added to bot_update calls when
the input build message contains a commit id and the refs/head/master
ref. This is an effective no-op.
When bot_update clones a git repository, it results in HEAD referring to
master in contrast to the non-clone case which results in a detached
HEAD. This prevents fetching refs/heads/master, so detach the HEAD after
cloning.
Bug: 922150
Change-Id: I357a78305020218e9f5d350832a706b8f2b27967
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: infra
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1900735
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
There are 3 layers modified, starting from the bottom up:
1. git_cache.py populate
Now takes a --no-fetch-tags option. If specified, the cache will not
fetch updated tags from the server by passing --no-tags to git fetch.
This prevents the server from sending all the tag refs. In chromium
this prevents significant time bottlenecks dealing with 10k+ tags.
2. bot_update.py
bot_update has to deal with multiple git repos, it has the root repo
that is checked out through git-cache, as well as repos synched via
DEPS and gclient.
The script now takes a --no_fetch_tags option. If specified,
the git-cache populate call will include --no-fetch-tags. Otherwise, it
won't. So this controls (for chromium) if fetches to the src.git server
are passed --no-tags.
3. bot_update/api.py
This is the entry point for recipes and also has to deal with multiple
git repos. The behaviour at this point is not changed from the default.
A |no_fetch_tags| parameter is added to ensure_checkout() that defaults
to False.
This CL is a refactor with no intended behavior change.
The next step will be to change the chromium build repo to pass True
for ensure_checkout(no_fetch_tags) on chromium trybots.
This represents solution #2 in
https://docs.google.com/document/d/1hDIunJjjfpmr50y3YnZ4o3aq1NZF4gJa1TS0p7AIL64/edit#
Bug: 1019824
Change-Id: I935430603299daa9e301a95a5184c0ce486fd912
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1894352
Reviewed-by: Aaron Gable <agable@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Auto-Submit: danakj <danakj@chromium.org>
This reverts commit 1e4dbf3f64.
Reason for revert: unlikely but possible cause of http://shortn/_sgL4PqICVB
Original change's description:
> Add more git tracing.
>
> This CL adds more perf tracing to `git fetch` from bot_update.py and
> git_cache.py
>
> Change-Id: I9b69c60b6c81fc0c5f23f82fcc889b4d45a27556
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: infra
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1888433
> Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
> Commit-Queue: Erik Chen <erikchen@chromium.org>
> Auto-Submit: Erik Chen <erikchen@chromium.org>
TBR=danakj@chromium.org,tandrii@google.com,erikchen@chromium.org
Change-Id: I03b33bf1532212f83a6b89b1de32fafb6b8aafc4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1891001
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
This CL adds more perf tracing to `git fetch` from bot_update.py and
git_cache.py
Change-Id: I9b69c60b6c81fc0c5f23f82fcc889b4d45a27556
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: infra
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1888433
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Auto-Submit: Erik Chen <erikchen@chromium.org>
Ran:
vi $(git grep --name-only iteritems | grep -v third_party)
vi $(git grep --name-only itervalues | grep -v third_party)
vi $(git grep --name-only 'print ' | grep -v third_party)
and edited the files quickly with adhoc macros. Then ran in recipes/:
./recipes.py test train
There was only a small subset of files that had been updated to use
six.iteritems() and six.itervalues(). Since the dataset size that is
being used in gclient is small (pretty much always below 200 items),
it's better to just switch to .items() right away and take the temporary
performance hit, so that we don't need to come back to rewrite the code.
Recipe-Nontrivial-Roll: build
Bug: 984182
Change-Id: I5faf11486b66b0d73c9098ab0f2ce1b15a45c53e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1854900
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Marc-Antoine Ruel <maruel@chromium.org>
This is a reland of 3f79763629.
Last time it broke a skia test. The test has since been fixed
in https://crbug.com/1005388
Original change's description:
> Set core.trustctime=false during git checkout operations.
>
> This should be faster and more general than running
> `git index --refresh` over all git repositories we can find.
>
> See "Proposal: Setting core.trustctime=false on Chromium's bots"
> on infra-dev (linked to from bug 330461 comment 45).
>
> Bug: 330461,642711,746763,740301.
> Change-Id: I7c35cffa107d46d9cf98f0e3e813ef2ab98df5fc
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1809419
> Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
> Commit-Queue: Nico Weber <thakis@chromium.org>
Recipe-Nontrivial-Roll: chromiumos
Bug: 330461, 642711, 746763, 740301.
Change-Id: I5d09a93689e53e4339bff7b1173df938aee73a4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1810400
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
This reverts commit 3f79763629.
Reason for revert:
Breaks Skia https://skia-review.googlesource.com/c/buildbot/+/242590
Original change's description:
> Set core.trustctime=false during git checkout operations.
>
> This should be faster and more general than running
> `git index --refresh` over all git repositories we can find.
>
> See "Proposal: Setting core.trustctime=false on Chromium's bots"
> on infra-dev (linked to from bug 330461 comment 45).
>
> Bug: 330461,642711,746763,740301.
> Change-Id: I7c35cffa107d46d9cf98f0e3e813ef2ab98df5fc
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1809419
> Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
> Commit-Queue: Nico Weber <thakis@chromium.org>
TBR=thakis@chromium.org,tandrii@google.com
Change-Id: I908ce92748f7b516efed5f2c02138ecfee306c88
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 330461, 642711, 746763, 740301.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1811537
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
This should be faster and more general than running
`git index --refresh` over all git repositories we can find.
See "Proposal: Setting core.trustctime=false on Chromium's bots"
on infra-dev (linked to from bug 330461 comment 45).
Bug: 330461,642711,746763,740301.
Change-Id: I7c35cffa107d46d9cf98f0e3e813ef2ab98df5fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1809419
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Nico Weber <thakis@chromium.org>
So that bot_update can apply patched on top of experimental branches,
which include the user's email (and so an extra @).
Change-Id: I33acb49e8b48c6ed6db7e752fca7eb0f1ede0690
Reviewed-on: https://chromium-review.googlesource.com/c/1450895
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Check that the cache contains the needed refs, and not only the revisions,
before attempting to checkout.
Bug: 910547
Change-Id: Ia269132421994803866065e81fc21ecd7ac206ed
Reviewed-on: https://chromium-review.googlesource.com/c/1362393
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
It has been True by default for a while, and there is no need to override it.
Bug: 891917
Change-Id: I2598a2230b0ea38a647a533757331c541b871971
Reviewed-on: https://chromium-review.googlesource.com/c/1260057
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Also add shortcuts, so we don't have to look through all the branches
if the patch is based on a common branch (i.e. master, infra/config, lkgr)
Bug: 870279
Change-Id: I625a8481dccac9a475b096b926e6fab7efe676b0
Reviewed-on: https://chromium-review.googlesource.com/1161094
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
When syncing remote branches, checkout origin/<branch> instead of
<branch>, since there might be a local branch with that name.
Bug: 859703
Change-Id: I9a49b940f53f75a97e5458fdcf578c3b52b26de2
Reviewed-on: https://chromium-review.googlesource.com/1128271
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
gclient should be the one syncing the solutions to the appropriate
revisions.
Bug: 850812, 853032
Change-Id: Ieefc5661627d4864deb0d4e7053168a99da29d29
Reviewed-on: https://chromium-review.googlesource.com/1102833
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
shallow mode is a special git mode that only checks out a shallow copy
of git so the full history is not downloaded. It is not well supported
by googlesource.com servers because git has to do a giant negotiation
with the server and transmit every single commit that the local checkout
has or doesn't have (instead of just the latest commit of each ref),
which ends up taking more than 10x longer than a non-shallow checkout.
R=ehmaldonado, hinoka, iannucci
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Bug: 855137
Change-Id: I5f9e31f8b2730cf80b79bfd0e08201c33eb942f5
Reviewed-on: https://chromium-review.googlesource.com/1110450
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
It fails when both the revision and the url are None.
Bug: 841936
Change-Id: Idef45a015624a92226d4ccd38ed5b978bf786993
Reviewed-on: https://chromium-review.googlesource.com/1053996
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
This is a reland of e86fe982e8
Original change's description:
> bot_update: Set user.{name,email} when applying patch refs.
>
> git rebase complains when user name/email has not been configured, as was
> the case for the Chromium trybot.
>
> Bug: 643346
> Change-Id: Iab7dac0a98608e09b63a53d5bacb98925701fbfd
> Reviewed-on: https://chromium-review.googlesource.com/1031524
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Bug: 643346
Change-Id: I4b4d07675222d39d704560ed84f9c221e87aba8b
Reviewed-on: https://chromium-review.googlesource.com/1036309
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This reverts commit e86fe982e8.
Reason for revert: Probably causing outages on win7_chromium_rel_ng.
Original change's description:
> bot_update: Set user.{name,email} when applying patch refs.
>
> git rebase complains when user name/email has not been configured, as was
> the case for the Chromium trybot.
>
> Bug: 643346
> Change-Id: Iab7dac0a98608e09b63a53d5bacb98925701fbfd
> Reviewed-on: https://chromium-review.googlesource.com/1031524
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
TBR=agable@chromium.org,ehmaldonado@chromium.org
Change-Id: Ic57398323476fccef34f766270d760c3975630a6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 643346
Reviewed-on: https://chromium-review.googlesource.com/1036308
Reviewed-by: Stephen Martinis <martiniss@chromium.org>
Commit-Queue: Stephen Martinis <martiniss@chromium.org>
git rebase complains when user name/email has not been configured, as was
the case for the Chromium trybot.
Bug: 643346
Change-Id: Iab7dac0a98608e09b63a53d5bacb98925701fbfd
Reviewed-on: https://chromium-review.googlesource.com/1031524
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Previously, anything not equal to HEAD meant pinned revision.
This backfired on values like "origin/master" which are meant as
equivalent to HEAD, but which bot_update tried to ensure exist in
checkout, which was refreshed several times under assumption that
this is eventual consistency of git servers.
Instead, this CL treats repo as pinned if and only if the treeish
of the repo is matching sha1 regex.
R=hinoka@chromium.org
Bug: 838292
Change-Id: I9cb46535f46b2898cf54900ede7960ba08770d77
Post-Scriptum: git bisect + Led is awesome, took only 8 manual steps.
Reviewed-on: https://chromium-review.googlesource.com/1035793
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>