Enable json validation for sdk

Luci builder configs have now been available in separate repos. This CL enables validation of the config json file format for flutter recipes.

Change-Id: Ice879fe16cf47771c8ebb9450c1882154ebc9753
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/5340
Commit-Queue: Keyong Han <keyonghan@google.com>
Reviewed-by: Tong Wu <wutong@google.com>
diff --git a/recipes/flutter.expected/linux_beta.json b/recipes/flutter.expected/linux_beta.json
index f4d348d..c2fe30b 100644
--- a/recipes/flutter.expected/linux_beta.json
+++ b/recipes/flutter.expected/linux_beta.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_beta_experimental.json b/recipes/flutter.expected/linux_beta_experimental.json
index 2d02efb..ef5f991 100644
--- a/recipes/flutter.expected/linux_beta_experimental.json
+++ b/recipes/flutter.expected/linux_beta_experimental.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_beta_experimental_upload.json b/recipes/flutter.expected/linux_beta_experimental_upload.json
index aea06ad..91c9f4e 100644
--- a/recipes/flutter.expected/linux_beta_experimental_upload.json
+++ b/recipes/flutter.expected/linux_beta_experimental_upload.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_beta_upload.json b/recipes/flutter.expected/linux_beta_upload.json
index 9d23a1c..c392238 100644
--- a/recipes/flutter.expected/linux_beta_upload.json
+++ b/recipes/flutter.expected/linux_beta_upload.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_dev.json b/recipes/flutter.expected/linux_dev.json
index c74bc68..6ce869a 100644
--- a/recipes/flutter.expected/linux_dev.json
+++ b/recipes/flutter.expected/linux_dev.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_dev_experimental.json b/recipes/flutter.expected/linux_dev_experimental.json
index 776267f..7a5ef29 100644
--- a/recipes/flutter.expected/linux_dev_experimental.json
+++ b/recipes/flutter.expected/linux_dev_experimental.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_dev_experimental_upload.json b/recipes/flutter.expected/linux_dev_experimental_upload.json
index 970a0be..3653bd8 100644
--- a/recipes/flutter.expected/linux_dev_experimental_upload.json
+++ b/recipes/flutter.expected/linux_dev_experimental_upload.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_dev_upload.json b/recipes/flutter.expected/linux_dev_upload.json
index c93758a..4d1a8d7 100644
--- a/recipes/flutter.expected/linux_dev_upload.json
+++ b/recipes/flutter.expected/linux_dev_upload.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_master.json b/recipes/flutter.expected/linux_master.json
index 53d60d4..ce568f4 100644
--- a/recipes/flutter.expected/linux_master.json
+++ b/recipes/flutter.expected/linux_master.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_master_coverage_.json b/recipes/flutter.expected/linux_master_coverage_.json
index dc1047c..2ad52b8 100644
--- a/recipes/flutter.expected/linux_master_coverage_.json
+++ b/recipes/flutter.expected/linux_master_coverage_.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_master_coverage__experimental.json b/recipes/flutter.expected/linux_master_coverage__experimental.json
index dc1047c..2ad52b8 100644
--- a/recipes/flutter.expected/linux_master_coverage__experimental.json
+++ b/recipes/flutter.expected/linux_master_coverage__experimental.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_master_coverage__experimental_upload.json b/recipes/flutter.expected/linux_master_coverage__experimental_upload.json
index 0899b2f..1f2b2c8 100644
--- a/recipes/flutter.expected/linux_master_coverage__experimental_upload.json
+++ b/recipes/flutter.expected/linux_master_coverage__experimental_upload.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_master_coverage__upload.json b/recipes/flutter.expected/linux_master_coverage__upload.json
index 4a4baa3..88a7c18 100644
--- a/recipes/flutter.expected/linux_master_coverage__upload.json
+++ b/recipes/flutter.expected/linux_master_coverage__upload.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_master_experimental.json b/recipes/flutter.expected/linux_master_experimental.json
index 53d60d4..ce568f4 100644
--- a/recipes/flutter.expected/linux_master_experimental.json
+++ b/recipes/flutter.expected/linux_master_experimental.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_master_experimental_upload.json b/recipes/flutter.expected/linux_master_experimental_upload.json
index 4034265..45d1b32 100644
--- a/recipes/flutter.expected/linux_master_experimental_upload.json
+++ b/recipes/flutter.expected/linux_master_experimental_upload.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_master_upload.json b/recipes/flutter.expected/linux_master_upload.json
index 4034265..45d1b32 100644
--- a/recipes/flutter.expected/linux_master_upload.json
+++ b/recipes/flutter.expected/linux_master_upload.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_stable.json b/recipes/flutter.expected/linux_stable.json
index d6afc17..e5c21fe 100644
--- a/recipes/flutter.expected/linux_stable.json
+++ b/recipes/flutter.expected/linux_stable.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_stable_experimental.json b/recipes/flutter.expected/linux_stable_experimental.json
index c97d6eb..dac3038 100644
--- a/recipes/flutter.expected/linux_stable_experimental.json
+++ b/recipes/flutter.expected/linux_stable_experimental.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_stable_experimental_upload.json b/recipes/flutter.expected/linux_stable_experimental_upload.json
index 8dee459..3762254 100644
--- a/recipes/flutter.expected/linux_stable_experimental_upload.json
+++ b/recipes/flutter.expected/linux_stable_experimental_upload.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/linux_stable_upload.json b/recipes/flutter.expected/linux_stable_upload.json
index 2dbb045..1334e68 100644
--- a/recipes/flutter.expected/linux_stable_upload.json
+++ b/recipes/flutter.expected/linux_stable_upload.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.expected/pull_request.json b/recipes/flutter.expected/pull_request.json
index 3e6a70e..14f6d7b 100644
--- a/recipes/flutter.expected/pull_request.json
+++ b/recipes/flutter.expected/pull_request.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Download goldctl"
   },
