Commit Graph

178 Commits (b56b6543221b45d9ada8a0b08ca808ac7bb210f4)

Author SHA1 Message Date
Yiwei Zhang b56b654322 bot_update: fix the check for is running on linux
Since python3.3, the platform value has been changed from linux2 or
linux3 to linux. The bug has stopped bot_update script from emitting
proces tree periodically that will be helpful when debugging.

R=sokcevic

Bug: 1455926
Change-Id: Id6ab4ddf46eaa322a8b5470baa7ba6cc656a6bb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4654290
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
2 years ago
Aravind Vasudevan 12b45d719a Reland "Add git_cache epoch to bot_update output.properties"
This reverts commit ede859f9ee.

Reason for revert: This change includes a fix for the missing path issue. if the `cache_path` doesn't exist, it runs os.mkdirs before setting the cache epoch marker.

Original change's description:
> Revert "Add git_cache epoch to bot_update output.properties"
>
> This reverts commit 867d3267c1.
>
> Reason for revert: breaks some builders, https://crbug.com/1448769#c5
>
> Original change's description:
> > Add git_cache epoch to bot_update output.properties
> >
> > This change adds git cache's epoch timestamp to bot_update's output.properties. It achieves this by adding a marker file to the cache directory which stores the epoch time.
> >
> > Design: go/query-bot-update-cache-age
> >
> > Bug: 1448769
> > Change-Id: I610c6bca5ced7e2a0fe3ee8570decf0f135fe54c
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4563726
> > Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> > Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
>
> Bug: 1448769
> Change-Id: I29db9ac364a9cf1d615b00ed75c1346e56b3f3b6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4582291
> Commit-Queue: Gavin Mak <gavinmak@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>

Bug: 1448769
Change-Id: Ia6fd5b27f7556dd81f65011364506d3aa535de62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4583007
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
2 years ago
Gavin Mak ede859f9ee Revert "Add git_cache epoch to bot_update output.properties"
This reverts commit 867d3267c1.

Reason for revert: breaks some builders, https://crbug.com/1448769#c5

Original change's description:
> Add git_cache epoch to bot_update output.properties
>
> This change adds git cache's epoch timestamp to bot_update's output.properties. It achieves this by adding a marker file to the cache directory which stores the epoch time.
>
> Design: go/query-bot-update-cache-age
>
> Bug: 1448769
> Change-Id: I610c6bca5ced7e2a0fe3ee8570decf0f135fe54c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4563726
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>

Bug: 1448769
Change-Id: I29db9ac364a9cf1d615b00ed75c1346e56b3f3b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4582291
Commit-Queue: Gavin Mak <gavinmak@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
2 years ago
Aravind Vasudevan 867d3267c1 Add git_cache epoch to bot_update output.properties
This change adds git cache's epoch timestamp to bot_update's output.properties. It achieves this by adding a marker file to the cache directory which stores the epoch time.

Design: go/query-bot-update-cache-age

Bug: 1448769
Change-Id: I610c6bca5ced7e2a0fe3ee8570decf0f135fe54c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4563726
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
2 years ago
Joanna Wang fd9cea79c1 Use --upstream when calling bot_update (passed to gclient sync).
Should resolve this flaky issue in infra-try builds : https://ci.chromium.org/ui/p/infra/builders/try/infra-try-bionic-64/b8783448305870388449/overview

in logs we see

'''
________ running 'git reset --hard HEAD' in '/b/s/w/ir/cache/builder/infra'
[0:00:02] HEAD is now at 64b4e8f867 Committed patch
[0:00:03] Finished running: git -c core.quotePath=false status --porcelain
[0:00:03] Attempting rebase onto d94466a8462dd19c2a3fc0ca173fd1c89a1f3f28...
[0:00:04] Current branch tmp_checkin_branch is up to date.
[0:00:04] Finished running: git rev-parse HEAD
Checked out revision 64b4e8f867c7b8757438b7e64985654d80a3b135
'''
64b4e8f867 is not a valid infra/infra commit. It is a local commit created from the patch of the last try-job run.

