Commit Graph

153 Commits (5705acabe03a84815779adda7c0928b67dfaa6ae)

Author SHA1 Message Date
Edward Lesmes 8f20428bf4 Reland "bot_update: Patch on gclient by default."
This is a reland of e38cf570fc

The issue with win CQ bots was fixed in https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1036309
It was due to misconfigured git user.{name,email}

Original change's description:
> bot_update: Patch on gclient by default.
>
> See [4] for the design doc for this change.
>
> We're moving the patching logic from bot_update to gclient.
> This way we can test patches of dependencies that modify their DEPS
> files as well, for example when ANGLE uploads a patch that modifies
> DEPS files to be tested by a Chromium trybot.
>
> Chromium Linux CQ and Angle trybots are already running this way
> (see [1] and [2]) and a PSA has already been sent [3]
>
> [1] https://chromium.googlesource.com/chromium/src/+/master/infra/config/global/cr-buildbucket.cfg#214
> [2] https://chromium.googlesource.com/angle/angle/+/infra/config/cr-buildbucket.cfg#105
> [3] https://groups.google.com/a/google.com/forum/#!topic/chrome-infra/FVHN2kdUX4I
> [4] https://docs.google.com/document/d/1GSTw4ysm5AYjNR6vMA7NJUxLK2VN9IpOEp_v0u-wyOE/edit?ts=5ad78165#
>
> Bug: 643346
> Change-Id: Ic9a9dcfae86aca730d35fbb26c26b21135e05bf3
> Recipe-Nontrivial-Roll: skia
> Recipe-Nontrivial-Roll: infra
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Recipe-Nontrivial-Roll: skiabuildbot
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: release_scripts
> Reviewed-on: https://chromium-review.googlesource.com/1014356
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>

Bug: 643346
Change-Id: I4f4edd8e815cb12a4cbc3ab690eaf588bc2accc1
Reviewed-on: https://chromium-review.googlesource.com/1039966
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lemur 6c692edf01 Reland "bot_update: Set user.{name,email} when applying patch refs."
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>
7 years ago
Michael Moss 1eb58e1f88 Add a recipe config to enable the bot_update "--with_tags" flag.
This is needed for release builders to checkout the release tags that
will be created when the buildspec branch/release info is migrated out
to the regular repos.

BUG=825063
R=jbudorick@google.com

Change-Id: I5f0e4cdd94de11c59f9b4a5c11aabea129e81523
Reviewed-on: https://chromium-review.googlesource.com/1036526
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Michael Moss <mmoss@chromium.org>
7 years ago
Stephen Martinis 43d72759fe Revert "bot_update: Set user.{name,email} when applying patch refs."
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>
7 years ago
Edward Lesmes e86fe982e8 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>
7 years ago
Andrii Shyshkalov c6e57bb748 bot_update: really check whether repo is pinned at an actual sha1 revision.
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>
7 years ago
Ben Pastene 7580f9dac9 Revert "Reland "bot_update: Patch on gclient by default.""
This reverts commit e38cf570fc.

Reason for revert: likely broke bot_update on win CQ bots:
https://ci.chromium.org/buildbot/tryserver.chromium.win/win7_chromium_rel_ng/154654
https://bugs.chromium.org/p/chromium/issues/detail?id=837321

Original change's description:
> Reland "bot_update: Patch on gclient by default."
> 
> This is a reland of 355b11a31f
> 
> Original change's description:
> > bot_update: Patch on gclient by default.
> > 
> > See [4] for the design doc for this change.
> > 
> > We're moving the patching logic from bot_update to gclient.
> > This way we can test patches of dependencies that modify their DEPS
> > files as well, for example when ANGLE uploads a patch that modifies
> > DEPS files to be tested by a Chromium trybot.
> > 
> > Chromium Linux CQ and Angle trybots are already running this way
> > (see [1] and [2]) and a PSA has already been sent [3]
> > 
> > [1] https://chromium.googlesource.com/chromium/src/+/master/infra/config/global/cr-buildbucket.cfg#214
> > [2] https://chromium.googlesource.com/angle/angle/+/infra/config/cr-buildbucket.cfg#105
> > [3] https://groups.google.com/a/google.com/forum/#!topic/chrome-infra/FVHN2kdUX4I
> > [4] https://docs.google.com/document/d/1GSTw4ysm5AYjNR6vMA7NJUxLK2VN9IpOEp_v0u-wyOE/edit?ts=5ad78165#
> > 
> > Bug: 643346
> > Change-Id: Ic9a9dcfae86aca730d35fbb26c26b21135e05bf3
> > Recipe-Nontrivial-Roll: skia
> > Recipe-Nontrivial-Roll: infra
> > Recipe-Nontrivial-Roll: build_limited_scripts_slave
> > Recipe-Nontrivial-Roll: skiabuildbot
> > Recipe-Nontrivial-Roll: build
> > Recipe-Nontrivial-Roll: release_scripts
> > Reviewed-on: https://chromium-review.googlesource.com/1014356
> > Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> > Reviewed-by: Aaron Gable <agable@chromium.org>
> 
> Bug: 643346
> Change-Id: I2da17456f24d1e9fcc3f48f9242b4db05cadbf6d
> Reviewed-on: https://chromium-review.googlesource.com/1029073
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

TBR=agable@chromium.org,tandrii@chromium.org,ehmaldonado@chromium.org

Change-Id: I33e4bf7b5f416f6356dbd0b50a276cd36dd4e9b3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 643346
Reviewed-on: https://chromium-review.googlesource.com/1030718
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
7 years ago
Edward Lesmes e38cf570fc Reland "bot_update: Patch on gclient by default."
This is a reland of 355b11a31f

Original change's description:
> bot_update: Patch on gclient by default.
> 
> See [4] for the design doc for this change.
> 
> We're moving the patching logic from bot_update to gclient.
> This way we can test patches of dependencies that modify their DEPS
> files as well, for example when ANGLE uploads a patch that modifies
> DEPS files to be tested by a Chromium trybot.
> 
> Chromium Linux CQ and Angle trybots are already running this way
> (see [1] and [2]) and a PSA has already been sent [3]
> 
> [1] https://chromium.googlesource.com/chromium/src/+/master/infra/config/global/cr-buildbucket.cfg#214
> [2] https://chromium.googlesource.com/angle/angle/+/infra/config/cr-buildbucket.cfg#105
> [3] https://groups.google.com/a/google.com/forum/#!topic/chrome-infra/FVHN2kdUX4I
> [4] https://docs.google.com/document/d/1GSTw4ysm5AYjNR6vMA7NJUxLK2VN9IpOEp_v0u-wyOE/edit?ts=5ad78165#
> 
> Bug: 643346
> Change-Id: Ic9a9dcfae86aca730d35fbb26c26b21135e05bf3
> Recipe-Nontrivial-Roll: skia
> Recipe-Nontrivial-Roll: infra
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Recipe-Nontrivial-Roll: skiabuildbot
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: release_scripts
> Reviewed-on: https://chromium-review.googlesource.com/1014356
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>

Bug: 643346
Change-Id: I2da17456f24d1e9fcc3f48f9242b4db05cadbf6d
Reviewed-on: https://chromium-review.googlesource.com/1029073
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lesmes 2acf495798 Revert "bot_update: Patch on gclient by default."
This reverts commit 355b11a31f.

Reason for revert:
Easier to do this another way that doesn't cause expectation changes,
so it doesn't require non-trivial rolls.

Original change's description:
> bot_update: Patch on gclient by default.
> 
> See [4] for the design doc for this change.
> 
> We're moving the patching logic from bot_update to gclient.
> This way we can test patches of dependencies that modify their DEPS
> files as well, for example when ANGLE uploads a patch that modifies
> DEPS files to be tested by a Chromium trybot.
> 
> Chromium Linux CQ and Angle trybots are already running this way
> (see [1] and [2]) and a PSA has already been sent [3]
> 
> [1] https://chromium.googlesource.com/chromium/src/+/master/infra/config/global/cr-buildbucket.cfg#214
> [2] https://chromium.googlesource.com/angle/angle/+/infra/config/cr-buildbucket.cfg#105
> [3] https://groups.google.com/a/google.com/forum/#!topic/chrome-infra/FVHN2kdUX4I
> [4] https://docs.google.com/document/d/1GSTw4ysm5AYjNR6vMA7NJUxLK2VN9IpOEp_v0u-wyOE/edit?ts=5ad78165#
> 
> Bug: 643346
> Change-Id: Ic9a9dcfae86aca730d35fbb26c26b21135e05bf3
> Recipe-Nontrivial-Roll: skia
> Recipe-Nontrivial-Roll: infra
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Recipe-Nontrivial-Roll: skiabuildbot
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: release_scripts
> Reviewed-on: https://chromium-review.googlesource.com/1014356
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>

TBR=agable@chromium.org,ehmaldonado@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 643346
Change-Id: I0e694b0e398770b8bd2e5a3170e158a7e54c5a61
Reviewed-on: https://chromium-review.googlesource.com/1029310
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lesmes 355b11a31f bot_update: Patch on gclient by default.
See [4] for the design doc for this change.

We're moving the patching logic from bot_update to gclient.
This way we can test patches of dependencies that modify their DEPS
files as well, for example when ANGLE uploads a patch that modifies
DEPS files to be tested by a Chromium trybot.

