Add dawn-cq-linux-x64-fuzz-rel

Adds the dawn-cq-linux-x64-fuzz-rel trybot and enables it to run on all
Dawn CLs. This provides equivalent test coverage to a portion of the
existing linux-clang-rel-x64 CQ builder using the newer gn_v2 recipe.

Bug: 441327468
Change-Id: Iaa73de0fa4a31aecc4691372773f0af8d77023f1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/260754
Auto-Submit: Brian Sheedy <bsheedy@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
diff --git a/infra/config/global/generated/builders/gn_args_locations.json b/infra/config/global/generated/builders/gn_args_locations.json
index bde0d6d..df7db9d 100644
--- a/infra/config/global/generated/builders/gn_args_locations.json
+++ b/infra/config/global/generated/builders/gn_args_locations.json
@@ -4,6 +4,7 @@
     "dawn-linux-x64-fuzz-rel": "ci/dawn-linux-x64-fuzz-rel/gn-args.json"
   },
   "try": {
+    "dawn-cq-linux-x64-fuzz-rel": "try/dawn-cq-linux-x64-fuzz-rel/gn-args.json",
     "dawn-cq-linux-x64-rel": "try/dawn-cq-linux-x64-rel/gn-args.json",
     "dawn-try-linux-x64-fuzz-rel": "try/dawn-try-linux-x64-fuzz-rel/gn-args.json",
     "dawn-try-linux-x64-sws-rel": "try/dawn-try-linux-x64-sws-rel/gn-args.json"
diff --git a/infra/config/global/generated/builders/try/dawn-cq-linux-x64-fuzz-rel/gn-args.json b/infra/config/global/generated/builders/try/dawn-cq-linux-x64-fuzz-rel/gn-args.json
new file mode 100644
index 0000000..8242f30
--- /dev/null
+++ b/infra/config/global/generated/builders/try/dawn-cq-linux-x64-fuzz-rel/gn-args.json
@@ -0,0 +1,20 @@
+{
+  "gn_args": {
+    "dawn_enable_d3d12": false,
+    "is_clang": true,
+    "is_component_build": false,
+    "is_debug": false,
+    "target_cpu": "x64",
+    "target_os": "linux",
+    "tint_build_hlsl_writer": true,
+    "tint_build_msl_writer": true,
+    "tint_build_spv_reader": true,
+    "tint_build_spv_writer": true,
+    "tint_build_wgsl_reader": true,
+    "tint_build_wgsl_writer": true,
+    "use_libfuzzer": true,
+    "use_reclient": false,
+    "use_remoteexec": true,
+    "use_siso": true
+  }
+}
\ No newline at end of file
diff --git a/infra/config/global/generated/luci/commit-queue.cfg b/infra/config/global/generated/luci/commit-queue.cfg
index 7d68f9a..541c62b 100644
--- a/infra/config/global/generated/luci/commit-queue.cfg
+++ b/infra/config/global/generated/luci/commit-queue.cfg
@@ -435,6 +435,32 @@
         }
       }
       builders {
+        name: "dawn/try/dawn-cq-linux-x64-fuzz-rel"
+        disable_reuse_footers: "Include-Ci-Only-Tests"
+        location_filters {
+          gerrit_host_regexp: ".*"
+          gerrit_project_regexp: ".*"
+          gerrit_ref_regexp: ".*"
+          path_regexp: "webgpu-cts/[^/]*expectations.txt"
+          exclude: true
+        }
+        location_filters {
+          gerrit_host_regexp: ".*"
+          gerrit_project_regexp: ".*"
+          gerrit_ref_regexp: ".*"
+          path_regexp: "infra/config/.+"
+          exclude: true
+        }
+        location_filters {
+          gerrit_host_regexp: ".*"
+          gerrit_project_regexp: ".*"
+          gerrit_ref_regexp: ".*"
+          path_regexp: "infra/config/generated/builders/try/dawn-cq-linux-x64-fuzz-rel/.+"
+        }
+        mode_allowlist: "DRY_RUN"
+        mode_allowlist: "FULL_RUN"
+      }
+      builders {
         name: "dawn/try/dawn-cq-linux-x64-rel"
         disable_reuse_footers: "Include-Ci-Only-Tests"
         location_filters {
diff --git a/infra/config/global/generated/luci/cr-buildbucket.cfg b/infra/config/global/generated/luci/cr-buildbucket.cfg
index d99c5d4..9a74405 100644
--- a/infra/config/global/generated/luci/cr-buildbucket.cfg
+++ b/infra/config/global/generated/luci/cr-buildbucket.cfg
@@ -1062,6 +1062,10 @@
         '      ],'
         '      "mirroring_builder_group_and_names": ['
         '        {'
+        '          "builder": "dawn-cq-linux-x64-fuzz-rel",'
+        '          "group": "try"'
+        '        },'
+        '        {'
         '          "builder": "dawn-try-linux-x64-fuzz-rel",'
         '          "group": "try"'
         '        }'
@@ -1121,7 +1125,7 @@
           use_invocation_timestamp: true
         }
       }
