New issue
Advanced search Search tips

Issue 740456 link

Starred by 5 users

Issue metadata

Status: Verified
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

Gerrit: Need fully-featured CQ support for feature branches

Project Member Reported by machenb...@chromium.org, Jul 10 2017

Issue description

We'd like to do the following:

- Have a feature branch off master
- Upload CLs for that branch to Gerrit codereview
- Use trybots and CQ just like on master
 
To get this going in V8, I will:
- Add a feature to the gerrit recipe module to get the branch for a CL
- In the V8 recipe, we'll use this to query gerrit before bot_update
- Pass the branch name to bot_update

Comment 2 by aga...@chromium.org, Jul 10 2017

Sounds like a plan! Please make sure that the work is generalizable, as this is a thing that many other projects also want (in particular for release branches, not feature branches, but the concept is the same).
Wondering if we could/should generalize this by moving the query logic into bot_update's ensure_checkout?

A challenge would be the sync step without patch on trybots. This should still sync the same branch as the first sync step, but without patch. Not sure if bot_update knows patch/CL information at all in that case...
Another challenge: This should work for patch_project. E.g. if a chromium trybot is used on a V8 CL on a feature branch, then V8 in Chromium should be synced to the feature branch + patch. Likewise on the run without patch, all revision should stay the same, except v8 in chromium needs to be the feature branch revision without patch.
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 12 2017

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

commit 7dadf05dad8e882f81dfc1eb032ab99bba76358f
Author: Michael Achenbach <machenbach@chromium.org>
Date: Wed Jul 12 11:59:32 2017

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>