Chromium Linux CQ and Angle trybots are already running this way
(see [1] and [2]) and a PSA has already been sent [3]

[1] https://chromium.googlesource.com/chromium/src/+/master/infra/config/global/cr-buildbucket.cfg#214
[2] https://chromium.googlesource.com/angle/angle/+/infra/config/cr-buildbucket.cfg#105
[3] https://groups.google.com/a/google.com/forum/#!topic/chrome-infra/FVHN2kdUX4I
[4] https://docs.google.com/document/d/1GSTw4ysm5AYjNR6vMA7NJUxLK2VN9IpOEp_v0u-wyOE/edit?ts=5ad78165#

Bug: 643346
Change-Id: Ic9a9dcfae86aca730d35fbb26c26b21135e05bf3
Recipe-Nontrivial-Roll: skia
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: skiabuildbot
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: release_scripts
Reviewed-on: https://chromium-review.googlesource.com/1014356
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
John Budorick 9ccad5689c bot_update: Ensure create_manifest ignores repos with explicit None urls.
Bug: 830306
Change-Id: Id87a6f2053c7e3cd489647d1cbbc8a83f2e585db
Reviewed-on: https://chromium-review.googlesource.com/1003326
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
7 years ago
Edward Lesmes d69c5dd538 bot_update: Don't patch if gerrit_repo or gerrit_ref are empty/None.
We should apply the patch only when gerrit_repo and gerrit_ref are passed,
instead of using only the --apply-patch-on-gclient flag.

R=agable@chromium.org

Bug: 643346
Change-Id: I28547aed9daeefa2657a108e0bacbfd4fc9fa07e
Reviewed-on: https://chromium-review.googlesource.com/989667
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lesmes ee04b9a2f4 bot_update: Make gclient experiment a property instead of an argument.
Is easier to configure experimental bots this way.

Bug: 643346
Change-Id: Idb6d3a68b02949dce71dbcba38e8ef756c467830
Reviewed-on: https://chromium-review.googlesource.com/981515
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Edward Lesmes 385a4fdd46 bot_update: Add a flag to move applying the patch to gclient.
This adds a --enable-gclient-experiment flags that tells bot_update.py
to skip applying the patch, and instead forward the flags to gclient.

Bug: 643346
Change-Id: Ia4275a126e6adba54dfcc894d224c50c166db90e
Reviewed-on: https://chromium-review.googlesource.com/962938
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Andrii Shyshkalov b3065fb6a1 bot_update: don't repack, don't gc in main repo of builder's checkout.
The main purpose is to avoid running slow and useless operation in
chromium/src checkouts. Ideally, this should be done in every DEPS-ed
repo, too, but that requires substantially more changes in gclient.
Thus, this CL provides biggest bang for the buck.

Example led build: https://ci.chromium.org/swarming/task/3c62efb31ed3a910?server=chromium-swarm.appspot.com

R=hinoka@chromium.org

Bug: 822437
Change-Id: I347d85e5cb5158b77969a755b67ca2289fb39d40
Reviewed-on: https://chromium-review.googlesource.com/973900
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
7 years ago
Robert Iannucci 456b0d648f [bot_update] Remove support for rietveld patches.
R=agable@chromium.org, tandrii@chromium.org

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: infra
Change-Id: I518335e7b8fdce316b5566caccd3c4c7c2ae741a
Reviewed-on: https://chromium-review.googlesource.com/960161
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Robert Iannucci f4c2703a6d [bot_update] Remove rietveld recipe_module.
R=agable@chromium.org, tandrii@chromium.org

Recipe-Nontrivial-Roll: build
Change-Id: Ic4c2dc7a50d389f18f3e0c1de332cb1a0ab376a9
Reviewed-on: https://chromium-review.googlesource.com/957834
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Robert Iannucci 3a8b09088b [bot_update] Remove use_site_config_creds.
This method hasn't been supported for a long time now (and besides, its
only for Rietveld).

R=agable@chromium.org, tandrii@chromium.org

Recipe-Manual-Change: infra
Change-Id: Ie6e63834dca67962db29f2cb407950ed85db55a7
Reviewed-on: https://chromium-review.googlesource.com/957832
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Tom Anderson 592962c7af Write target_cpu to .gclient
Also, some lines went over 80chars, so I ran 'yapf --style chromium' which
formatted some unrelated things.

BUG=905285
R=dpranke

Change-Id: Iee5f46d88a6e9782612cc4f9e5a2cb72d62ab6af
Reviewed-on: https://chromium-review.googlesource.com/907736
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
7 years ago
Andrii Shyshkalov 5eab58ee90 Revert "bot_update: allow rebasing the patch onto an older revision."
This reverts commit fa573785df.

Reason for revert: broke CQ on branches.
Example: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/chromium_presubmit/28220

Original change's description:
> bot_update: allow rebasing the patch onto an older revision.
>
> When applying a rebase, we normally go from an older base commit to a newer one.
>
> A ---- B ---- C ---- D -origin/master
>                \
>                 E -branch
>
> In this case, `git rebase D` would certainly work as expected. However,
> writing `git rebase B` would NOT get us to the following state:
>
> A ---- B ---- C ---- D -origin/master
>         \
>          E' -branch
>
> In fact, it would have no effect.
>
> This article http://matthew-brett.github.io/pydagogue/rebase_without_tears.html
> explains the general invocation as
> > `git rebase --onto <graft-point> <exclude-from> <include-from>`
> > If you don’t specify --onto, <graft-point> defaults to <exclude-from>
>
> So what's happening is, by writing `git rebase B` we're rebasing onto B,
> excluding commits that are in B. Commit C is not "in" B so it is kept and we're
> back to the starting point.
>
> So I suggest to change the invocation to `git rebase --onto B origin/master`,
> which rebases onto B, excluding commits that are in origin/master. This works
> more generally and allows rebasing "backwards".
>
> Bug: None
> Change-Id: I68e4d805811530b585550bc75099354fef4e9c15
> Reviewed-on: https://chromium-review.googlesource.com/904004
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
> Commit-Queue: Oleh Prypin <oprypin@chromium.org>

TBR=iannucci@chromium.org,tandrii@chromium.org,oprypin@chromium.org

Change-Id: I7243641d84428bf4504ee798bf31ad0afbfd4865
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://chromium-review.googlesource.com/905862
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov cd33775a7a bot_update: optimize checkout of solution's main repo.
Goal: reduce number of git fetches from remote to the minimum possible.
Minimum possible is either:
 * 0 if desired revision is pinned (!= HEAD) and already exists in cache
 * 1 if desired revision is HEAD
 * >= 2 if revision is pinned but we talk temporarily
   out-of-date git server not yet having it.

This CL achieves the above.

No fetch:
  https://ci.chromium.org/swarming/task/39dad20230c84110?server=chromium-swarm.appspot.com
  bot_update takes <1min, but it used to take at least 2. The steps are now like this:

  ...
  ===Running git cat-file -e 33bf8a94dcd5e0abbdf83e4afaed24b5180e3eb2===
  In directory: /b/swarming/w/ir/cache/git/chromium.googlesource.com-chromium-src
  ===Succeeded in 0.0 mins===
  ===Running /b/swarming/w/ir/cipd_bin_packages/bin/python -u /b/swarming/w/ir/recipe-checkout-dir/depot_tools/git_cache.py exists --quiet --cache-dir /b/swarming/w/ir/cache/git https://chromium.googlesource.com/chromium/src.git===
  In directory: /b/swarming/w/ir/cache/builder/linux
  /b/swarming/w/ir/cache/git/chromium.googlesource.com-chromium-src
  ===Succeeded in 0.0 mins===
  ===Running git remote set-url origin /b/swarming/w/ir/cache/git/chromium.googlesource.com-chromium-src===
  In directory: /b/swarming/w/ir/cache/builder/linux/src
  ===Succeeded in 0.0 mins===
  ===Running git fetch origin===
  In directory: /b/swarming/w/ir/cache/builder/linux/src
  From /b/swarming/w/ir/cache/git/chromium.googlesource.com-chromium-src
     003eedbfee47..5210107a20e8  master     -> origin/master
  ===Succeeded in 0.0 mins===
  ===Running git checkout --force 33bf8a94dcd5e0abbdf83e4afaed24b5180e3eb2===
  ...

Fetch & success:
  https://ci.chromium.org/swarming/task/39db022b874ffd10?server=chromium-swarm.appspot.com

Fetch & retry because missing rev:
  https://ci.chromium.org/swarming/task/39db04ce8b4b8910?server=chromium-swarm.appspot.com

Fetch because rev=HEAD:
  https://ci.chromium.org/swarming/task/39db0c0dd5ab5d10?server=chromium-swarm.appspot.com

This has already been adopted in gclient.

Bug:
Change-Id: Id99892b62719fdf3f7e6e59058986d1500384f8d
Reviewed-on: https://chromium-review.googlesource.com/771591
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Jao-ke Chin-Lee <jchinlee@chromium.org>
7 years ago
Oleh Prypin fa573785df bot_update: allow rebasing the patch onto an older revision.
When applying a rebase, we normally go from an older base commit to a newer one.

A ---- B ---- C ---- D -origin/master
               \
                E -branch