-      description_html: "Compiles and runs Dawn binaries for 'tools/run fuzz' for Linux/x64<br/>This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/dawn/builders/try/dawn-try-linux-x64-fuzz-rel\">dawn-try-linux-x64-fuzz-rel</a></li></ul><br/>Builder owner: <a href=mailto:chrome-gpu-infra@google.com>chrome-gpu-infra@google.com</a>"
+      description_html: "Compiles and runs Dawn binaries for 'tools/run fuzz' for Linux/x64<br/>This builder is mirrored by any of the following try builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/dawn/builders/try/dawn-cq-linux-x64-fuzz-rel\">dawn-cq-linux-x64-fuzz-rel</a></li><li><a href=\"https://ci.chromium.org/p/dawn/builders/try/dawn-try-linux-x64-fuzz-rel\">dawn-try-linux-x64-fuzz-rel</a></li></ul><br/>Builder owner: <a href=mailto:chrome-gpu-infra@google.com>chrome-gpu-infra@google.com</a>"
       shadow_builder_adjustments {
         service_account: "dawn-try-builder@chops-service-accounts.iam.gserviceaccount.com"
       }
@@ -2533,6 +2537,138 @@
       service_account: "dawn-try-builder@chops-service-accounts.iam.gserviceaccount.com"
     }
     builders {
+      name: "dawn-cq-linux-x64-fuzz-rel"
+      swarming_host: "chromium-swarm.appspot.com"
+      dimensions: "builderless:1"
+      dimensions: "os:Ubuntu-22.04"
+      dimensions: "pool:luci.chromium.gpu.try"
+      exe {
+        cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"
+        cipd_version: "refs/heads/main"
+        cmd: "luciexe"
+      }
+      properties:
+        '{'
+        '  "$build/chromium_tests_builder_config": {'
+        '    "builder_config": {'
+        '      "additional_exclusions": ['
+        '        "infra/config/generated/builders/try/dawn-cq-linux-x64-fuzz-rel/gn-args.json"'
+        '      ],'
+        '      "builder_db": {'
+        '        "entries": ['
+        '          {'
+        '            "builder_id": {'
+        '              "bucket": "ci",'
+        '              "builder": "dawn-linux-x64-fuzz-rel",'
+        '              "project": "dawn"'
+        '            },'
+        '            "builder_spec": {'
+        '              "builder_group": "ci",'
+        '              "execution_mode": "COMPILE_AND_TEST",'
+        '              "legacy_chromium_config": {'
+        '                "build_config": "Release",'
+        '                "config": "dawn_base",'
+        '                "target_arch": "intel",'
+        '                "target_bits": 64,'
+        '                "target_platform": "linux"'
+        '              },'
+        '              "legacy_gclient_config": {'
+        '                "config": "dawn"'
+        '              }'
+        '            }'
+        '          }'
+        '        ]'
+        '      },'
+        '      "builder_ids": ['
+        '        {'
+        '          "bucket": "ci",'
+        '          "builder": "dawn-linux-x64-fuzz-rel",'
+        '          "project": "dawn"'
+        '        }'
+        '      ]'
+        '    }'
+        '  },'
+        '  "$build/flakiness": {'
+        '    "check_for_flakiness": true,'
+        '    "check_for_flakiness_with_resultdb": true'
+        '  },'
+        '  "$build/siso": {'
+        '    "configs": ['
+        '      "builder"'
+        '    ],'
+        '    "enable_cloud_monitoring": true,'
+        '    "enable_cloud_profiler": true,'
+        '    "enable_cloud_trace": true,'
+        '    "experiments": [],'
+        '    "metrics_project": "chromium-reclient-metrics",'
+        '    "project": "rbe-chromium-untrusted",'
+        '    "remote_jobs": 250'
+        '  },'
+        '  "builder_group": "try",'
+        '  "cq": "path-based",'
+        '  "recipe": "dawn/gn_v2_trybot"'
+        '}'
+      build_numbers: YES
+      service_account: "dawn-try-builder@chops-service-accounts.iam.gserviceaccount.com"
+      experiments {
+        key: "chromium.use_per_builder_build_dir_name"
+        value: 100
+      }
+      resultdb {
+        enable: true
+        bq_exports {
+          project: "chrome-luci-data"
+          dataset: "chromium"
+          table: "try_test_results"
+          test_results {}
+        }
+        bq_exports {
+          project: "chrome-luci-data"
+          dataset: "chromium"
+          table: "gpu_try_test_results"
+          test_results {
+            predicate {
+              test_id_regexp: "ninja://(chrome|content)/test:telemetry_gpu_integration_test[^/]*/.+"
+            }
+          }
+        }
+        bq_exports {
+          project: "chrome-luci-data"
+          dataset: "chromium"
+          table: "blink_web_tests_try_test_results"
+          test_results {
+            predicate {
+              test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)|(ninja://[^/]*headless_shell_wpt/.+)"
+            }
+          }
+        }
+        history_options {
+          use_invocation_timestamp: true
+        }
+      }
+      description_html: "Compiles and runs Dawn binaries for 'tools/run fuzz' for Linux/x64. Blocks CL submission.<br/>This builder mirrors the following CI builders:<br/><ul><li><a href=\"https://ci.chromium.org/p/dawn/builders/ci/dawn-linux-x64-fuzz-rel\">dawn-linux-x64-fuzz-rel</a></li></ul><br/>Builder owner: <a href=mailto:chrome-gpu-infra@google.com>chrome-gpu-infra@google.com</a>"
+      contact_team_email: "chrome-gpu-infra@google.com"
+      custom_metric_definitions {
+        name: "/chrome/infra/browser/builds/cached_count"
+        predicates: "has(build.output.properties.is_cached)"
+        predicates: "string(build.output.properties.is_cached) == \"true\""
+      }
+      custom_metric_definitions {
+        name: "/chrome/infra/browser/builds/ran_tests_retry_shard_count"
+        predicates: "has(build.output.properties.ran_tests_retry_shard)"
+      }
+      custom_metric_definitions {
+        name: "/chrome/infra/browser/builds/ran_tests_without_patch_count"
+        predicates: "has(build.output.properties.ran_tests_without_patch)"
+      }
+      custom_metric_definitions {
+        name: "/chrome/infra/browser/builds/uncached_count"
+        predicates: "has(build.output.properties.is_cached)"
+        predicates: "string(build.output.properties.is_cached) == \"false\""
+      }
+      max_concurrent_builds: 3
+    }
+    builders {
       name: "dawn-cq-linux-x64-rel"
       swarming_host: "chromium-swarm.appspot.com"
       dimensions: "builderless:1"
diff --git a/infra/config/global/generated/luci/luci-milo.cfg b/infra/config/global/generated/luci/luci-milo.cfg
index 5b9a10e..a74f844 100644
--- a/infra/config/global/generated/luci/luci-milo.cfg
+++ b/infra/config/global/generated/luci/luci-milo.cfg
@@ -180,6 +180,9 @@
     name: "buildbucket/luci.dawn.try/cmake-win-msvc-rel-x64"
   }
   builders {
+    name: "buildbucket/luci.dawn.try/dawn-cq-linux-x64-fuzz-rel"
+  }
+  builders {
     name: "buildbucket/luci.dawn.try/dawn-cq-linux-x64-rel"
   }
   builders {
diff --git a/infra/config/global/gn_standalone_try.star b/infra/config/global/gn_standalone_try.star
index 5e6b702..a2613d9 100644
--- a/infra/config/global/gn_standalone_try.star
+++ b/infra/config/global/gn_standalone_try.star
@@ -65,6 +65,21 @@
     ),
 )
 
