pw_presubmit, static_checks: Replace cq with cv

Change-Id: I8fde2282e9462e09850055611ee7578355fd360c
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/164552
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Ted Pudlik <tpudlik@google.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
diff --git a/recipes/pw_presubmit.py b/recipes/pw_presubmit.py
index 4701158..dbdb787 100644
--- a/recipes/pw_presubmit.py
+++ b/recipes/pw_presubmit.py
@@ -29,7 +29,7 @@
     'pigweed/pw_presubmit',
     'pigweed/util',
     'recipe_engine/buildbucket',
-    'recipe_engine/cq',
+    'recipe_engine/cv',
     'recipe_engine/file',
     'recipe_engine/futures',
     'recipe_engine/json',
@@ -71,9 +71,9 @@
     gcs_bucket = props.gcs_bucket
 
     if (
-        api.buildbucket_util.is_tryjob and
-        api.cq.active and
-        props.exit_tryjob_early_if_failing_in_ci
+        api.buildbucket_util.is_tryjob
+        and api.cv.active
+        and props.exit_tryjob_early_if_failing_in_ci
     ):
         bucket = re.sub(r'\btry\b', 'ci', api.buildbucket.build.builder.bucket)
         status = api.builder_status.retrieve(bucket=bucket)
@@ -320,7 +320,7 @@
         api.test('one_step_no_exit')
         + properties(step=['step1'], exit_tryjob_early_if_failing_in_ci=True)
         + api.checkout.try_test_data()
-        + api.cq(run_mode=api.cq.DRY_RUN)
+        + api.cv(run_mode=api.cv.DRY_RUN)
         + api.buildbucket.simulated_search_results(
             [api.builder_status.passed()]
         )
@@ -330,7 +330,7 @@
         api.test('one_step_exit_early')
         + properties(step=['step1'], exit_tryjob_early_if_failing_in_ci=True)
         + api.checkout.try_test_data()
-        + api.cq(run_mode=api.cq.DRY_RUN)
+        + api.cv(run_mode=api.cv.DRY_RUN)
         + api.buildbucket.simulated_search_results(
             [api.builder_status.failure()]
         )
diff --git a/recipes/static_checks.py b/recipes/static_checks.py
index fc9ad09..4d08b1e 100644
--- a/recipes/static_checks.py
+++ b/recipes/static_checks.py
@@ -24,7 +24,7 @@
     'pigweed/checkout',
     'pigweed/util',
     'recipe_engine/buildbucket',
-    'recipe_engine/cq',
+    'recipe_engine/cv',
     'recipe_engine/json',
     'recipe_engine/path',
     'recipe_engine/properties',
@@ -93,7 +93,7 @@
         '"No-Docs-Update-Reason: <reason>".'
     )
 
-    if api.cq.active and api.cq.run_mode == api.cq.NEW_PATCHSET_RUN:
+    if api.cv.active and api.cv.run_mode == api.cv.NEW_PATCHSET_RUN:
         with api.step.nest('failure') as pres:
             pres.status == 'FAILURE'
             pres.step_summary_text = error
@@ -273,7 +273,7 @@
     commit_message = res.commit_message
     comments = res.comments
 
-    api.cq.set_do_not_retry_build()
+    api.cv.set_do_not_retry_build()
 
     # Make it just a little easier to retrieve the current commit message later.
     current_revision = details['revisions'][details['current_revision']]
@@ -487,13 +487,13 @@
     yield (
         test('no_doc_changes', status='FAILURE')
         + comment(with_exception=False)
-        + api.cq(run_mode='DRY_RUN')
+        + api.cv(run_mode='DRY_RUN')
         + api.checkout.try_test_data()
     )
 
     yield (
         test('no_doc_changes_new_patchset_run')
-        + api.cq(run_mode=api.cq.NEW_PATCHSET_RUN)
+        + api.cv(run_mode=api.cv.NEW_PATCHSET_RUN)
         + api.checkout.try_test_data()
     )
 
@@ -510,7 +510,7 @@
             files=('foo.rst',),
             properties={'doc_extensions': ['.gn']},
         )
-        + api.cq(run_mode='DRY_RUN')
+        + api.cv(run_mode='DRY_RUN')
         + api.checkout.try_test_data()
     )
 
@@ -583,7 +583,7 @@
             api.test(f'readability.{name}', status=status)
             + api.properties(**final_props)
             + change_details(api, msg=msg, votes=votes, **kwargs,)
-            + api.cq(api.cq.FULL_RUN)
+            + api.cv(api.cv.FULL_RUN)
         )
 
     def assert_changed_files(num):