In this case, `git rebase D` would certainly work as expected. However,
writing `git rebase B` would NOT get us to the following state:

A ---- B ---- C ---- D -origin/master
        \
         E' -branch

In fact, it would have no effect.

This article http://matthew-brett.github.io/pydagogue/rebase_without_tears.html
explains the general invocation as
> `git rebase --onto <graft-point> <exclude-from> <include-from>`
> If you don’t specify --onto, <graft-point> defaults to <exclude-from>

So what's happening is, by writing `git rebase B` we're rebasing onto B,
excluding commits that are in B. Commit C is not "in" B so it is kept and we're
back to the starting point.

So I suggest to change the invocation to `git rebase --onto B origin/master`,
which rebases onto B, excluding commits that are in origin/master. This works
more generally and allows rebasing "backwards".

Bug: None
Change-Id: I68e4d805811530b585550bc75099354fef4e9c15
Reviewed-on: https://chromium-review.googlesource.com/904004
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Oleh Prypin <oprypin@chromium.org>
7 years ago
Takuto Ikuta 4fbf4bece2 Remove windows specific git pack limit
This is full version of
https://chromium-review.googlesource.com/823544

After the CL landing, we see no performance regression in bot_update step.
And regular 95%ile in 1h window improved from more than 300s to less than or around 200s.
See tandrii's query in https://bugs.chromium.org/p/chromium/issues/detail?id=749709#c91 for detail.

Let me reduce frequency of slow bot_update step more like below.
https://ci.chromium.org/buildbot/tryserver.chromium.win/win7_chromium_rel_ng/69844
https://ci.chromium.org/buildbot/tryserver.chromium.win/win7_chromium_rel_ng/69886
https://ci.chromium.org/buildbot/tryserver.chromium.win/win7_chromium_rel_ng/69892