+try_.builder(
+    name = "dawn-cq-linux-x64-fuzz-rel",
+    description_html = "Compiles and runs Dawn binaries for 'tools/run fuzz' for Linux/x64. Blocks CL submission.",
+    max_concurrent_builds = 3,
+    os = os.LINUX_DEFAULT,
+    ssd = None,
+    mirrors = [
+        "ci/dawn-linux-x64-fuzz-rel",
+    ],
+    gn_args = "ci/dawn-linux-x64-fuzz-rel",
+    tryjob = try_.job(
+        location_filters = exclusion_filters.gn_clang_cq_fuzz_file_exclusions,
+    ),
+)
+
 # Manual trybots
 
 def dawn_linux_manual_builder(*, name, **kwargs):
diff --git a/infra/config/global/location_filters.star b/infra/config/global/location_filters.star
index 1de81aa..fd6a3fe 100644
--- a/infra/config/global/location_filters.star
+++ b/infra/config/global/location_filters.star
@@ -27,15 +27,18 @@
 
 """Starlark code related to common CQ location filters for standalone builders."""
 
-# These are commonly touched locations which do not have relevant testing on
-# standard CQ builders.
-_COMMON_LOCATIONS_EXCLUDED_FROM_CQ = [
+_WEBGPU_CTS_LOCATIONS_EXCLUDED_FROM_CQ = [
     # WebGPU CTS expectations, only affects builders that run WebGPU CTS, i.e.
     # Chromium builders.
     cq.location_filter(
         path_regexp = "webgpu-cts/[^/]*expectations.txt",
         exclude = True,
     ),
+]
+
+# These are commonly touched locations which do not have relevant testing on
+# builders which do not use `tools/run` for tests.
+_GO_LOCATIONS_EXCLUDED_FROM_CQ = [
     # Tools written in Go.
     cq.location_filter(
         path_regexp = "tools/src/.+",
@@ -48,6 +51,10 @@
     ),
 ]
 
+# These are commonly touched locations which do not have relevant testing on
+# standard CQ builders.
+_COMMON_LOCATIONS_EXCLUDED_FROM_CQ = _WEBGPU_CTS_LOCATIONS_EXCLUDED_FROM_CQ + _GO_LOCATIONS_EXCLUDED_FROM_CQ
+
 # Exclusions for all non-CMake CQ builders.
 _NON_CMAKE_LOCATIONS_EXCLUDED_FROM_CQ = [
     # Only tested on CMake bots.
@@ -70,10 +77,14 @@
 # touched.
 _GN_CLANG_CQ_FILE_EXCLUSIONS = _COMMON_LOCATIONS_EXCLUDED_FROM_CQ + _NON_CMAKE_LOCATIONS_EXCLUDED_FROM_CQ
 
+# Fuzz builders rely on both Go tools and Tint test data.
+_GN_CLANG_CQ_FUZZ_FILE_EXCLUSIONS = _WEBGPU_CTS_LOCATIONS_EXCLUDED_FROM_CQ
+
 _GN_MSVC_CQ_FILE_EXCLUSIONS = _COMMON_LOCATIONS_EXCLUDED_FROM_CQ + _NON_CMAKE_LOCATIONS_EXCLUDED_FROM_CQ
 
 exclusion_filters = struct(
     cmake_cq_file_exclusions = _CMAKE_CQ_FILE_EXCLUSIONS,
     gn_clang_cq_file_exclusions = _GN_CLANG_CQ_FILE_EXCLUSIONS,
+    gn_clang_cq_fuzz_file_exclusions = _GN_CLANG_CQ_FUZZ_FILE_EXCLUSIONS,
     gn_msvc_cq_file_exclusions = _GN_MSVC_CQ_FILE_EXCLUSIONS,
 )