[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/resources/bot_update.py
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2_buildbot.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle_deprecated.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/gerrit/api.py
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/trychange.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/basic_with_branch_heads.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/buildbot.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/tryjob.json
[add] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.py
[add] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json
[add] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/basic.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2_json_win.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2_json.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/no_shallow.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/reset_root_solution_revision.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/README.recipes.md
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/gerrit/test_api.py
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/api.py
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json
[modify] https://crrev.com/7dadf05dad8e882f81dfc1eb032ab99bba76358f/recipes/recipe_modules/bot_update/__init__.py

Project Member

Comment 8 by bugdroid1@chromium.org, Jul 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build/+/6f9c75500d891e864334204e6c55c98b932e1205

commit 6f9c75500d891e864334204e6c55c98b932e1205
Author: Michael Achenbach <machenbach@chromium.org>
Date: Wed Jul 12 15:38:05 2017

Revert "Enable using feature branches for V8 CLs"

This reverts commit 9889812a9d5a7151e5dc253fb64fa3dcf6a25a70.

Reason for revert: Doesn't work yet for Chromium trybots with V8
patches. The branch:HEAD notation isn't understood by gclient, but
it's also not needed.

Original change's description:
> Enable using feature branches for V8 CLs
> 
> TBR=phajdan.jr@chromium.org
> 
> Bug:  740456 
> Change-Id: I139d5cfa6fe906a75bc72337df881ccf2aaffc42
> Reviewed-on: https://chromium-review.googlesource.com/568138
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

TBR=agable@chromium.org,phajdan.jr@chromium.org,machenbach@chromium.org,tandrii@chromium.org

Change-Id: I8a3786c113248a92779802095cadb02d7eda52e7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  740456 
Reviewed-on: https://chromium-review.googlesource.com/567064
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>

[modify] https://crrev.com/6f9c75500d891e864334204e6c55c98b932e1205/scripts/slave/README.recipes.md
[modify] https://crrev.com/6f9c75500d891e864334204e6c55c98b932e1205/scripts/slave/recipe_modules/v8/api.py
[modify] https://crrev.com/6f9c75500d891e864334204e6c55c98b932e1205/scripts/slave/recipes/chromium_trybot.py
[delete] https://crrev.com/9889812a9d5a7151e5dc253fb64fa3dcf6a25a70/scripts/slave/recipes/chromium_trybot.expected/use_v8_patch_on_chromium_trybot_gerrit_feature_branch.json

Project Member

Comment 9 by bugdroid1@chromium.org, Jul 13 2017

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

commit 02e59414c181067943b888e5470584e974f0b23c
Author: Michael Achenbach <machenbach@chromium.org>
Date: Thu Jul 13 06:51:35 2017

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>

[modify] https://crrev.com/02e59414c181067943b888e5470584e974f0b23c/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json
[modify] https://crrev.com/02e59414c181067943b888e5470584e974f0b23c/recipes/recipe_modules/bot_update/api.py
[modify] https://crrev.com/02e59414c181067943b888e5470584e974f0b23c/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json

Project Member

Comment 10 by bugdroid1@chromium.org, Jul 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build/+/6e70dbc2cf192f43c864f99c7ed673dd97383378

commit 6e70dbc2cf192f43c864f99c7ed673dd97383378
Author: Michael Achenbach <machenbach@chromium.org>
Date: Thu Jul 13 10:11:16 2017

Reland "Enable using feature branches for V8 CLs"

This is a reland of 9889812a9d5a7151e5dc253fb64fa3dcf6a25a70
Original change's description:
> Enable using feature branches for V8 CLs
> 
> TBR=phajdan.jr@chromium.org
> 
> Bug:  740456 
> Change-Id: I139d5cfa6fe906a75bc72337df881ccf2aaffc42
> Reviewed-on: https://chromium-review.googlesource.com/568138
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

TBR=phajdan.jr@chromium.org

Bug:  740456 
Change-Id: I62bdd42803c34390f14fe92d34f8e6283402fa85
Reviewed-on: https://chromium-review.googlesource.com/569698
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>

[modify] https://crrev.com/6e70dbc2cf192f43c864f99c7ed673dd97383378/scripts/slave/README.recipes.md
[modify] https://crrev.com/6e70dbc2cf192f43c864f99c7ed673dd97383378/scripts/slave/recipe_modules/v8/api.py
[modify] https://crrev.com/6e70dbc2cf192f43c864f99c7ed673dd97383378/scripts/slave/recipes/chromium_trybot.py
[add] https://crrev.com/6e70dbc2cf192f43c864f99c7ed673dd97383378/scripts/slave/recipes/chromium_trybot.expected/use_v8_patch_on_chromium_trybot_gerrit_feature_branch.json

Summary: Gerrit: Need fully-featured CQ support for feature branches (was: Gerrit: Need fullly-featured CQ support for feature branches)
This works for V8 now. Lets turn it on for more repos before making it the default.
 Issue 741479  has been merged into this issue.
Project Member

Comment 14 by bugdroid1@chromium.org, Jul 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build/+/beaa7beba57758cda35605d613aedb17f2096c02

commit beaa7beba57758cda35605d613aedb17f2096c02
Author: Michael Achenbach <machenbach@chromium.org>
Date: Fri Jul 14 07:02:20 2017

Support feature-branch development on chromum trybots

TBR=phajdan.jr@chromium.org

Bug:  740456 
Change-Id: Ibb811f346cba9460ef9da14258f0e8ba1db0d23d
Reviewed-on: https://chromium-review.googlesource.com/570240
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>

[add] https://crrev.com/beaa7beba57758cda35605d613aedb17f2096c02/scripts/slave/recipes/chromium_trybot.expected/chromium_trybot_gerrit_feature_branch.json
[modify] https://crrev.com/beaa7beba57758cda35605d613aedb17f2096c02/scripts/slave/recipes/chromium_trybot.py

Project Member

Comment 15 by bugdroid1@chromium.org, Jul 14 2017

Project Member

Comment 16 by bugdroid1@chromium.org, Jul 17 2017

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

commit 8aa774cfb078dcfe93cce1a57337820de095020c
Author: Michael Achenbach <machenbach@chromium.org>
Date: Mon Jul 17 07:51:32 2017

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>

[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2_buildbot.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle_deprecated.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/trychange.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/basic_with_branch_heads.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/buildbot.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/tryjob.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.py
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/basic.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2_json_win.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2_json.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/no_shallow.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/reset_root_solution_revision.json
[modify] https://crrev.com/8aa774cfb078dcfe93cce1a57337820de095020c/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json

Project Member

Comment 17 by bugdroid1@chromium.org, Jul 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build/+/30ccb73bcf1e9faaa65bdb95d108bc85559765e9

commit 30ccb73bcf1e9faaa65bdb95d108bc85559765e9
Author: Michael Achenbach <machenbach@chromium.org>
Date: Mon Jul 17 09:33:46 2017

Remove obsolete destination-branch-check flag

This was set to default in depot_tools.

TBR=phajdan.jr@chromium.org

Bug:  740456 
Change-Id: If6e437a4fcbfcc5ef3d59d066b9502a137bc0860
Reviewed-on: https://chromium-review.googlesource.com/573042
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

[modify] https://crrev.com/30ccb73bcf1e9faaa65bdb95d108bc85559765e9/scripts/slave/README.recipes.md
[modify] https://crrev.com/30ccb73bcf1e9faaa65bdb95d108bc85559765e9/scripts/slave/recipe_modules/v8/api.py
[modify] https://crrev.com/30ccb73bcf1e9faaa65bdb95d108bc85559765e9/scripts/slave/recipes/chromium_trybot.py

Project Member

Comment 18 by bugdroid1@chromium.org, Jul 17 2017

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

commit 98681d113f3ebb6e0e76855cc884fd599ea8549f
Author: Michael Achenbach <machenbach@chromium.org>
Date: Mon Jul 17 11:09:50 2017

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>

[modify] https://crrev.com/98681d113f3ebb6e0e76855cc884fd599ea8549f/recipes/recipe_modules/bot_update/examples/full.py
[modify] https://crrev.com/98681d113f3ebb6e0e76855cc884fd599ea8549f/recipes/README.recipes.md
[modify] https://crrev.com/98681d113f3ebb6e0e76855cc884fd599ea8549f/recipes/recipe_modules/bot_update/api.py

This is still not working when feature branches don't use a commit position and the recipe requires one:
https://chromium-review.googlesource.com/c/595468/
Project Member

Comment 20 by bugdroid1@chromium.org, Aug 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build/+/d8c1bdaa926a362999ae94a09c3d10978dec9be7

commit d8c1bdaa926a362999ae94a09c3d10978dec9be7
Author: Michael Achenbach <machenbach@chromium.org>
Date: Tue Aug 01 15:06:09 2017

V8: Make v8 recipe more robust to commit position missing on feature branches

Bug:  740456 
Change-Id: Ib158d7c41afed45581aa467487ed47e85381e37b
Reviewed-on: https://chromium-review.googlesource.com/595975
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>

[modify] https://crrev.com/d8c1bdaa926a362999ae94a09c3d10978dec9be7/scripts/slave/README.recipes.md
[modify] https://crrev.com/d8c1bdaa926a362999ae94a09c3d10978dec9be7/scripts/slave/recipe_modules/v8/api.py

Status: Verified (was: Assigned)

Sign in to add a comment