From 19b7a3e2b5a141eac405c6116f6a107668019551 Mon Sep 17 00:00:00 2001 From: Alexander Thomas Date: Thu, 23 Sep 2021 15:51:06 +0000 Subject: [PATCH] [infra] Use dart-lang/co19 issue links in co19 rolls * 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 --- DEPS | 1 + tests/co19/update.sh | 4 ++-- tests/co19_2/update.sh | 36 ++++++++++++++++++------------------ 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/DEPS b/DEPS index c431fa60f9e7..9a7549d13872 100644 --- a/DEPS +++ b/DEPS @@ -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 diff --git a/tests/co19/update.sh b/tests/co19/update.sh index 85e8019aa436..abce487072e9 100755 --- a/tests/co19/update.sh +++ b/tests/co19/update.sh @@ -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. @@ -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 diff --git a/tests/co19_2/update.sh b/tests/co19_2/update.sh index 3bac8ab967b2..b70d919b28bc 100755 --- a/tests/co19_2/update.sh +++ b/tests/co19_2/update.sh @@ -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. @@ -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