Skip flutter upgrade for plugins

Change-Id: I2623e8c63037d4dc91f6b44d192ef757c5cd60f6
Bug: https://github.com/flutter/flutter/issues/86037
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/16522
Reviewed-by: Godofredo Contreras <godofredoc@google.com>
Commit-Queue: Keyong Han <keyonghan@google.com>
diff --git a/recipes/plugins/plugins.expected/basic.json b/recipes/plugins/plugins.expected/basic.json
index 49f37f4..d181d46 100644
--- a/recipes/plugins/plugins.expected/basic.json
+++ b/recipes/plugins/plugins.expected/basic.json
@@ -30,7 +30,7 @@
       "git",
       "fetch",
       "origin",
-      "stable",
+      "master",
       "--recurse-submodules",
       "--progress",
       "--tags"
@@ -242,61 +242,6 @@
   {
     "cmd": [
       "flutter",
-      "channel",
-      "master"
-    ],
-    "cwd": "[START_DIR]/flutter",
-    "env": {
-      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
-      "FLUTTER_GIT_URL": "https://chromium.googlesource.com/external/github.com/flutter/flutter",
-      "LUCI_BRANCH": "",
-      "LUCI_CI": "True",
-      "LUCI_PR": "",
-      "OS": "linux",
-      "PUB_CACHE": "[START_DIR]/.pub-cache",
-      "SDK_CHECKOUT_PATH": "[START_DIR]/flutter"
-    },
-    "env_prefixes": {
-      "PATH": [
-        "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
-      ]
-    },
-    "name": "prepare environment.flutter set channel",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "flutter",
-      "upgrade"
-    ],
-    "cwd": "[START_DIR]/flutter",
-    "env": {
-      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
-      "FLUTTER_GIT_URL": "https://chromium.googlesource.com/external/github.com/flutter/flutter",
-      "LUCI_BRANCH": "",
-      "LUCI_CI": "True",
-      "LUCI_PR": "",
-      "OS": "linux",
-      "PUB_CACHE": "[START_DIR]/.pub-cache",
-      "SDK_CHECKOUT_PATH": "[START_DIR]/flutter"
-    },
-    "env_prefixes": {
-      "PATH": [
-        "[START_DIR]/flutter/bin",
-        "[START_DIR]/flutter/bin/cache/dart-sdk/bin"
-      ]
-    },
-    "name": "prepare environment.flutter upgrade",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "flutter",
       "config",
       "--enable-windows-desktop"
     ],
@@ -326,7 +271,8 @@
   {
     "cmd": [
       "flutter",
-      "doctor"
+      "doctor",
+      "-v"
     ],
     "cwd": "[START_DIR]/flutter",
     "env": {
diff --git a/recipes/plugins/plugins.py b/recipes/plugins/plugins.py
index 2ab32b9..0e0b057 100644
--- a/recipes/plugins/plugins.py
+++ b/recipes/plugins/plugins.py
@@ -16,12 +16,13 @@
   """Recipe to run flutter plugin tests."""
   plugins_checkout_path = api.path['start_dir'].join('plugins')
   flutter_checkout_path = api.path['start_dir'].join('flutter')
+  channel = api.properties.get('channel', 'master')
   with api.step.nest('checkout source code'):
     # Check out flutter ToT from master.
     api.repo_util.checkout(
         'flutter',
         checkout_path=flutter_checkout_path,
-        ref='refs/heads/stable',
+        ref='refs/heads/%s' % channel,
     )
     api.repo_util.checkout(
         'plugins',
@@ -29,7 +30,6 @@
         url=api.properties.get('git_url'),
         ref=api.properties.get('git_ref')
     )
-  channel = api.properties.get('channel', 'master')
   env, env_prefixes = api.repo_util.flutter_environment(flutter_checkout_path)
   # This is required by `flutter upgrade`
   env['FLUTTER_GIT_URL'
@@ -41,8 +41,6 @@
   with api.context(env=env, env_prefixes=env_prefixes,
                    cwd=flutter_checkout_path):
     with api.step.nest('prepare environment'):
-      api.step('flutter set channel', ['flutter', 'channel', channel])
-      api.step('flutter upgrade', ['flutter', 'upgrade'])
       config_flag = '--enable-windows-uwp-desktop' if api.properties.get(
           'uwp'
       ) else '--enable-windows-desktop'
@@ -51,7 +49,7 @@
           ['flutter', 'config', config_flag],
           infra_step=True,
       )
-      api.step('flutter doctor', ['flutter', 'doctor'])
+      api.step('flutter doctor', ['flutter', 'doctor', '-v'])
       # Fail fast on dependencies problem.
       timeout_secs = 300
       api.step(