Use upload_metrics property for devicelab results

Bug: https://github.com/flutter/flutter/issues/66191
Test: CQ
Change-Id: I0090fc74eaac22d8c781362c053935a3df728059
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/8644
Reviewed-by: Keyong Han <keyonghan@google.com>
Commit-Queue: Casey Hillers <chillers@google.com>
diff --git a/recipes/devicelab/devicelab_drone.py b/recipes/devicelab/devicelab_drone.py
index bdc1d30..a13b82e 100644
--- a/recipes/devicelab/devicelab_drone.py
+++ b/recipes/devicelab/devicelab_drone.py
@@ -42,7 +42,7 @@
   devicelab_path = flutter_path.join('dev', 'devicelab')
   # Create service account for post submit tests.
   service_account_args = []
-  if api.properties.get('pool') == 'flutter.luci.prod':
+  if api.properties.get('upload_metrics'):
     service_account = api.service_account.default()
     access_token = service_account.get_access_token()
     access_token_path = api.path.mkstemp()
@@ -100,6 +100,6 @@
       api.repo_util.flutter_environment_data(),
   )
   yield api.test(
-      "post-submit", api.properties(task_name='abc', pool='flutter.luci.prod'),
+      "post-submit", api.properties(task_name='abc', upload_metrics=True),
       api.repo_util.flutter_environment_data()
   )