Prior to switching recipes to infra_superproject, we have been depending on https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:recipes/recipe_modules/bot_update/resources/bot_update.py;l=753;drc=489304d94984bb006a03e842cf2c171c73e7d367 to bring the checkout back to a valid remote infra/infra commit before we get to `gclient sync`. But with infra_superproject as the new root solution, `git checkout --force <pin>` runs for infra_superproject.

'git reset --hard HEAD' is coming from:
https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:gclient_scm.py;l=786-791;drc=cf4658579326856b9b25cfe2efbfc8683af88814

This is noop. The previous patch commit IS HEAD.

With --upstream we get: `git reset --hard refs/remotes/origin/main`


Bug: 1421776, 1434522
Change-Id: I0d192a160fcc7c3d405765e2e03e05aeb60f6875
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4445126
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
2 years ago
Joanna Wang 489304d949 Use os.renames() in remove() to auto-create subdirectories.
Bug: 1415507
Change-Id: Ie52123dc0844639116b55bc7f6a2734aaf7df33e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4378417
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
2 years ago
Joanna Wang df528a9d7a Fix multiple endswith values.
Bug: 1421776
Change-Id: I6ca45a7aa086da4356302a7b9aa588bf60888129
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4375877
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
2 years ago
Joanna Wang d9717259ee Adjust bot_update recipes to work with infra_superproject context.
Bug: 1415507
Change-Id: I0774eb4f2b7ea43b04a715c295f89e3adda6a9aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4347772
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
2 years ago
Aravind Vasudevan 214e1b269d Revert "Reset origin/HEAD when it points to master"
This reverts commit 19794fe91f.

Reason for revert: Doesn't fix the cache.

Original change's description:
> Reset origin/HEAD when it points to master
>
> This change tries resetting origin/HEAD when it points to master and the ref cannot be found. Post master->main migration, some cached repositories seem to point origin/HEAD to master.
>
> Bug: 1418866
> Change-Id: I83942901b105cace4d51deeac7e400f98d200168
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4296441
> Reviewed-by: Fumitoshi Ukai <ukai@google.com>
> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>

Bug: 1418866
Change-Id: I4c912f8401afb6fb0c2149c277778bdee9fa5d76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4304240
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2 years ago
Aravind Vasudevan 19794fe91f Reset origin/HEAD when it points to master
This change tries resetting origin/HEAD when it points to master and the ref cannot be found. Post master->main migration, some cached repositories seem to point origin/HEAD to master.

Bug: 1418866
Change-Id: I83942901b105cace4d51deeac7e400f98d200168
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4296441
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Joanna Wang 96b57b9b59 [no-sync] bot_update: Remove previous no-sync exp changes and implement new one.
Bug: 1339472
Change-Id: I250dd72dd806d26ba6cbe213280ecd65fbc66123
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3789864
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
3 years ago
Ravi Mistry f7e510b2f7 Add download-topics support to bot_update
Tested by:
* `python recipes.py test run`
* Tested end-to-end by patching in this unsubmitted change in Skia's recipes with https://skia-review.googlesource.com/c/skia/+/532768

Bug: chromium:1319415
Change-Id: Ia1c9c495ef6482b3fdb494e1c1c9320541bcd0c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3602901
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Ravi Mistry <rmistry@chromium.org>
3 years ago
Josip Sokcevic a59e9ea222 Revert "Remove unused functionality in bot_update.py"
This reverts commit 8b64ddec2a.

Reason for revert: it appears we need this, since .DEPS.git
specifies custom dependencies needed for tryjob.

Original change's description:
> Remove unused functionality in bot_update.py
>
> .DEPS.git has been removed in 2014 and no longer supported. It was
> deleted in https://codereview.chromium.org/497313003 (August 2014). Last
> entry in chromium/src is from tag 44.0.2403.47 in June 2015.
>
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited
> Recipe-Nontrivial-Roll: chrome_release
> Recipe-Nontrivial-Roll: chromiumos
> Recipe-Nontrivial-Roll: infra
> Change-Id: I3ffb8813af867df959098c02d399c8d745894aae
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3439573
> Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>

Change-Id: I36bcd352a984b4b762096197a384e86347418290
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3448707
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
3 years ago
Josip Sokcevic 8b64ddec2a Remove unused functionality in bot_update.py
.DEPS.git has been removed in 2014 and no longer supported. It was
deleted in https://codereview.chromium.org/497313003 (August 2014). Last
entry in chromium/src is from tag 44.0.2403.47 in June 2015.

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: I3ffb8813af867df959098c02d399c8d745894aae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3439573
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Josip Sokcevic ed6aa2b0e8 Reland "Use py3 in bot_update and gclient recipe_modules"
This is a reland of bb88492ff3

Original change's description:
> Use py3 in bot_update and gclient recipe_modules
>
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited
> Recipe-Nontrivial-Roll: chrome_release
> Recipe-Nontrivial-Roll: chromiumos
> Recipe-Nontrivial-Roll: infra
> Bug: 1289280
> Change-Id: Id61bacf4acef319f7ea22161081b632677ca363c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3402082
> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Bug: 1289280, 1289504
Change-Id: I2f2f7244568b1fdfb960d5cdfa3937175ac1ed2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3414742
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Josip Sokcevic 9a4db25b50 Remove deprecated parameters
Those paremeters are deprected for over 4 years now. I found no usages
while searching for output_manifest in source.chromium.org.

R=machenbach@google.com

Bug: 1289274
Change-Id: I7d8f8ee29fdb046b255c96ad26f8dc7129b1f83a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3402741
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
3 years ago
Brian Ryner 6bfbe35cce Revert "Use py3 in bot_update and gclient recipe_modules"
This reverts commit bb88492ff3.

Reason for revert: Broke bot_update: https://logs.chromium.org/logs/infra/buildbucket/cr-buildbucket/8824463357494497185/+/u/bot_update/stdout

Original change's description:
> Use py3 in bot_update and gclient recipe_modules
>
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited
> Recipe-Nontrivial-Roll: chrome_release
> Recipe-Nontrivial-Roll: chromiumos
> Recipe-Nontrivial-Roll: infra
> Bug: 1289280
> Change-Id: Id61bacf4acef319f7ea22161081b632677ca363c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3402082
> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Bug: 1289280
Change-Id: I371d599b17b42edd7b1aae581695e75a80ebae83
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3403476
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Josip Sokcevic bb88492ff3 Use py3 in bot_update and gclient recipe_modules
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Bug: 1289280
Change-Id: Id61bacf4acef319f7ea22161081b632677ca363c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3402082
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Anthony Polito 8676aa925e Give better error message when proc fails to execute.
Change-Id: I9dcbaa6dd287f0a5c2a749cfdf4607bddbf04734
BUG: 1274851
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3307919
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Anthony Polito <apolito@google.com>
3 years ago
Gavin Mak 5cffc195c9 Don't check refspecs when running git cat-file
bot_update fetches +refs/branch-heads/* but also checks git cat-file -e
+refs/branch-heads/* which fails.

Bug: 1261879
Change-Id: Ic902eebcb7301aeae32e1a8775e3babf9fdedea9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3234885
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
4 years ago
Josip Sokcevic 1efe7c7e7b Use sigkill instead of sigterm on a stale process
Only hanging process recorded so far is gsutil. Sending sigterm doesn't
result in successfully terminating the process. Instead, use sigkill.

R=gavinmak@google.com

Bug: 1255228
Change-Id: Iad354284422676df804c68cb6f18c7db723bf862
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3232250
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
4 years ago
Josip Sokcevic 830c8fadf8 Remove verbose debug information from bot_update
It's generaly not useful and makes it harder to understand bot_update
logs. If we need to debug specific builders, we can set environment
variables in the recipe itself.

R=apolito@google.com

Bug: 1255228
Change-Id: I18fc6ee8cb15b30bc3a4422ddd04979189bacf64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3221250
Commit-Queue: Anthony Polito <apolito@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
4 years ago
Josip Sokcevic 4da8a3d59d Fix bot_update hanging on exception
This change starts observers as soon as possible, and wraps the entire
block that can cause an exception in try..finally. This ensures that we
stop threads are stopped.

If we notice the same behavior, it could be worth to put a cap on number
of executions per observer, and shut the thread down once reached.

R=apolito@google.com

Bug: 1255228
Change-Id: I1f165267460da02b3bbba39022c262e6c29fe86b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3213451
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
4 years ago
Josip Sokcevic 2f6c7fd28a Cache the string-escape codec at bot_update start
It looks the following speculative fix for string-escape codec worked
for depot_tools subprocess2: https://crbug.com/912292#c2.

Using the same approach for bot_update.

R=gavinmak@google.com

Bug: 1255228
Change-Id: I3244d34abad23f9fdbf648e24fc8a565df1474cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3210521
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
4 years ago
Josip Sokcevic afb027530c Revert "Update HEAD when checking out from git cache"
This reverts commit 8031f2ad8d.

Reason for revert: didn't help

Original change's description:
> Update HEAD when checking out from git cache
>
> HEAD may be different than what git cache has. This change ensures the
> correct revision is used.
>
> R=​gavinmak@google.com
>
> Bug: 1251783
> Change-Id: I4909a4d52ef70ee806c285f24693eca5173003d9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3174363
> Auto-Submit: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Gavin Mak <gavinmak@google.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>

Bug: 1251783
Change-Id: I35549e47fc7cd2361321a6e8c6480ec2732215fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3180383
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
4 years ago
Josip Sokcevic 8031f2ad8d Update HEAD when checking out from git cache
HEAD may be different than what git cache has. This change ensures the
correct revision is used.

R=gavinmak@google.com

Bug: 1251783
Change-Id: I4909a4d52ef70ee806c285f24693eca5173003d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3174363
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
4 years ago
Takuto Ikuta cfac7a37d9 recipes: remove unused reference to swarrming_client
Python client is deprecated.

Bug: 984869
Change-Id: I288c5ed24abf0522edaa3b2fb0b236e109d51b1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3117447
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
4 years ago
Gavin Mak f406fda0ae Revert "Fix invalid reference: refs/remotes/origin/HEAD error"
This reverts commit 2b29d0f8e6.

Reason for revert: may be causing crbug/1238425

Original change's description:
> Fix invalid reference: refs/remotes/origin/HEAD error
>
> Change-Id: Iac298a7a14b5c0b55fd199ec120fe5c37ef88fdc
> Bug: 1178944
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2757129
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
> Commit-Queue: Gavin Mak <gavinmak@google.com>

Bug: 1178944, 1238425
Change-Id: I131b8a347486b70289bf78978738e1a64bd460e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3086970
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
4 years ago
Josip Sokcevic ce332a47a9 Use main as default branch in all recipes
Recipe-Manual-Change: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: I89008bc07b1c3de13d9c6dd64e723fe6dc8d01d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3015262
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
4 years ago
Gavin Mak 11f53d6949 Reland "Add python3 support to bot_update recipe module"
This is a reland of edb6e8c51f

Original change's description:
> Add python3 support to bot_update recipe module
>
> Bug: 1227140
> Change-Id: Id4938c966da54957f84f59d0aef0c68c381ad5f6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3016032
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Gavin Mak <gavinmak@google.com>

Bug: 1227140
Change-Id: I2d35d29f87236ce10ecabca41712cf1c90de8136
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3022310
Reviewed-by: Anthony Polito <apolito@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
4 years ago
Gavin Mak f6228e1583 Revert "Add python3 support to bot_update recipe module"
This reverts commit edb6e8c51f.

Reason for revert: missing some py3 changes 

Original change's description:
> Add python3 support to bot_update recipe module
>
> Bug: 1227140
> Change-Id: Id4938c966da54957f84f59d0aef0c68c381ad5f6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3016032
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Gavin Mak <gavinmak@google.com>

Bug: 1227140
Change-Id: If0852908b112ff6bdd4152189c7cb198eebd2c22
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3022309
Auto-Submit: Gavin Mak <gavinmak@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
4 years ago
Gavin Mak edb6e8c51f Add python3 support to bot_update recipe module
Bug: 1227140
Change-Id: Id4938c966da54957f84f59d0aef0c68c381ad5f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3016032
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
4 years ago
Edward Lesmes b508ecd932 bot_update: Initialize synced_solutions before syncing.
If sync fails, synced_solutions is not initialized, resulting in a
use-before-init error.

Bug: 1217352
Change-Id: I2367d0f8030faa571b5c2743d5d97aa4c0329a7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2945663
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Edward Lesmes 9705687c25 bot_update: Add experiment to avoid fetching if checked out revision is recent enough.
If checked-out revision is less than 6 hours old, skip fetching latest
revision.

Bug: 1199853
Change-Id: Ifd2a61055de286fe6fd94a5d43f80a1885a6931c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2911015
Reviewed-by: Erik Staab <estaab@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Edward Lesmes 50cd6e416a Reland "bot_update: Don't use gclient sync output and rely on gclient revinfo."
This is a reland of 856ccef0e9

Use a tempfile instead of stdout for gclient revinfo output

Original change's description:
> bot_update: Don't use gclient sync output and rely on gclient revinfo.
>
> In preparation for skipping gclient sync if there are no DEPS changes.
>
> Bug: 1199853
> Change-Id: Ib9b4ab803bc574a384c661765cee5e4c1de5baae
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2912259
> Reviewed-by: Anthony Polito <apolito@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

Bug: 1199853
Change-Id: Ib50c4e943cbb51e4a2463beee9b7d1dee824ad29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2910950
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Stephen Martinis e2d7d8cd9b Revert "bot_update: Don't use gclient sync output and rely on gclient revinfo."
This reverts commit 856ccef0e9.

Reason for revert: Probably broke chrome os waterfall

Original change's description:
> bot_update: Don't use gclient sync output and rely on gclient revinfo.
>
> In preparation for skipping gclient sync if there are no DEPS changes.
>
> Bug: 1199853
> Change-Id: Ib9b4ab803bc574a384c661765cee5e4c1de5baae
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2912259
> Reviewed-by: Anthony Polito <apolito@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

Bug: 1199853
Change-Id: Ib893704dffc68b02dfa7f977e751e236003b7e0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2910949
Auto-Submit: Stephen Martinis <martiniss@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Avi Drissman <avi@chromium.org>
Commit-Queue: Stephen Martinis <martiniss@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
4 years ago
Edward Lesmes 856ccef0e9 bot_update: Don't use gclient sync output and rely on gclient revinfo.
In preparation for skipping gclient sync if there are no DEPS changes.

Bug: 1199853
Change-Id: Ib9b4ab803bc574a384c661765cee5e4c1de5baae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2912259
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Edward Lesmes 6097a92db0 bot_update: Remove more unused arguments.
Change-Id: I00b32eb109cdff7e138ef5d9497eda77c33188f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2912295
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
4 years ago
Edward Lesmes da8a67b497 bot_update: Remove unused arguments/code.
Change-Id: I4a6811f4dd3c5330eed821acd2dc4855aabcf483
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2911202
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Anthony Polito 542224ebd6 Replace processObservers with a class that doesn't constantly recreate threads
I'm not saying this is why bot_update is failing, but I never trust python threads, especially not at scale. I also think the new implementation is easier to understand and less likely to have subtle mistakes if it is extended later

Change-Id: I29be55594a400fda845ea31893789104373fd0f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2892185
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Anthony Polito <apolito@google.com>
4 years ago
Anthony Polito f7157ceea8 add a big of debugging info to figure out more abour bot_update failures
Change-Id: If324a6af154c4ded3b4c8d5e07a4740722318a59
BUG:1206377
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2889824
Auto-Submit: Anthony Polito <apolito@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
4 years ago
Edward Lesmes 68c71a34e1 bot_update: Set DEPOT_TOOLS_REPORT_BUILD to report bot metrics.
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: chrome_release
Change-Id: I704ac523a3212ea30061948f8a9971a373d5394f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2861214
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
4 years ago
Edward Lesmes 3600164d99 recipes: Specify refs/heads/master instead of origin/master for gclient config.
Bug: 1200657
Change-Id: I9362a66d12d75d26e1236f9d8516b03561fb9383
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2837689
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Edward Lesmes 07a683430c Reland "git-cache: Add option to fetch commits."
This is a reland of 4c67f856f0
Issues should have been fixed by crrev.com/c/2838026

Original change's description:
> git-cache: Add option to fetch commits.
>
> Add option to git cache to fetch commits.
> And use it in bot_update and gclient sync to make sure
> the needed commits are present on the checkout.
>
> Change-Id: I9e90da9e3be6e7bacf714b22bf0b735463e655b6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2829942
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

Change-Id: Ie5a29737f5a75d28bc7c5c2f6cb99ec7f87cd9e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2841046
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Edward Lesmes 93d80d8686 Revert "git-cache: Add option to fetch commits."
This reverts commit 4c67f856f0.

Reason for revert: crbug.com/1200657

Original change's description:
> git-cache: Add option to fetch commits.
>
> Add option to git cache to fetch commits.
> And use it in bot_update and gclient sync to make sure
> the needed commits are present on the checkout.
>
> Change-Id: I9e90da9e3be6e7bacf714b22bf0b735463e655b6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2829942
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

Change-Id: I31a1defb26119bcb46894ab4084d626b65c45fed
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2837413
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
4 years ago
Edward Lesmes 4c67f856f0 git-cache: Add option to fetch commits.
Add option to git cache to fetch commits.
And use it in bot_update and gclient sync to make sure
the needed commits are present on the checkout.

Change-Id: I9e90da9e3be6e7bacf714b22bf0b735463e655b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2829942
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Edward Lesmes 1dbd65b18a bot_update: Fetch required commit/refs directly.
Change-Id: Ie6bee1743859df364025350fc1a607f331346bd7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2825426
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Josip Sokcevic 784f5c890e Revert "Remove TAGS_REFSPEC if no_fetch_tags is true"
This reverts commit 9a94a95e65.

Reason for revert: crbug/1199445

Original change's description:
> Remove TAGS_REFSPEC if no_fetch_tags is true
>
> Bug: 1188627
> Change-Id: I6ee14ee9976b9aab60ce409ddd17f018ad966055
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2797933
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Gavin Mak <gavinmak@google.com>

Bug: 1188627, 1199445
Change-Id: I776639709221d8e0505315c451f847d6cf592b62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2828772
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Gavin Mak 9a94a95e65 Remove TAGS_REFSPEC if no_fetch_tags is true
Bug: 1188627
Change-Id: I6ee14ee9976b9aab60ce409ddd17f018ad966055
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2797933
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
4 years ago
Gavin Mak 2b29d0f8e6 Fix invalid reference: refs/remotes/origin/HEAD error
Change-Id: Iac298a7a14b5c0b55fd199ec120fe5c37ef88fdc
Bug: 1178944
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2757129
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
4 years ago