diff --git a/recipes/flutter.py b/recipes/flutter.py
index 2ba44f7..fad9500 100644
--- a/recipes/flutter.py
+++ b/recipes/flutter.py
@@ -11,6 +11,7 @@
     'depot_tools/gsutil',
     'depot_tools/osx_sdk',
     'depot_tools/windows_sdk',
+    'flutter/json_util',
     'flutter/kms',
     'flutter/zip',
     'fuchsia/display_util',
@@ -175,6 +176,10 @@
       git_url, ref=git_ref, recursive=True, set_got_revision=True, tags=True)
   checkout = api.path['checkout']
 
+  if api.platform.is_linux:
+    # Validates flutter builders json format.
+    api.json_util.validate_json(checkout, 'flutter')
+
   dart_bin = checkout.join('bin', 'cache', 'dart-sdk', 'bin')
   flutter_bin = checkout.join('bin')
 
diff --git a/recipes/flutter/flutter_drone.expected/android_sdk.json b/recipes/flutter/flutter_drone.expected/android_sdk.json
index 53b1dbc..bbaf315 100644
--- a/recipes/flutter/flutter_drone.expected/android_sdk.json
+++ b/recipes/flutter/flutter_drone.expected/android_sdk.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Chrome and driver dependency"
   },
diff --git a/recipes/flutter/flutter_drone.expected/no_requirements.json b/recipes/flutter/flutter_drone.expected/no_requirements.json
index a9114a7..25545bc 100644
--- a/recipes/flutter/flutter_drone.expected/no_requirements.json
+++ b/recipes/flutter/flutter_drone.expected/no_requirements.json
@@ -88,6 +88,42 @@
     "name": "submodule update"
   },
   {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/try_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate try json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@try_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@try_builders.json@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "copy",
+      "[START_DIR]/flutter/dev/prod_builders.json",
+      "/path/to/tmp/"
+    ],
+    "infra_step": true,
+    "name": "validate prod json format",
+    "~followup_annotations": [
+      "@@@STEP_LOG_LINE@prod_builders.json@\"\"@@@",
+      "@@@STEP_LOG_END@prod_builders.json@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Chrome and driver dependency"
   },
diff --git a/recipes/flutter/flutter_drone.py b/recipes/flutter/flutter_drone.py
index ef3e61b..b847cc1 100644
--- a/recipes/flutter/flutter_drone.py
+++ b/recipes/flutter/flutter_drone.py
@@ -12,10 +12,12 @@
     'flutter/android_sdk',
     'flutter/repo_util',
     'flutter/flutter_deps',
+    'flutter/json_util',
     'flutter/os_utils',
     'recipe_engine/context',
     'recipe_engine/isolated',
     'recipe_engine/path',
+    'recipe_engine/platform',
     'recipe_engine/properties',
     'recipe_engine/step',
 ]
@@ -39,6 +41,9 @@
   checkout_path = api.path['start_dir'].join('flutter')
   api.repo_util.checkout('flutter', api.properties.get('git_url'),
                          api.properties.get('git_ref'))
+  if api.platform.is_linux:
+    # Validates flutter builders json format.
+    api.json_util.validate_json(checkout_path, 'flutter')
   env, env_prefixes = api.repo_util.flutter_environment(checkout_path)
   api.flutter_deps.chrome_and_driver(env, env_prefixes)
   api.flutter_deps.open_jdk(env, env_prefixes)
@@ -53,9 +58,6 @@
     else:
       RunShard(api, env, env_prefixes, checkout_path)
 
-  # This is a noop for non windows tasks.
-  api.os_utils.kill_win_processes()
-
 
 def GenTests(api):
   yield api.test('no_requirements', api.repo_util.flutter_environment_data())