Skip to content

Commit

Permalink
[infra] Use dart-lang/co19 issue links in co19 rolls
Browse files Browse the repository at this point in the history
* Add dart-lang/co19 in front of #123 issue references.
* Update the co19_2 script to match the co19 script.
* Track main from the roll branches.
* Add a comment between the two co19 hashes to prevent merge conflicts.

Fixes: b/200911019
Change-Id: I2806ac7e9cd5ff3d24cac0e50a1d094163b35d7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214046
Reviewed-by: William Hesse <[email protected]>
  • Loading branch information
athomas committed Sep 23, 2021
1 parent 651d6e0 commit 19b7a3e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
1 change: 1 addition & 0 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ vars = {
# hashes. It requires access to the dart-build-access group, which EngProd
# has.
"co19_rev": "21e89324642656dcd903e97352d9d16da6a361ee",
# This line prevents conflicts when both packages are rolled simultaneously.
"co19_2_rev": "3e1ea1af9ef293d7f6a8f3332b5c71c7072a30e0",

# The internal benchmarks to use. See go/dart-benchmarks-internal
Expand Down
4 changes: 2 additions & 2 deletions tests/co19/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ OLD=$(gclient getdep --var=co19_rev)
NEW=$(cd $CO19 && git fetch origin && git rev-parse origin/master)

git fetch origin
git branch cl-co19-roll-co19-to-$NEW origin/master
git branch cl-co19-roll-co19-to-$NEW origin/main
git checkout cl-co19-roll-co19-to-$NEW

# Build a cipd package of the commit.
Expand Down Expand Up @@ -50,7 +50,7 @@ git commit DEPS -m \
"$(printf "[co19] Roll co19 to $NEW\n\n" \
&& cd $CO19 \
&& git log --date='format:%Y-%m-%d' --pretty='format:%ad %ae %s' $OLD..$NEW \
| tr -d '#' \
| sed 's/\#/dart-lang\/co19\#/g' \
&& printf "\nCq-Include-Trybots: dart/try:$BUILDERS\n")"

rm -rf tests/co19/src.git
Expand Down
36 changes: 18 additions & 18 deletions tests/co19_2/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ OLD=$(gclient getdep --var=co19_2_rev)
NEW=$(cd $CO19 && git fetch origin && git rev-parse origin/pre-nnbd)

git fetch origin
git branch cl-co19-roll-co19-to-$NEW origin/master
git branch cl-co19-roll-co19-to-$NEW origin/main
git checkout cl-co19-roll-co19-to-$NEW

# Build a cipd package of the commit.
Expand All @@ -33,32 +33,32 @@ bb collect -interval 10s $BUILD_ID
# Update DEPS:
gclient setdep --var=co19_2_rev=$NEW

BUILDERS=$(jq -r '.builder_configurations
| map(select(.steps
| any(.arguments
| select(.!=null)
| any(test("co19_2($|(/.*))")))))
| map(.builders)
| flatten
| sort
| .[] += "-try"
| join(",")' \
tools/bots/test_matrix.json)

# Make a nice commit. Don't include the '#' character to avoid referencing Dart
# SDK issues.
git commit DEPS -m \
"$(printf "[co19] Roll co19_2 to $NEW\n\n" &&
cd $CO19 &&
git log --date='format:%Y-%m-%d' --pretty='format:%ad %ae %s' \
$OLD..$NEW | tr -d '#')"
"$(printf "[co19] Roll co19_2 to $NEW\n\n" \
&& cd $CO19 \
&& git log --date='format:%Y-%m-%d' --pretty='format:%ad %ae %s' $OLD..$NEW \
| sed 's/\#/dart-lang\/co19\#/g' \
&& printf "\nCq-Include-Trybots: dart/try:$BUILDERS\n")"

rm -rf tests/co19_2/src.git

GIT_EDITOR=true git cl upload
ISSUE=$(git config --get branch.cl-co19-roll-co19-to-$NEW.gerritissue)

BUILDERS=$(jq '.builder_configurations|
map(select(.steps|
any(.arguments|
select(.!=null)|
any(.=="co19_2"))))|
map(.builders)|
flatten|
sort' \
tools/bots/test_matrix.json \
| tr -d '[",]')

git cl try -B dart/try $(for BUILDER in $BUILDERS; do echo -b $BUILDER-try; done)

git cl web

set +x
Expand Down

0 comments on commit 19b7a3e

Please sign in to comment.