From 6d7d46b4da714ba82739049f0fe9148cbbc75b0f Mon Sep 17 00:00:00 2001
From: Stu Hood <stuhood@gmail.com>
Date: Fri, 13 Aug 2021 10:31:47 -0700
Subject: [PATCH] [internal] Fix missed workflow regeneration, and validate
 workflow generation moving forward. (#12564)

Fix missed workflow regeneration from #12560, and validate workflow generation moving forward.

[ci skip-rust]
[ci skip-build-wheels]
---
 .github/workflows/test-cron.yaml               | 6 ++++++
 .github/workflows/test.yaml                    | 6 ++++++
 build-support/bin/generate_github_workflows.py | 8 ++++++++
 src/rust/engine/fs/store/benches/store.rs      | 6 +++---
 4 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/test-cron.yaml b/.github/workflows/test-cron.yaml
index ae91c239e06..9b4dcc3b431 100644
--- a/.github/workflows/test-cron.yaml
+++ b/.github/workflows/test-cron.yaml
@@ -111,6 +111,10 @@ jobs:
     - name: Bootstrap Pants
       run: './pants --version
 
+        '
+    - name: Validate CI config
+      run: './pants run build-support/bin/generate_github_workflows.py -- --check
+
         '
     - name: Run smoke tests
       run: './pants list ::
@@ -149,6 +153,8 @@ jobs:
 
         ./cargo test --all --tests -- --nocapture
 
+        ./cargo build --benches
+
         '
     strategy:
       matrix:
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index b572d02d951..0906b3cfa87 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -111,6 +111,10 @@ jobs:
     - name: Bootstrap Pants
       run: './pants --version
 
+        '
+    - name: Validate CI config
+      run: './pants run build-support/bin/generate_github_workflows.py -- --check
+
         '
     - name: Run smoke tests
       run: './pants list ::
@@ -149,6 +153,8 @@ jobs:
 
         ./cargo test --all --tests -- --nocapture
 
+        ./cargo build --benches
+
         '
     strategy:
       matrix:
diff --git a/build-support/bin/generate_github_workflows.py b/build-support/bin/generate_github_workflows.py
index fe1c28b8b21..5fb90cebd61 100644
--- a/build-support/bin/generate_github_workflows.py
+++ b/build-support/bin/generate_github_workflows.py
@@ -272,6 +272,14 @@ def test_workflow_jobs(python_versions: list[str], *, cron: bool) -> Jobs:
                 *setup_primary_python(),
                 *bootstrap_caches(),
                 {"name": "Bootstrap Pants", "run": "./pants --version\n"},
+                {
+                    "name": "Validate CI config",
+                    "run": dedent(
+                        """\
+                        ./pants run build-support/bin/generate_github_workflows.py -- --check
+                        """
+                    ),
+                },
                 {
                     "name": "Run smoke tests",
                     "run": dedent(
diff --git a/src/rust/engine/fs/store/benches/store.rs b/src/rust/engine/fs/store/benches/store.rs
index f9e6d0f0d8b..52a393fa65b 100644
--- a/src/rust/engine/fs/store/benches/store.rs
+++ b/src/rust/engine/fs/store/benches/store.rs
@@ -55,7 +55,7 @@ pub fn criterion_benchmark_materialize(c: &mut Criterion) {
   let mut cgroup = c.benchmark_group("materialize_directory");
 
   for (count, size) in vec![(100, 100), (20, 10_000_000), (1, 200_000_000)] {
-    let (store, _tempdir, digest) = large_snapshot(&executor, count, size);
+    let (store, _tempdir, digest) = snapshot(&executor, count, size);
     let parent_dest = TempDir::new().unwrap();
     let parent_dest_path = parent_dest.path();
     cgroup
@@ -78,7 +78,7 @@ pub fn criterion_benchmark_materialize(c: &mut Criterion) {
 pub fn criterion_benchmark_subset_wildcard(c: &mut Criterion) {
   let executor = Executor::global(num_cpus::get(), num_cpus::get() * 4).unwrap();
   // NB: We use a much larger snapshot size compared to the materialize benchmark!
-  let (store, _tempdir, digest) = large_snapshot(&executor, 1000, 100);
+  let (store, _tempdir, digest) = snapshot(&executor, 1000, 100);
 
   let mut cgroup = c.benchmark_group("digest_subset");
 
@@ -106,7 +106,7 @@ pub fn criterion_benchmark_subset_wildcard(c: &mut Criterion) {
 pub fn criterion_benchmark_merge(c: &mut Criterion) {
   let executor = Executor::global(num_cpus::get(), num_cpus::get() * 4).unwrap();
   let num_files: usize = 4000;
-  let (store, _tempdir, digest) = large_snapshot(&executor, num_files, 100);
+  let (store, _tempdir, digest) = snapshot(&executor, num_files, 100);
 
   let (directory, _metadata) = executor
     .block_on(store.load_directory(digest))