Bug: 749709
Change-Id: I44474aa9ecdd733d68fd13fe8b791820fb80381f
Reviewed-on: https://chromium-review.googlesource.com/838766
Commit-Queue: Takuto Ikuta <tikuta@google.com>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Aaron Gable de8ce79f79 Remove rietveld support from tryserver recipe module
Bug: 770408
Recipe-Nontrivial-Roll: build
Change-Id: Icafd4bd11009975c40e53d93901589c07ecd738e
Reviewed-on: https://chromium-review.googlesource.com/707723
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 years ago
recipe-roller ac4e7911c0 Roll recipe dependencies (nontrivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


Please review the expectation changes, and LGTM+CQ.


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
recipe_engine:
  https://crrev.com/77667b5ba38c4d205a743d04eb625ac068bdd78e Always use Gerrit for tryserver recipe tests (agable@chromium.org)


R=dnj@chromium.org, martiniss@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I2df24323974ae0d3b3b0524240b64be5740977c6
Reviewed-on: https://chromium-review.googlesource.com/836760
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Takuto Ikuta 9fce213bdb Partial revert of "git_cache: lower max num of .pack files before re-bootstrap on Win."
This partially reverts commit d51ed57edb.

Reason for revert:
New git client for windows was rolled including fix for slow `git fetch`.
I guess smaller pack limit causes frequent bootstrap taking 2~3 minutes longer than
the case it does not happen.
Let me see what happen if we increase pack limit 9 -> 30.
I will increase this to 50 if this won't cause regression again.

Original change's description:
> git_cache: lower max num of .pack files before re-bootstrap on Win.
>
> It used to be 50, I think ~9 gives best results for Chromium on Win:
>   on golo VM, it takes <4 minutes to re-boostrap + git fetch small
>   delta, assuming zipped git checkout for bootstrap is fresh (~1day).
>
> For other repos, which are significantly smaller, this change should
> have minor effect if at all.
>
> Test: I tested this using `led` tool on Win7 machines running LUCI
> stack extensively. For example,
>
>   * https://ci.chromium.org/swarming/task/3a0102e8c8657410
>     shows case with few .pack files, hence just 1 fetch
>
>   * https://ci.chromium.org/swarming/task/3a010282f9fd8010
>     shows case with 39 .pack files and so bootstrapping + fetch.
>     If you look at prior tasks on the same VM, you'd find this:
>     https://ci.chromium.org/swarming/task/39ffe843d01ed010
>     which spent 8 minutes doing 1 incremental fetch with 39 .pack
>     files.
>
> **Troopers/Sheriffs**: This change is safe to revert.
> However, beware that you should also at the same time revert the recipe
> roll of this CL to the repo, in which the failed builder's recipe is
> located, typically `chromium/tools/build`.
>
> Bug: 749709
> Change-Id: I18e2b63283100d466e9fb981a9094862463f6909
> Reviewed-on: https://chromium-review.googlesource.com/787174
> Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
> Reviewed-by: Takuto Ikuta <tikuta@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 749709
Change-Id: I3052abe4a9b53277a60c0791a85355e7a0bbdf8f
Reviewed-on: https://chromium-review.googlesource.com/823544
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@google.com>
7 years ago
Robert Iannucci 41d9d87e96 [recipe_modules/depot_tools] Add on_path helper.
This will be used by various things in build and build_internal which
"need" a depot_tools on PATH (though I suspect most of those should be
refactored to use the depot_tools in chromium/src.git).

R=tandrii@chromium.org

Bug: 789808
Change-Id: I5d0590ccdc5482bd8e3048ad46a39b5aedacbddb
Reviewed-on: https://chromium-review.googlesource.com/828465
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Robert Iannucci 069dd4fa6b [bot_update] Put depot_tools at the end of $PATH on LUCI.
This should prevent bot_update from overriding vpython by accident.

R=tandrii@chromium.org

Recipe-Nontrivial-Roll: build
Bug: 789808
Change-Id: Ia574204439588862f29f94a80e978b2ff4b57586
Reviewed-on: https://chromium-review.googlesource.com/828069
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov 009150b7af bot_update: be explicit when checking out branches.
$ git checkout <name>

may be interpreted by git as checking out a file named <name>
if <name> has slashes. Thus,

$ git checkout infra/config

ends up checking out infra/config directory of the (typically)
master branch that was checked out before. To avoid confusion,
we have to add '--' separator between branch name and file names:

$ git checkout <name> --

This in turns allows to run CQ-based presubmit on infra/config branches.

R=nodir@chromium.org

Bug: 790738
Change-Id: I6ce31a8f0fbd66fd59ac7c2ea9cccd3ff97d1f0e
Reviewed-on: https://chromium-review.googlesource.com/802136
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
7 years ago
Andrii Shyshkalov 1b30125fbc bot_update: don't remove git cache's .lock files.
bot_update and gclient invokes git cache with --ignore-locks.
This should also reduce noisiness of bot_update stdout.

R=iannucci@chromium.org

Bug:
Change-Id: I6baf9e5665d244d08aab58a7d3327e6c3204b2b5
Reviewed-on: https://chromium-review.googlesource.com/791536
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov 46a672bafa gclient: don't update cache if needed revision is already there.
Tested end-to-end, for example
  https://ci.chromium.org/swarming/task/3a0147207378b910
which contains:
  src/media/cdm/api (Elapsed: 0:00:01)
  ----------------------------------------
  [0:00:00] Started.
  _____ src\media\cdm\api at ea5df8e78fbd0a4c24cc3a1f3faefefcd1b45237
  [0:00:00] running "git cat-file -e ea5df8e78fbd0a4c24cc3a1f3faefefcd1b45237" in "e:\b\s\w\ir\cache\git\chromium.googlesource.com-chromium-cdm"
  skipping mirror update, it has rev=ea5df8e78fbd0a4c24cc3a1f3faefefcd1b45237 already

thereby saving on needless git fetch (~40s in glcient sync on win trybots),
and reducing the rate of .pack file accumulation inside cache directories.


Risks: silently broken recipes which run gclient sync (or worse, bot_update)
as a means of fetching latest commits in all repos of a solution. I think
the benefit of faster bot_update in chromium CQ is worth the potential risk.

PSA: https://groups.google.com/a/chromium.org/d/msg/infra-dev/UYLdBwAXm1Y/OV9QB6JnBQAJ

Bug: 749709
Change-Id: I7a9e8ab82a5e2b848e450f19a798ac18a0b5e201
Reviewed-on: https://chromium-review.googlesource.com/787331
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
7 years ago
Andrii Shyshkalov 568f473e4b bot_update: add mooooooore chars in logs.
Before, bot_update would print after command:
  Succeeded (Failed) in 0.1 mins
but figuring out which command takes a lot of scrolling/searching
for previous
  Running <cmd with args>
This CL fixes that:
  Succeeded (Failed) in 0.1 mins <cmd with args>



R=machenbach@chromium.org, maruel@chromium.org
TEST=end-to-end with led tool, but only on LUCI stack.

Bug: 749709
Change-Id: Id3031a12b9013ab136ea03cdf6d325930722e50f
Reviewed-on: https://chromium-review.googlesource.com/787175
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov d51ed57edb git_cache: lower max num of .pack files before re-bootstrap on Win.
It used to be 50, I think ~9 gives best results for Chromium on Win:
  on golo VM, it takes <4 minutes to re-boostrap + git fetch small
  delta, assuming zipped git checkout for bootstrap is fresh (~1day).

For other repos, which are significantly smaller, this change should
have minor effect if at all.

Test: I tested this using `led` tool on Win7 machines running LUCI
stack extensively. For example,

  * https://ci.chromium.org/swarming/task/3a0102e8c8657410
    shows case with few .pack files, hence just 1 fetch

  * https://ci.chromium.org/swarming/task/3a010282f9fd8010
    shows case with 39 .pack files and so bootstrapping + fetch.
    If you look at prior tasks on the same VM, you'd find this:
    https://ci.chromium.org/swarming/task/39ffe843d01ed010
    which spent 8 minutes doing 1 incremental fetch with 39 .pack
    files.

**Troopers/Sheriffs**: This change is safe to revert.
However, beware that you should also at the same time revert the recipe
roll of this CL to the repo, in which the failed builder's recipe is
located, typically `chromium/tools/build`.

Bug: 749709
Change-Id: I18e2b63283100d466e9fb981a9094862463f6909
Reviewed-on: https://chromium-review.googlesource.com/787174
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@google.com>
7 years ago
Andrii Shyshkalov 0083130c97 Whitespace change inside recipes to kick recipe autoroller.
TBR=iannucci@chromium.org

Bug: 749709
Change-Id: I8aa02f780c5f2a3c2f8c0c408f83b061ba11c672
Reviewed-on: https://chromium-review.googlesource.com/788244
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov 25b1da95b3 Revert "Show GIT_TRACE for git command in bot_update.py"
This reverts commit 6e215cefe2.

Reason for revert: seems to have broken bot_update 
https://ci.chromium.org/swarming/task/39ff1814b3bb5b10?server=chromium-swarm.appspot.com

Original change's description:
> Show GIT_TRACE for git command in bot_update.py
> 
> GIT_TRACE=true tells us which internal git command is slow.
> https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables
> 
> I got following results in my local repository.
> Let me confirm the bots show similar behavior.
> 
> C:\src\chromium\src>set GIT_TRACE=true
> 
> C:\src\chromium\src>git rebase-update
> 21:32:36.519698 git.c:576               trace: exec: 'git-rebase-update'
> 21:32:36.519698 run-command.c:626       trace: run_command: 'git-rebase-update'
> 21:32:38.889848 git.c:344               trace: built-in: git 'fetch' '--multiple' 'origin'
> 21:32:38.893846 run-command.c:626       trace: run_command: 'fetch' '--append' 'origin'
> Fetching origin
> 21:32:38.911858 git.c:344               trace: built-in: git 'fetch' '--append' 'origin'
> 21:32:38.983909 run-command.c:626       trace: run_command: 'remote-https' 'origin' 'https://chromium.googlesource.com/chromium/src.git'
> 21:32:39.002923 git.c:576               trace: exec: 'git-remote-https' 'origin' 'https://chromium.googlesource.com/chromium/src.git'
> 21:32:39.003923 run-command.c:626       trace: run_command: 'git-remote-https' 'origin' 'https://chromium.googlesource.com/chromium/src.git'
> 21:32:43.782266 run-command.c:626       trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
> 21:32:43.827301 run-command.c:626       trace: run_command: 'fetch-pack' '--stateless-rpc' '--stdin' '--lock-pack' '--include-tag' '--thin' 'https://chromium.googlesource.com/chromium/src.git/'
> remote: Counting objects: 74400, done
> remote: Finding sources: 100% (19/19)
> 21:35:49.348951 run-command.c:626       trace: run_command: 'unpack-objects' '--pack_header=2,19'
> 21:35:49.368985 git.c:344               trace: built-in: git 'unpack-objects' '--pack_header=2,19'
> remote: Total 19 (delta 1), reused 18 (delta 1)
> Unpacking objects: 100% (19/19), done.
> 21:35:49.597328 run-command.c:626       trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
> 21:35:49.612375 git.c:344               trace: built-in: git 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
> From https://chromium.googlesource.com/chromium/src
>    e8994685157b..fd56d3ad0528  master     -> origin/master
> 21:35:50.281845 run-command.c:1452      run_processes_parallel: preparing to run up to 1 tasks
> 21:35:50.287848 run-command.c:1484      run_processes_parallel: done
> 21:35:50.309865 run-command.c:626       trace: run_command: 'gc' '--auto'
> 21:35:50.328880 git.c:344               trace: built-in: git 'gc' '--auto'
> 21:35:50.453967 run-command.c:1452      run_processes_parallel: preparing to run up to 1 tasks
> 21:35:50.460971 run-command.c:1484      run_processes_parallel: done
> 21:35:50.460971 run-command.c:626       trace: run_command: 'gc' '--auto'
> 21:35:50.480985 git.c:344               trace: built-in: git 'gc' '--auto'
> Rebasing: direct_goma
> Rebasing: python_pool
> 
> C:\src\chromium\src>git fetch
> 21:36:23.409703 git.c:344               trace: built-in: git 'fetch'
> 21:36:23.486758 run-command.c:626       trace: run_command: 'remote-https' 'origin' 'https://chromium.googlesource.com/chromium/src.git'
> 21:36:23.506772 git.c:576               trace: exec: 'git-remote-https' 'origin' 'https://chromium.googlesource.com/chromium/src.git'
> 21:36:23.506772 run-command.c:626       trace: run_command: 'git-remote-https' 'origin' 'https://chromium.googlesource.com/chromium/src.git'
> 21:36:28.542596 run-command.c:626       trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
> 21:36:28.578620 run-command.c:626       trace: run_command: 'fetch-pack' '--stateless-rpc' '--stdin' '--lock-pack' '--include-tag' '--thin' 'https://chromium.googlesource.com/chromium/src.git/'
> 21:36:28.601635 git.c:344               trace: built-in: git 'fetch-pack' '--stateless-rpc' '--stdin' '--lock-pack' '--include-tag' '--thin' 'https://chromium.googlesource.com/chromium/src.git/'
> remote: Counting objects: 67598, done
> remote: Finding sources: 100% (28/28)
> 21:39:29.787441 run-command.c:626       trace: run_command: 'unpack-objects' '--pack_header=2,28'
> 21:39:29.812462 git.c:344               trace: built-in: git 'unpack-objects' '--pack_header=2,28'
> remote: Total 28 (delta 2), reused 20 (delta 2)
> Unpacking objects: 100% (28/28), done.
> 21:39:30.083690 run-command.c:626       trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
> 21:39:30.108704 git.c:344               trace: built-in: git 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
> From https://chromium.googlesource.com/chromium/src
>    fd56d3ad0528..fbcc09282dc8  master     -> origin/master
> 21:39:30.788186 run-command.c:1452      run_processes_parallel: preparing to run up to 1 tasks
> 21:39:30.795191 run-command.c:1484      run_processes_parallel: done
> 21:39:30.813200 run-command.c:626       trace: run_command: 'gc' '--auto'
> 21:39:30.836212 git.c:344               trace: built-in: git 'gc' '--auto'
> 
> 
> Bug:749709
> Change-Id: I5b94549c42271885365c2354dc3f58399d6aebe0
> Reviewed-on: https://chromium-review.googlesource.com/786691
> Reviewed-by: Ryan Tseng <hinoka@chromium.org>
> Commit-Queue: Takuto Ikuta <tikuta@google.com>

TBR=hinoka@chromium.org,agable@chromium.org,tandrii@chromium.org,tikuta@google.com

Change-Id: I970ddac1fd21e904c69dc18e48169d49293b1800
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 749709
Reviewed-on: https://chromium-review.googlesource.com/786413
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Takuto Ikuta 6e215cefe2 Show GIT_TRACE for git command in bot_update.py
GIT_TRACE=true tells us which internal git command is slow.
https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables

I got following results in my local repository.
Let me confirm the bots show similar behavior.

C:\src\chromium\src>set GIT_TRACE=true

C:\src\chromium\src>git rebase-update
21:32:36.519698 git.c:576               trace: exec: 'git-rebase-update'
21:32:36.519698 run-command.c:626       trace: run_command: 'git-rebase-update'
21:32:38.889848 git.c:344               trace: built-in: git 'fetch' '--multiple' 'origin'
21:32:38.893846 run-command.c:626       trace: run_command: 'fetch' '--append' 'origin'
Fetching origin
21:32:38.911858 git.c:344               trace: built-in: git 'fetch' '--append' 'origin'
21:32:38.983909 run-command.c:626       trace: run_command: 'remote-https' 'origin' 'https://chromium.googlesource.com/chromium/src.git'
21:32:39.002923 git.c:576               trace: exec: 'git-remote-https' 'origin' 'https://chromium.googlesource.com/chromium/src.git'
21:32:39.003923 run-command.c:626       trace: run_command: 'git-remote-https' 'origin' 'https://chromium.googlesource.com/chromium/src.git'
21:32:43.782266 run-command.c:626       trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
21:32:43.827301 run-command.c:626       trace: run_command: 'fetch-pack' '--stateless-rpc' '--stdin' '--lock-pack' '--include-tag' '--thin' 'https://chromium.googlesource.com/chromium/src.git/'
remote: Counting objects: 74400, done
remote: Finding sources: 100% (19/19)
21:35:49.348951 run-command.c:626       trace: run_command: 'unpack-objects' '--pack_header=2,19'
21:35:49.368985 git.c:344               trace: built-in: git 'unpack-objects' '--pack_header=2,19'
remote: Total 19 (delta 1), reused 18 (delta 1)
Unpacking objects: 100% (19/19), done.
21:35:49.597328 run-command.c:626       trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
21:35:49.612375 git.c:344               trace: built-in: git 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
From https://chromium.googlesource.com/chromium/src
   e8994685157b..fd56d3ad0528  master     -> origin/master
21:35:50.281845 run-command.c:1452      run_processes_parallel: preparing to run up to 1 tasks
21:35:50.287848 run-command.c:1484      run_processes_parallel: done
21:35:50.309865 run-command.c:626       trace: run_command: 'gc' '--auto'
21:35:50.328880 git.c:344               trace: built-in: git 'gc' '--auto'
21:35:50.453967 run-command.c:1452      run_processes_parallel: preparing to run up to 1 tasks
21:35:50.460971 run-command.c:1484      run_processes_parallel: done
21:35:50.460971 run-command.c:626       trace: run_command: 'gc' '--auto'
21:35:50.480985 git.c:344               trace: built-in: git 'gc' '--auto'
Rebasing: direct_goma
Rebasing: python_pool

C:\src\chromium\src>git fetch
21:36:23.409703 git.c:344               trace: built-in: git 'fetch'
21:36:23.486758 run-command.c:626       trace: run_command: 'remote-https' 'origin' 'https://chromium.googlesource.com/chromium/src.git'
21:36:23.506772 git.c:576               trace: exec: 'git-remote-https' 'origin' 'https://chromium.googlesource.com/chromium/src.git'
21:36:23.506772 run-command.c:626       trace: run_command: 'git-remote-https' 'origin' 'https://chromium.googlesource.com/chromium/src.git'
21:36:28.542596 run-command.c:626       trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
21:36:28.578620 run-command.c:626       trace: run_command: 'fetch-pack' '--stateless-rpc' '--stdin' '--lock-pack' '--include-tag' '--thin' 'https://chromium.googlesource.com/chromium/src.git/'
21:36:28.601635 git.c:344               trace: built-in: git 'fetch-pack' '--stateless-rpc' '--stdin' '--lock-pack' '--include-tag' '--thin' 'https://chromium.googlesource.com/chromium/src.git/'
remote: Counting objects: 67598, done
remote: Finding sources: 100% (28/28)
21:39:29.787441 run-command.c:626       trace: run_command: 'unpack-objects' '--pack_header=2,28'
21:39:29.812462 git.c:344               trace: built-in: git 'unpack-objects' '--pack_header=2,28'
remote: Total 28 (delta 2), reused 20 (delta 2)
Unpacking objects: 100% (28/28), done.
21:39:30.083690 run-command.c:626       trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
21:39:30.108704 git.c:344               trace: built-in: git 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
From https://chromium.googlesource.com/chromium/src
   fd56d3ad0528..fbcc09282dc8  master     -> origin/master
21:39:30.788186 run-command.c:1452      run_processes_parallel: preparing to run up to 1 tasks
21:39:30.795191 run-command.c:1484      run_processes_parallel: done
21:39:30.813200 run-command.c:626       trace: run_command: 'gc' '--auto'
21:39:30.836212 git.c:344               trace: built-in: git 'gc' '--auto'


Bug:749709
Change-Id: I5b94549c42271885365c2354dc3f58399d6aebe0
Reviewed-on: https://chromium-review.googlesource.com/786691
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@google.com>
7 years ago
Andrii Shyshkalov ddfead3483 bot_update: mooore refactor around _git_checkout.
Bug:
Change-Id: I7141022348cdfd4dafbd2fa00b5981faa0ba79e0
Reviewed-on: https://chromium-review.googlesource.com/771930
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Jao-ke Chin-Lee <jchinlee@chromium.org>
7 years ago
Andrii Shyshkalov 75c0b4b715 bot_update: don't crash badly if there no json outpot.
To illustrate, with this CL it's clear what is broken:
  https://ci.chromium.org/swarming/task/39e5676c13f00710?server=chromium-swarm.appspot.com
while before you get a red herring:
  ncaught Exception: AttributeError("'NoneType' object has no attribute
  'get'",)...
  https://ci.chromium.org/swarming/task/39e55d46c0774610?server=chromium-swarm.appspot.com

R=iannucci@chromium.org

Bug: 786486
Change-Id: I9ed2cdb7261c2e22a5a68116b81f841ece06c5d2
Reviewed-on: https://chromium-review.googlesource.com/777556
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov 8762632eb7 Reland "bot_update: make --output_json required in script invocation."
This is a reland of 331a276b54
Original change's description:
> bot_update: make --output_json required in script invocation.
> 
> It's already set by recipe, so this should have 0 difference in prod.
> 
> R=iannucci@chromium.org
> 
> Bug:
> Change-Id: I1e1129b9748d6647e45eb26892c8e892019fe088
> Reviewed-on: https://chromium-review.googlesource.com/769164
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>

Change-Id: I165da9650df6b5e8d382aafc30914eff9a524c56
Reviewed-on: https://chromium-review.googlesource.com/777820
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Robert Flack fe36710a72 Revert "bot_update: make --output_json required in script invocation."
This reverts commit 331a276b54.

Reason for revert: Looks like this is causing bots to fail on the waterfall

Example:
https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium%2FWin%2F60913%2F%2B%2Frecipes%2Fsteps%2Fbot_update%2F0%2Fstdout

Original change's description:
> bot_update: make --output_json required in script invocation.
> 
> It's already set by recipe, so this should have 0 difference in prod.
> 
> R=​iannucci@chromium.org
> 
> Bug:
> Change-Id: I1e1129b9748d6647e45eb26892c8e892019fe088
> Reviewed-on: https://chromium-review.googlesource.com/769164
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>

TBR=iannucci@chromium.org,tandrii@chromium.org

Change-Id: I65d7665e45dde539f6436ffe8932319e03f96f25
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/777619
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov f151da9fac bot_update: refactor _git_checkout moving invariants out of the loop.
Bug:
Change-Id: Ie8781f73236e13c0afedf18dacf770d14563ab9f
Reviewed-on: https://chromium-review.googlesource.com/771857
Reviewed-by: Jao-ke Chin-Lee <jchinlee@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov 331a276b54 bot_update: make --output_json required in script invocation.
It's already set by recipe, so this should have 0 difference in prod.

R=iannucci@chromium.org

Bug:
Change-Id: I1e1129b9748d6647e45eb26892c8e892019fe088
Reviewed-on: https://chromium-review.googlesource.com/769164
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov f78690b687 bot_update: refactor hiding ugly revision details into lower layers.
Bug:
Change-Id: Ie1caef2d58dce12bafbbec29fa4a5cc65076626c
Reviewed-on: https://chromium-review.googlesource.com/771856
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Jao-ke Chin-Lee <jchinlee@chromium.org>
7 years ago
Andrii Shyshkalov f062cf21e4 bot_update: refactoring improving variable names.
Change-Id: I36c64bb46b967af00adcf69f2e867fd03204d7c2
Reviewed-on: https://chromium-review.googlesource.com/771910
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Jao-ke Chin-Lee <jchinlee@chromium.org>
7 years ago
Andrii Shyshkalov 1f620f0550 bot_update: refactor giant git_checkout into two.
Change-Id: I2c023a538bfe62955238b39034ed7460286789e5
Reviewed-on: https://chromium-review.googlesource.com/771454
Reviewed-by: Jao-ke Chin-Lee <jchinlee@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov d7e241a22c bot_update: fix minor pylint issues.
Change-Id: I2f500bb8089039e689d5a989eb77f91374528164
Reviewed-on: https://chromium-review.googlesource.com/771381
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Ryan Tseng bb85b3636b bot_update source manifest: fix test_api.py to match the actual output
The test output was incorrect, this matches what it actually should look like.

Bug: 772529
Change-Id: I1ca9ceeb6d6b6f55b2ac7c90667c6a9904d2a43b

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: skia
Recipe-Nontrivial-Roll: release_scripts
Change-Id: I1ca9ceeb6d6b6f55b2ac7c90667c6a9904d2a43b
Reviewed-on: https://chromium-review.googlesource.com/751694
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Ryan Tseng 70dea4270e Reland 2 "bot_update recipe: Upload source manifest"
This relands commit 47b67c426b.
    
Also:
* Fix bot_update.py output of manifest
    
Bug: 772529,776299
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: skiabuildbot
Recipe-Nontrivial-Roll: release_scripts
Recipe-Nontrivial-Roll: skia
Recipe-Nontrivial-Roll: skiabuildbot
Recipe-Nontrivial-Roll: build

Change-Id: I31828ea5bfbc284623be8e553980f83d0889de92
Reviewed-on: https://chromium-review.googlesource.com/748308
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
7 years ago
Ryan Tseng 5d790d53ea Revert "Reland "bot_update recipe: Upload source manifest""
This reverts commit 47b67c426b.

Reason for revert: Bug in bot_update.py resource, breaks recipe roller.

Original change's description:
> Reland "bot_update recipe: Upload source manifest"
> 
> This reverts commit c3d1208d5c.
> 
> Also:
> * Instead of replacing "manifest", just add a new "source_manifest" 
> to the output JSON.  This allow transition without breakage.
> * Change the test api so test for recipe output changes.
> 
> The plan is to land this first, switch all downstream to "source_manifest",
> and then remove the original "manifest" key.
> 
> Bug: 772529,776299
> Change-Id: Iffb75f18046f8e4c058afe077872d4257b9dd754
> Recipe-Nontrivial-Roll: infra
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Recipe-Nontrivial-Roll: skiabuildbot
> Recipe-Nontrivial-Roll: release_scripts
> Recipe-Nontrivial-Roll: skia
> Recipe-Nontrivial-Roll: skiabuildbot
> Recipe-Nontrivial-Roll: build
> Reviewed-on: https://chromium-review.googlesource.com/731378
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Ryan Tseng <hinoka@chromium.org>

TBR=iannucci@chromium.org,hinoka@chromium.org

Change-Id: I7a4ee904075e8b75b8a47f9ef0cd8a633af85a9c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 772529, 776299
Reviewed-on: https://chromium-review.googlesource.com/748312
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
7 years ago
Ryan Tseng 47b67c426b Reland "bot_update recipe: Upload source manifest"
This reverts commit c3d1208d5c.

Also:
* Instead of replacing "manifest", just add a new "source_manifest" 
to the output JSON.  This allow transition without breakage.
* Change the test api so test for recipe output changes.

The plan is to land this first, switch all downstream to "source_manifest",
and then remove the original "manifest" key.

Bug: 772529,776299
Change-Id: Iffb75f18046f8e4c058afe077872d4257b9dd754
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: skiabuildbot
Recipe-Nontrivial-Roll: release_scripts
Recipe-Nontrivial-Roll: skia
Recipe-Nontrivial-Roll: skiabuildbot
Recipe-Nontrivial-Roll: build
Reviewed-on: https://chromium-review.googlesource.com/731378
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
7 years ago
Jao-ke Chin-Lee 3cf028ea0f [bot_update] Only kick in deadline after the first try.
If the revision has not yet propagated, then we never retry, because the amount of time to fetch HEAD already exceeds the deadline.

Bug: 771007
Change-Id: I91ac30b2b53b4f75729357b3298c52856a4d350e
Reviewed-on: https://chromium-review.googlesource.com/729328
Commit-Queue: Jao-ke Chin-Lee <jchinlee@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Michael Achenbach c3d1208d5c Revert "bot_update recipe: Upload source manifest"
This reverts commit 037f9b80bb.

Reason for revert: The structural change to manifest breaks the recipe
tester:
https://cs.chromium.org/chromium/infra/recipes/recipes/recipe_roll_tryjob.py?q=recipe_roll_tryjob.py&sq=package:chromium&dr&l=149
https://crbug.com/776299

Original change's description:
> bot_update recipe: Upload source manifest
> 
> Bug: 772529
> Change-Id: I3f833740ddfbc71be42b140c99dcd4bbfeed54fe
> Reviewed-on: https://chromium-review.googlesource.com/706071
> Commit-Queue: Ryan Tseng <hinoka@chromium.org>
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>

TBR=iannucci@chromium.org,hinoka@chromium.org,agable@chromium.org

Change-Id: Iba9653d73b7f117ca2f94619ae5da900cd0c8c98
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 772529,776299
Reviewed-on: https://chromium-review.googlesource.com/728059
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
7 years ago
Ryan Tseng 037f9b80bb bot_update recipe: Upload source manifest
Bug: 772529
Change-Id: I3f833740ddfbc71be42b140c99dcd4bbfeed54fe
Reviewed-on: https://chromium-review.googlesource.com/706071
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Vadim Shtayura 08049e2db2 Revert "git_cache: Remove locks"
This reverts commit c3eb3fa335.

Reason for revert: lots of "runhooks" failure everywhere

Example: https://build.chromium.org/p/chromium.linux/builders/Linux%20Builder/builds/92720

Original change's description:
> git_cache: Remove locks
> 
> These aren't in use, and the original problem they were
> meant to solve has been solved at the gclient.py layer 
> using resource locking:
>   https://codereview.chromium.org/2049583003
> 
> Bug: 773008
> Change-Id: I6609f39d7f15604e0bb3d742a41c4f9fec87a57a
> Reviewed-on: https://chromium-review.googlesource.com/707728
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Ryan Tseng <hinoka@chromium.org>

TBR=iannucci@chromium.org,hinoka@chromium.org,agable@chromium.org,phajdan.jr@chromium.org

Change-Id: I31d5fef94f39f3a9f97b9e59121073b1f433d11e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 773008
Reviewed-on: https://chromium-review.googlesource.com/711054
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
8 years ago
Ryan Tseng c3eb3fa335 git_cache: Remove locks
These aren't in use, and the original problem they were
meant to solve has been solved at the gclient.py layer 
using resource locking:
  https://codereview.chromium.org/2049583003

Bug: 773008
Change-Id: I6609f39d7f15604e0bb3d742a41c4f9fec87a57a
Reviewed-on: https://chromium-review.googlesource.com/707728
Reviewed-by: Aaron Gable <agable@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
8 years ago
Aaron Gable a16ccaf11a bot_update: use patch repo instead of project if it is mapped
This is a step away from patch_project, which was a holdover
from Rietveld. Instead of mapping "projects" (which are
poorly-defined and not guaranteed to be unique) to subpaths,
instead map repository urls (which are at least unique).

Eventually we may be able to compute this directly from DEPS
instead of hardcoding the mapping here, but at least this is
a step in the right direction.

Bug: 765633
Change-Id: Idd65984fc6edefcbedb0438d38c2338b10b7e8e5
Reviewed-on: https://chromium-review.googlesource.com/690776
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Edward Lemur 410907fe59 WebRTC: Remove hack in bot_update.py.
Bug: 765633
Change-Id: I8f2a9ba807fbe176695a7d44467f3948eea07fda
Reviewed-on: https://chromium-review.googlesource.com/668446
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
8 years ago
Dan Jacques 82aeb5bd13 [bot_update] Print Python version.
Print the Python version during "bot_update". This is useful for
visually auditing the environment in which things are running.

BUG=None
TEST=None
R=iannucci@chromium.org

Change-Id: I92be8a888e6f1e5c17205665dff36378e641cd81
Reviewed-on: https://chromium-review.googlesource.com/636450
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Daniel Jacques <dnj@chromium.org>
8 years ago
John Budorick cba3ea7973 Generalize git index refresh to bot_update. (RELAND)
Reland of https://chromium-review.googlesource.com/c/580327/

TBR=iannucci@chromium.org
Bug: 746763
Change-Id: Icc3be87faa6c614a09b7406ce6e748abb2ad82da
Reviewed-on: https://chromium-review.googlesource.com/581268
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
8 years ago
Michael Achenbach c14b4f1518 Fix bot_update default value for empty revision
Bug: 753297
Change-Id: I31c031ce1efa3a1a7d30fd7eeb71d3e4b3baa720
Reviewed-on: https://chromium-review.googlesource.com/605609
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
8 years ago
Sergey Berezin 8038dfe3be bot_update recipe: parameterize step name in apply_gerrit_ref
Needed for parity with Rietveld two-sided patch application.

BUG=628259
R=agable@chromium.org

Change-Id: I79221f54e89a9291257a71b70cc52acc51167854
Reviewed-on: https://chromium-review.googlesource.com/591047
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Sergey Berezin <sergeyberezin@chromium.org>
8 years ago
Sergey Berezin 5aa5cd76f0 depot_tools: add gerrit repo and ref to apply_gerrit_ref()
The only user of this method needs to apply two patches from two
different repos in a try job. Extending the method to handle this.

BUG=628259
R=agable@chromium.org

Change-Id: Ia119780d1323add0094631e5c291b0e7a573e6e5
Reviewed-on: https://chromium-review.googlesource.com/588008
Commit-Queue: Sergey Berezin <sergeyberezin@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
8 years ago
John Budorick a3a515a470 Revert "Generalize git index refresh to bot_update."
This reverts commit 06e1aa0769.

Reason for revert: blocking Skia roll, at least.

Original change's description:
> Generalize git index refresh to bot_update.
> 
> Bug: 746763
> Change-Id: Id0cc8fd672421fe4049334077c6d1e63800524ee
> Reviewed-on: https://chromium-review.googlesource.com/580327
> Commit-Queue: John Budorick <jbudorick@chromium.org>
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>

TBR=iannucci@chromium.org,dpranke@chromium.org,jbudorick@chromium.org

Change-Id: I834e2acd17417c95d42e18fa26bba822c6f67007
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 746763
Reviewed-on: https://chromium-review.googlesource.com/580767
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
8 years ago
John Budorick 06e1aa0769 Generalize git index refresh to bot_update.
Bug: 746763
Change-Id: Id0cc8fd672421fe4049334077c6d1e63800524ee
Reviewed-on: https://chromium-review.googlesource.com/580327
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Michael Achenbach 98681d113f Remove obsolete destination-branch-check flag
This was removed in downstream recipes after it was turned on by default.

Bug: 740456
Change-Id: Idae1905af97333970c8b31508634f8b71550c6f9
Reviewed-on: https://chromium-review.googlesource.com/574030
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
8 years ago
Michael Achenbach 8aa774cfb0 Fix bot_update example
This adds angle to the got_revision_mapping to take account of the checked
out revision and use it correctly in the without-patch application.

This just adds the got_revision property to all test cases in the output
and fixes the second bot_update run of two angle test cases.

Bug: 740456
Change-Id: I6ae6bf627653280bc2a94230ec77949411dc4331
Reviewed-on: https://chromium-review.googlesource.com/573741
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
8 years ago
Michael Achenbach f3d5a1147f Enable Gerrit-destination-branch check by default
Bug: 740456
Change-Id: Ib078d6aef7286bbe945513a5818e185d34f52058
Reviewed-on: https://chromium-review.googlesource.com/571802
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
8 years ago
Michael Achenbach 02e59414c1 Fix bot_update's usage of the destination branch
The previously passed branch:HEAD notation is understood by bot_update
for the main project, but not by gclient for deps'ed projects.

We don't need the colon notation at all as passing a branch implies
using the HEAD of that branch.

Bug: 740456
Change-Id: I95eb88f0de2e06bee8a3e7db24c4ad85cdb76d3e
Reviewed-on: https://chromium-review.googlesource.com/566866
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
8 years ago
Michael Achenbach 7dadf05dad Query Gerrit for destination branch in bot_update
This makes bot_update query Gerrit when syncing for Gerrit tryjobs.

The query will establish the actual destination branch of the CL,
which can be different from master (e.g. a feature branch).

Bot_update will ensure to use this destination branch for the repo
that corresponds to the CL's project. Both the main project or a
deps'ed project work.

Initially, this lives behind a flag that can be controlled in
downstream recipes. Eventually we'll set this to default after a
gradual roll-out.

Branches in branch-heads are not supported yet.

Bug: 740456
Change-Id: I4a0d50e2ca8fe90f8d29964a3ffab17291f7be60
Reviewed-on: https://chromium-review.googlesource.com/566824
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Dan Jacques 70b3f3aae5 [bot_update] Pass spec as file.
"bot_update" currently passes a full "gclient" specification as a
command-line argument to "bot_update.py". This file contains all sorts
of junk that clutters the command-line, and revealed a batch file
escaping bug that seems to be present in the recipe engine. Change this
so that "bot_update" passes the spec as file content instead of a
command-line flag.

Also, "bot_update" apparently called "--spec", which optparse kindly
recognized as the real flag, "--specs". This has always(?) been a bug,
and is no longer a problem.

BUG=chromium:738348
TEST=expectations

Change-Id: I5324b94dd5ef78503e7cfdc28b5fde8f434e4359
Reviewed-on: https://chromium-review.googlesource.com/558207
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Daniel Jacques <dnj@chromium.org>
8 years ago
Dan Jacques dc598e8223 [bot_update] Prefix PATH, cleanup.
Prefix "depot_tools" to PATH instead of appending. This will ensure that
"depot_tools" pulls resources from the recipe checkout as a preference,
not as a last resort.

Use "env_prefixes" instead of "env" to prefix PATH.

Remove Git speed limit settings, which are taken care of by the Git
wrapper now.

BUG=chromium:738176
TEST=expectations
R=hinoka@chromium.org, iannucci@chromium.org

Change-Id: I2e509a331266e867be323bc70e3bc0f08f85246f
Reviewed-on: https://chromium-review.googlesource.com/556287
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Commit-Queue: Daniel Jacques <dnj@chromium.org>
8 years ago
Dan Jacques 59a74ed558 Add cleanup dir, use with bot_update.
Currently, "bot_update" relies on a BuildBot cleanup mechanism and, to a
lesser extent, the standard BuildBot directory layout. Both of these are
problematic when projecting it into other circumstances, notably
"remote_run" and LUCI.

Have "bot_update" handle its own cleanup. It will now choose a cleanup
directory within the hierarchy of its checkout, and explicitly purge it
prior to execution if it exists. This enforces its expected behavior in
all circumstances and removes its expectations of the greater checkout
layout.

Export "cleanup_dir" via "infra_paths" to point to "build.dead" when
running on BuildBot builds. Otherwise, it is a default directory which,
on Kitchen, is ephemeral by design.

BUG=chromium:725631
TEST=expectations

Change-Id: I664434c542a25aaa7ff3eac216208a2425730fde
Reviewed-on: https://chromium-review.googlesource.com/528057
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Dave Tu f1631cd003 [bot_update] Remove extraneous slash in revision parsing.
`parsed_root.path` already contains the leading slash in the the URL, so adding
an additional slash gives an incorrect URL.

Change-Id: I84f04179356bb132a31531232a5c30c7808f7c1b
Reviewed-on: https://chromium-review.googlesource.com/520724
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: David Tu <dtu@chromium.org>
8 years ago
Robert Iannucci 56038f517d rename example.py -> examples/full.py for all modules
R=dnj@chromium.org, nodir@chromium.org, phajdan.jr@chromium.org

Bug:
Change-Id: I47d8f9311b6ee71583fb989888a1e4d28b5495df
Reviewed-on: https://chromium-review.googlesource.com/520731
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
8 years ago
Paweł Hajdan, Jr 6cfe8d4301 Add disable_syntax_validation gclient config to easily whitelist builders
Bug: 570091
Change-Id: Icb15bcd354c9b524674c6b4496f430c26cf7b89e
Reviewed-on: https://chromium-review.googlesource.com/521482
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
recipe-roller 37f51493cb Roll recipe dependencies (nontrivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


Please review the expectation changes, and LGTM+CQ.


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
recipe_engine:
  https://crrev.com/458ce956c9d91d184e0107c5fa6b34a8267b8e9b [step_runner] run _merge_envs in simulation too. (iannucci@chromium.org)


R=martiniss@chromium.org, phajdan.jr@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I0d60499b06718827776739eb0413a79baa15cd9e
Reviewed-on: https://chromium-review.googlesource.com/520462
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Paweł Hajdan, Jr c515a8bc46 bot_update: expose --disable-syntax-validation to recipes
Some recipes interacting with older revisions (e.g. bisect)
will need this.

Bug: 570091
Change-Id: I38e5ffa2db1a9bfae3667f015f00977c32ebe51e
Reviewed-on: https://chromium-review.googlesource.com/519407
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Paweł Hajdan, Jr 16d2ae8cb0 bot_update: fix regression with swallowed exception
This was regressed in https://chromium-review.googlesource.com/475950

Downstream regression test added in https://chromium-review.googlesource.com/c/508697/

Bug: 723572
Change-Id: I44dbaf9e4996388b898359141db879bd0a1023d9
Reviewed-on: https://chromium-review.googlesource.com/508790
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago
Dan Jacques 7adb584516 [bot_update] Remove retry logic.
Retries are no longer necessary, since the Git wrapper will retry all
transient Git operations.

BUG=None
TEST=None
R=hinoka@chromium.org, iannucci@chromium.org

Change-Id: I18f066004992c98e54665833360944cc7d6550cc
Reviewed-on: https://chromium-review.googlesource.com/506375
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
8 years ago
Andrii Shyshkalov 90e958b3b8 bot_update: set fake user.{name,email} when running rebase.
R=agable@chromium.org,sergeyberezin@chromium.org,iannucci@chromium.org
BUG=722853

Change-Id: I9bd8c259a87cc65e320e99d9c5e18838b970d543
Reviewed-on: https://chromium-review.googlesource.com/505495
Reviewed-by: Sergey Berezin <sergeyberezin@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
8 years ago
Dan Jacques a3ba888db8 [bot_update] Remove "git retry" call.
The Git wrapper now implicitly retries, so this call is unnecessary.

BUG=chromium:721450
TEST=None
R=hinoka@chromium.org, iannucci@chromium.org

Change-Id: I79e42aa050f6fec14506b685d379a76e8296fea3
Reviewed-on: https://chromium-review.googlesource.com/506493
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Daniel Jacques <dnj@chromium.org>
8 years ago
Robert Iannucci 5702f0baef [recipes] convert all recipe_modules to use new context module.
R=recipe-roller@chromium.org

Bug:
Change-Id: I84c19965b779f1010c00cd8c857b7533eec7413f
Reviewed-on: https://chromium-review.googlesource.com/502929
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Andrii Shyshkalov 04b51d6de0 Reland of Relax git_footers parsing to match that of Gerrit (JGit).
Previously landed as:
> Change-Id: Ieb6415d55e85b91f11f9052b0fd08cf982b64d51
> Reviewed-on: https://chromium-review.googlesource.com/501849

R=agable@chromium.org,machenbach@chromium.org

Bug: 717504
Change-Id: Iede5c29ff4c317b68d8c2bca319edec140a176f5
Reviewed-on: https://chromium-review.googlesource.com/502908
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
8 years ago
Andrii Shyshkalov 43ec62ec71 Revert "Relax git_footers parsing to match that of Gerrit (JGit)."
This reverts commit 28a5d5defd.

Reason for revert: breaks assumption in function for adding footers

Original change's description:
> Relax git_footers parsing to match that of Gerrit (JGit).
> 
> R=​agable@chromium.org
> 
> Bug: 717504
> Change-Id: Ieb6415d55e85b91f11f9052b0fd08cf982b64d51
> Reviewed-on: https://chromium-review.googlesource.com/501849
> Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>
> 

TBR=agable@chromium.org,machenbach@chromium.org,tandrii@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Bug: 717504

Change-Id: I9b4d619b2972be8434aff9464f1959fbcb3abd32
Reviewed-on: https://chromium-review.googlesource.com/503030
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 28a5d5defd Relax git_footers parsing to match that of Gerrit (JGit).
R=agable@chromium.org

Bug: 717504
Change-Id: Ieb6415d55e85b91f11f9052b0fd08cf982b64d51
Reviewed-on: https://chromium-review.googlesource.com/501849
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
8 years ago
Robert Iannucci ff51bcd1f8 [bot_update] fix Property default to be actual JSON.
R=dnj@chromium.org

Bug:
Change-Id: I18eb355282f2efc067a6dc70e1136f9a49d3488a
Reviewed-on: https://chromium-review.googlesource.com/494306
Reviewed-by: Daniel Jacques <dnj@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Andrii Shyshkalov e0a1afbf4b Fix bot_update parsing of gerrit footers with empty values.
Follow up based on https://chromium-review.googlesource.com/487963

R=agable@chromium.org, machenbach@chromium.org, maruel@chromium.org

Bug: 715614,717504
Change-Id: I0902647c8fa8a2ff9643890c029fc8b75a72ff7e
Reviewed-on: https://chromium-review.googlesource.com/493466
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
8 years ago
Michael Achenbach 644a1d87e6 Stop passing deprecated manifest flag to bot_update
The flag has been deprecated in:
https://chromium-review.googlesource.com/c/486640

This is a separate CL for the expectation changes.

Bug: 398105
Change-Id: I129186323e5ecffe441febe7fa3c6c72bfc9c4cd
Reviewed-on: https://chromium-review.googlesource.com/486782
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
8 years ago
Michael Achenbach 86989d7b0f Reland "Remove obsolete bot_update flag"
This reverts commit c91686c087.

Reason for revert: Reland a light version of the original CL that keeps a dummy flag around.

Original change's description:
> Revert "Remove obsolete bot_update flag"
> 
> This reverts commit 72048266d5.
> 
> Reason for revert: Skia depends on it. Need to clean that up first. Currently blocks roll:
> https://skia-review.googlesource.com/c/14145/
> 
> Original change's description:
> > Remove obsolete bot_update flag
> > 
> > Using the manifest is the default since a long time. The flag was only introduced to smoothly switch it on. Now the flag is not needed anymore.
> > 
> > Bug: 398105
> > Change-Id: I4eb1c98e26e025a69f8b0a7c48877d78c031702e
> > Reviewed-on: https://chromium-review.googlesource.com/485659
> > Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
> > Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
> > Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> > 
> 
> TBR=phajdan.jr@chromium.org,machenbach@chromium.org,tandrii@chromium.org,sergiyb@chromium.org,chromium-reviews@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: Iffc4d8076abd3c92feebfd7f3ef88be7ce34b692
> Reviewed-on: https://chromium-review.googlesource.com/486639
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> 

R=phajdan.jr@chromium.org,machenbach@chromium.org,tandrii@chromium.org,sergiyb@chromium.org,chromium-reviews@chromium.org
Bug: 398105

Change-Id: I817d446f8a8eff84c5d7143ac2b9c527a40991f1
Reviewed-on: https://chromium-review.googlesource.com/486640
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
8 years ago
recipe-roller e4a7a0427b Roll recipe dependencies (nontrivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


Please review the expectation changes, and LGTM+CQ.


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
recipe_engine:
  https://crrev.com/944125e6d1e8c831d09517bde658a38d8f81db37 Sort step presentation properties (machenbach@chromium.org)


R=martiniss@chromium.org, phajdan.jr@chromium.org

Change-Id: Iec279f8331bd0e7673ce785c3095714bc5cfe401
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Reviewed-on: https://chromium-review.googlesource.com/486600
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Michael Achenbach c91686c087 Revert "Remove obsolete bot_update flag"
This reverts commit 72048266d5.

Reason for revert: Skia depends on it. Need to clean that up first. Currently blocks roll:
https://skia-review.googlesource.com/c/14145/

Original change's description:
> Remove obsolete bot_update flag
> 
> Using the manifest is the default since a long time. The flag was only introduced to smoothly switch it on. Now the flag is not needed anymore.
> 
> Bug: 398105
> Change-Id: I4eb1c98e26e025a69f8b0a7c48877d78c031702e
> Reviewed-on: https://chromium-review.googlesource.com/485659
> Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
> Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> 

TBR=phajdan.jr@chromium.org,machenbach@chromium.org,tandrii@chromium.org,sergiyb@chromium.org,chromium-reviews@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Iffc4d8076abd3c92feebfd7f3ef88be7ce34b692
Reviewed-on: https://chromium-review.googlesource.com/486639
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
8 years ago
Michael Achenbach 72048266d5 Remove obsolete bot_update flag
Using the manifest is the default since a long time. The flag was only introduced to smoothly switch it on. Now the flag is not needed anymore.

Bug: 398105
Change-Id: I4eb1c98e26e025a69f8b0a7c48877d78c031702e
Reviewed-on: https://chromium-review.googlesource.com/485659
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
8 years ago
Michael Achenbach 521c9ed147 Support overriding gclient config in a bot_update method
Bug: 713356
TBR=tandrii@chromium.org

Change-Id: I15d73492712b66c7670793f3c47e4cbd89d4e1cd
Reviewed-on: https://chromium-review.googlesource.com/484440
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
8 years ago
Michael Achenbach 93f69da3b2 Support merging got_revision mappings during transition phase.
A few rare recipes use two or more solutions side-by-side.

This allows switching one solution in isolation to use the new mapping.

Bug: 713356
Change-Id: Id51f2f777681401843004577a4de65a6c5d1e4a6
Reviewed-on: https://chromium-review.googlesource.com/484341
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Michael Achenbach 81b4d420bf Reverse got_revision_mapping in bot_update
This is the first step in reversing got_revision_mapping.

This CL:
- Adds a new configuration got_revision_reverse_mapping.
- Ensures only the old or the new configuration is used.
- Transforms the old to the new configuration within bot_update.

In follow up CLs we will migrate all clients to the new mapping, then delete the old and rename the new again.

Bug: 713356
Change-Id: Icdbd6a3748c6e5399b9c4867a3d8292973325160
Reviewed-on: https://chromium-review.googlesource.com/483479
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Nodir Turakulov a7ba43a3a8 Revert "bot_update: pin depot_tools"
This reverts commit e8acd40a11.

Reason for revert: broke windows builds :(

Original change's description:
> bot_update: pin depot_tools
> 
> gclient runhooks often calls scripts that depend on scripts in depot_tools.
> Currently bot_update only ensures that depot_tools is present in $PATH, but
> otherwise uses whatever depot_tools already specified in $PATH. We don't pin
> depot_tools before running a recipe, so using whatever depot_tools in $PATH
> is not hermetic.
> 
> Insert the path to the pinned depot_tools to the beginning of $PATH
> 
> R=​iannucci@chromium.org
> 
> Bug:
> 
> Change-Id: I31d04ba2ec7c409f89d58a51502ce3565e3a02a1
> Reviewed-on: https://chromium-review.googlesource.com/481072
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Nodir Turakulov <nodir@chromium.org>
> 

TBR=iannucci@chromium.org,nodir@chromium.org,phajdan.jr@chromium.org,chromium-reviews@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I1a70f0f54e9b9cea7fc2f9897e62f558204a4684
Reviewed-on: https://chromium-review.googlesource.com/481440
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
8 years ago
Nodir Turakulov e8acd40a11 bot_update: pin depot_tools
gclient runhooks often calls scripts that depend on scripts in depot_tools.
Currently bot_update only ensures that depot_tools is present in $PATH, but
otherwise uses whatever depot_tools already specified in $PATH. We don't pin
depot_tools before running a recipe, so using whatever depot_tools in $PATH
is not hermetic.

Insert the path to the pinned depot_tools to the beginning of $PATH

R=iannucci@chromium.org

Bug:

Change-Id: I31d04ba2ec7c409f89d58a51502ce3565e3a02a1
Reviewed-on: https://chromium-review.googlesource.com/481072
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
8 years ago
Dan Jacques 8dd4edae99 bot_update: Show failed patch in "Patch Failure".
Have "bot_update.py" export the failing patch body in its JSON. Have the
recipe actually emit the patch body in the "Patch Failure" step instead
of the "bot_update" step, and remove the "Patch Failure" step's
indirection to the "bot_update" step for patch failure.

This will provide a more straightforward user interface: the red step
that says "Patch Failure" now includes the details of the patch failure!

BUG=chromium:710477
TEST=expectations

Change-Id: I6ad305f0b972de89e4f0b5eb70edf41980447abd
Reviewed-on: https://chromium-review.googlesource.com/475950
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
8 years ago
Paweł Hajdan, Jr f4597a4f91 bot_update: add with_tags argument to ensure_checkout
Bug: 710817
Change-Id: Ifb2a9abe605d9e403c55ec1360d186af12dd2f34
Reviewed-on: https://chromium-review.googlesource.com/475775
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 7ac2c9a292 bot_update: add --with_tags switch
Bug: 710817
Change-Id: Ice7cefaf5c5a5cac431a95d3adfa44f323eafb2f
Reviewed-on: https://chromium-review.googlesource.com/475230
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago