New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 859703 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 16
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug-Regression


Participants' hotlists:
Hotlist-2


Sign in to add a comment

Bot_update incorrectly fetches branches

Project Member Reported by benjhayden@chromium.org, Jul 2

Issue description

I'm working in a branch. The trybots don't see any of the changes that I've made in the past few days.

https://chromium-review.googlesource.com/c/catapult/+/1123406
https://build.chromium.org/p/tryserver.client.catapult/builders/Catapult%20Presubmit/builds/12430/steps/bot_update/logs/stdio

Search for "Running git checkout".
It should be running "git checkout origin v2spa".
Instead it runs "git checkout v2spa".
 
From the logs everything seems to be working fine. Why do you think it's not working?

It fetches all refs/heads, which includes refs/heads/v2spa. Then it can just checkout v2spa, which is a local branch tracking refs/heads/v2spa:

Fetching +refs/heads/*:refs/heads/*
running "git fetch -v --progress origin +refs/heads/*:refs/heads/*" in "/b/build/slave/cache_dir/chromium.googlesource.com-catapult"
From https://chromium.googlesource.com/catapult
 = [up to date]          gh-pages               -> gh-pages
 = [up to date]          infra/config           -> infra/config
 = [up to date]          master                 -> master
 = [up to date]          md-pages               -> md-pages
 = [up to date]          v2spa                  -> v2spa
 = [up to date]          vulcanized_traceviewer -> vulcanized_traceviewer
fetch +refs/heads/*:refs/heads/* took 0.0 minutes

Also, once it checks it out, it applies the patch on top of https://chromium.googlesource.com/catapult/+/d63d9afeb8a5225b4c6db3aad513ddb7b685a97e

0:00:00] ===Applying patch ref===
[0:00:00] Repo is 'https://chromium.googlesource.com/catapult' @ 'refs/changes/06/1123406/1', ref is 'd63d9afeb8a5225b4c6db3aad513ddb7b685a97e', root is '/b/build/slave/Catapult_Presubmit/build/catapult'
[0:00:00] Finished.
The git cache has indeed refs/heads/v2spa as local ref. But builder's git checkout treats cache as a remote "origin", hence it should checkout origin/v2spa.


Relevant quote from log:



===Running git fetch origin ===
In directory: /b/build/slave/Catapult_Presubmit/build/catapult
===Succeeded in 0.0 mins of git fetch origin ===

===Running git checkout --force v2spa -- ===
In directory: /b/build/slave/Catapult_Presubmit/build/catapult
Warning: you are leaving 1 commit behind, not connected to
any of your branches:

  702a1dfb8 Committed patch

If you want to keep it by creating a new branch, this may be a good time
to do so with:

 git branch <new-branch-name> 702a1dfb8

Switched to branch 'v2spa'
Your branch is behind 'origin/v2spa' by 4 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
===Succeeded in 0.0 mins of git checkout --force v2spa -- ===
Issue 860430 has been merged into this issue.
Labels: -Type-Bug -Pri-3 Pri-1 Type-Bug-Regression
Status: Assigned (was: Untriaged)
Bumping priority because v8 got hit by this too, so it's clearly a regression.
So, I went to old V8 build [1] and I can see in its log [2] the correct invocation:
  ===Running git checkout --force origin/vee-eight-lkgr -- ===
  
[1] https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20-%20node.js%20baseline/2000
[2] https://logs.chromium.org/v/?s=v8%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8945527683566252960%2F%2B%2Fsteps%2Fbot_update%2F0%2Fstdout
And in most recent build https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20-%20node.js%20baseline/4011
  ===Running git checkout --force vee-eight-lkgr -- ===

So regression happened sometime between May 25th and July 4th. Bisecting by hand:

3529 -> good https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20-%20node.js%20baseline/3529

3530 -> bad https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20-%20node.js%20baseline/3530

which provides range of 2018-06-26 11:07 AM (PDT) .. 2018-06-26 11:37 AM (PDT)
but recipe bundler might be slightly behind, so allow bigger window to the passed, which approximately matches https://chromium-review.googlesource.com/c/chromium/tools/build/+/1114217
Cc: machenb...@chromium.org serg...@chromium.org
Project Member

Comment 8 by bugdroid1@chromium.org, Jul 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/depot_tools/+/4fb2477d0870024db541206ca02885c3e0ac4990

commit 4fb2477d0870024db541206ca02885c3e0ac4990
Author: Edward Lemur <ehmaldonado@chromium.org>
Date: Fri Jul 06 22:33:37 2018

bot_update: Fix syncing to branches.

When syncing remote branches, checkout origin/<branch> instead of
<branch>, since there might be a local branch with that name.

Bug:  859703 
Change-Id: I9a49b940f53f75a97e5458fdcf578c3b52b26de2
Reviewed-on: https://chromium-review.googlesource.com/1128271
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

[modify] https://crrev.com/4fb2477d0870024db541206ca02885c3e0ac4990/recipes/recipe_modules/bot_update/resources/bot_update.py

Project Member

Comment 10 by bugdroid1@chromium.org, Jul 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f25fc05367e547656d7cf57eeba53530991190ab

commit f25fc05367e547656d7cf57eeba53530991190ab
Author: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Fri Jul 06 23:43:15 2018

Roll src/third_party/depot_tools 3c023259d75c..4fb2477d0870 (1 commits)

https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/3c023259d75c..4fb2477d0870


git log 3c023259d75c..4fb2477d0870 --date=short --no-merges --format='%ad %ae %s'
2018-07-06 ehmaldonado@chromium.org bot_update: Fix syncing to branches.


Created with:
  gclient setdep -r src/third_party/depot_tools@4fb2477d0870

The AutoRoll server is located here: https://depot-tools-chromium-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



BUG= chromium:859703 
TBR=agable@chromium.org

Change-Id: Ia1e9101dd98d9fb49b443e6d61e0a33c889d04b0
Reviewed-on: https://chromium-review.googlesource.com/1128366
Reviewed-by: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#573119}
[modify] https://crrev.com/f25fc05367e547656d7cf57eeba53530991190ab/DEPS

Project Member

Comment 11 by bugdroid1@chromium.org, Jul 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/depot_tools/+/92745a5b0e2e7593fabe8b831cb913cd548b257b

commit 92745a5b0e2e7593fabe8b831cb913cd548b257b
Author: Edward Lemur <ehmaldonado@chromium.org>
Date: Fri Jul 06 23:50:17 2018

bot_update: Fix syncing to origin/*.

Skip adding origin if the branch name already has 'origin/'.

Bug:  859703 
Change-Id: I0141c04189d00187c202a7885a7c6bb74571e7ea
Reviewed-on: https://chromium-review.googlesource.com/1128390
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>

[modify] https://crrev.com/92745a5b0e2e7593fabe8b831cb913cd548b257b/recipes/recipe_modules/bot_update/resources/bot_update.py

Project Member

Comment 12 by bugdroid1@chromium.org, Jul 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9083b8187ea0f7d9d7f6046773dcace5e1d0e40c

commit 9083b8187ea0f7d9d7f6046773dcace5e1d0e40c
Author: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Sat Jul 07 01:30:12 2018

Roll src/third_party/depot_tools 4fb2477d0870..92745a5b0e2e (1 commits)

https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/4fb2477d0870..92745a5b0e2e


git log 4fb2477d0870..92745a5b0e2e --date=short --no-merges --format='%ad %ae %s'
2018-07-06 ehmaldonado@chromium.org bot_update: Fix syncing to origin/*.


Created with:
  gclient setdep -r src/third_party/depot_tools@92745a5b0e2e

The AutoRoll server is located here: https://depot-tools-chromium-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



BUG= chromium:859703 
TBR=agable@chromium.org

Change-Id: Ia39b89af2f2530668da8fb8125f2e08a50a89ab0
Reviewed-on: https://chromium-review.googlesource.com/1128395
Reviewed-by: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#573137}
[modify] https://crrev.com/9083b8187ea0f7d9d7f6046773dcace5e1d0e40c/DEPS

Thanks a bunch Andrii for the analysis! And thanks Edward for the fix! Seems to be fixed for V8 too now.

Comment 14 by ehmaldonado@chromium.org, Jan 16 (6 days ago)

Status: Fixed (was: Assigned)

Sign in to add a comment