From ddc0059f5d07c70e821b746834394a3966e00da1 Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Thu, 27 Jan 2022 14:30:38 -0500 Subject: [PATCH] [ci] Pin master for CI tests (#554) Updates to match the recent change in flutter/plugins, to use a pinned version of master instead of the latest version. This uses the last version of master that passed post-submit tests due to a current out-of-band failure in golden tests. This affects both the Cirrus tests and the Windows LUCI tests. Part of https://github.com/flutter/flutter/issues/93811 --- .ci.yaml | 2 ++ .cirrus.yml | 20 +++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index e69a06d1bd..64b0626fb6 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -36,6 +36,7 @@ targets: add_recipes_cq: "true" target_file: windows_local_tests.yaml channel: master + version_file: flutter_master.version scheduler: luci - name: Windows win32-platform_tests master - packages @@ -45,6 +46,7 @@ targets: add_recipes_cq: "true" target_file: windows_build_and_platform_tests.yaml channel: master + version_file: flutter_master.version dependencies: > [ {"dependency": "vs_build"} diff --git a/.cirrus.yml b/.cirrus.yml index 8d78bb9c4f..f77c9f7fd2 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -9,15 +9,25 @@ tool_setup_template: &TOOL_SETUP_TEMPLATE flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE upgrade_flutter_script: + # Master uses a pinned, auto-rolled version to prevent out-of-band CI + # failures due to changes in Flutter. + # TODO(stuartmorgan): Investigate an autoroller for stable as well. + - TARGET_TREEISH=$CHANNEL + - if [[ "$CHANNEL" == "master" ]]; then + - TARGET_TREEISH=$(< .ci/flutter_$CHANNEL.version) + - fi # Ensure that the repository has all the branches. - cd $FLUTTER_HOME - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - git fetch origin - # Switch to the requested branch. - - git checkout $CHANNEL - # Reset to upstream branch, rather than using pull, since the base image - # can sometimes be in a state where it has diverged from upstream (!). - - git reset --hard @{u} + # Switch to the requested channel. + - git checkout $TARGET_TREEISH + # When using a branch rather than a hash, reset to the upstream branch + # rather than using pull, since the base image can sometimes be in a state + # where it has diverged from upstream (!). + - if [[ "$TARGET_TREEISH" == "$CHANNEL" ]]; then + - git reset --hard @{u} + - fi # Run doctor to allow auditing of what version of Flutter the run is using. - flutter doctor -v << : *TOOL_SETUP_TEMPLATE