cq_label: Remove unused properties

Bug: b/231587812
Change-Id: Ieede744fb80dece203d507848b5500261ed91db9
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/93800
Reviewed-by: Ted Pudlik <tpudlik@google.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
diff --git a/recipes/cq_label.expected/passed-old.json b/recipes/cq_label.expected/passed-old.json
deleted file mode 100644
index bbee308..0000000
--- a/recipes/cq_label.expected/passed-old.json
+++ /dev/null
@@ -1,249 +0,0 @@
-[
-  {
-    "cmd": [],
-    "name": "properties",
-    "~followup_annotations": [
-      "@@@STEP_SUMMARY_TEXT@{'host': 'pigweed', 'project': 'pigweed', 'cq_account': 'cq-bot-account@gserviceaccount.com', 'label': 'CQ-Verified', 'recipe': 'cq_label'}@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "pigweed"
-  },
-  {
-    "cmd": [],
-    "name": "pigweed.ensure gerrit",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "vpython",
-      "-u",
-      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
-      "--json-output",
-      "/path/to/tmp/json",
-      "copy",
-      "RECIPE_MODULE[fuchsia::gerrit]/resources/tool_manifest.json",
-      "/path/to/tmp/json"
-    ],
-    "infra_step": true,
-    "name": "pigweed.ensure gerrit.read manifest",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@tool_manifest.json@{@@@",
-      "@@@STEP_LOG_LINE@tool_manifest.json@  \"path\": \"path/to/gerrit\",@@@",
-      "@@@STEP_LOG_LINE@tool_manifest.json@  \"version\": \"version:pinned-version\"@@@",
-      "@@@STEP_LOG_LINE@tool_manifest.json@}@@@",
-      "@@@STEP_LOG_END@tool_manifest.json@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "pigweed.ensure gerrit.install path/to/gerrit",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "vpython",
-      "-u",
-      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
-      "--json-output",
-      "/path/to/tmp/json",
-      "ensure-directory",
-      "--mode",
-      "0777",
-      "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version"
-    ],
-    "infra_step": true,
-    "name": "pigweed.ensure gerrit.install path/to/gerrit.ensure package directory",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
-      "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version",
-      "-ensure-file",
-      "path/to/gerrit version:pinned-version",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "infra_step": true,
-    "name": "pigweed.ensure gerrit.install path/to/gerrit.ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-version:pinned-v\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"path/to/gerrit\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version/gerrit",
-      "change-query",
-      "-host",
-      "https://pigweed-review.googlesource.com",
-      "-input",
-      "{\"params\": {\"q\": \"is:open -(label:Commit-Queue+1 OR label:Commit-Queue+2) -(label:CQ-Verified-1 OR label:CQ-Verified+1) (r:cq-bot-account@gserviceaccount.com OR cc:cq-bot-account@gserviceaccount.com) (project:pigweed) \"}}",
-      "-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "pigweed.get unlabeled changes",
-    "timeout": 30,
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_LINE@json.output@[@@@",
-      "@@@STEP_LOG_LINE@json.output@  {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"_number\": 1, @@@",
-      "@@@STEP_LOG_LINE@json.output@    \"project\": \"pigweed\"@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@]@@@",
-      "@@@STEP_LOG_END@json.output@@@",
-      "@@@STEP_LOG_LINE@json.input@{@@@",
-      "@@@STEP_LOG_LINE@json.input@  \"params\": {@@@",
-      "@@@STEP_LOG_LINE@json.input@    \"q\": \"is:open -(label:Commit-Queue+1 OR label:Commit-Queue+2) -(label:CQ-Verified-1 OR label:CQ-Verified+1) (r:cq-bot-account@gserviceaccount.com OR cc:cq-bot-account@gserviceaccount.com) (project:pigweed) \"@@@",
-      "@@@STEP_LOG_LINE@json.input@  }@@@",
-      "@@@STEP_LOG_LINE@json.input@}@@@",
-      "@@@STEP_LOG_END@json.input@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "pigweed.1",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_SUMMARY_TEXT@set CQ-Verified to 1@@@",
-      "@@@STEP_LINK@1@https://pigweed-review.googlesource.com/1@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version/gerrit",
-      "change-detail",
-      "-host",
-      "https://pigweed-review.googlesource.com",
-      "-input",
-      "{\"change_id\": \"1\", \"params\": {\"o\": [\"CURRENT_REVISION\"]}}",
-      "-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "pigweed.1.details",
-    "timeout": 600,
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"current_revision\": \"h3110\", @@@",
-      "@@@STEP_LOG_LINE@json.output@  \"messages\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@    {@@@",
-      "@@@STEP_LOG_LINE@json.output@      \"author\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"email\": \"cq-bot-account@gserviceaccount.com\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }, @@@",
-      "@@@STEP_LOG_LINE@json.output@      \"message\": \"Patch Set 2: Dry run: This CL passed\"@@@",
-      "@@@STEP_LOG_LINE@json.output@    }@@@",
-      "@@@STEP_LOG_LINE@json.output@  ], @@@",
-      "@@@STEP_LOG_LINE@json.output@  \"project\": \"pigweed\", @@@",
-      "@@@STEP_LOG_LINE@json.output@  \"revisions\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"h3110\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@      \"_number\": 2@@@",
-      "@@@STEP_LOG_LINE@json.output@    }@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@",
-      "@@@STEP_LOG_LINE@json.input@{@@@",
-      "@@@STEP_LOG_LINE@json.input@  \"change_id\": \"1\", @@@",
-      "@@@STEP_LOG_LINE@json.input@  \"params\": {@@@",
-      "@@@STEP_LOG_LINE@json.input@    \"o\": [@@@",
-      "@@@STEP_LOG_LINE@json.input@      \"CURRENT_REVISION\"@@@",
-      "@@@STEP_LOG_LINE@json.input@    ]@@@",
-      "@@@STEP_LOG_LINE@json.input@  }@@@",
-      "@@@STEP_LOG_LINE@json.input@}@@@",
-      "@@@STEP_LOG_END@json.input@@@",
-      "@@@STEP_LINK@gerrit link@https://pigweed-review.googlesource.com/q/1@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "pigweed.1.passed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version/gerrit",
-      "set-review",
-      "-host",
-      "https://pigweed-review.googlesource.com",
-      "-input",
-      "{\"change_id\": \"1\", \"input\": {\"labels\": {\"CQ-Verified\": 1}, \"notify\": \"NONE\"}, \"revision_id\": \"current\"}",
-      "-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "pigweed.1.set CQ-Verified to 1",
-    "timeout": 600,
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_END@json.output (invalid)@@@",
-      "@@@STEP_LOG_LINE@json.output (exception)@No JSON object could be decoded@@@",
-      "@@@STEP_LOG_END@json.output (exception)@@@",
-      "@@@STEP_LOG_LINE@json.input@{@@@",
-      "@@@STEP_LOG_LINE@json.input@  \"change_id\": \"1\", @@@",
-      "@@@STEP_LOG_LINE@json.input@  \"input\": {@@@",
-      "@@@STEP_LOG_LINE@json.input@    \"labels\": {@@@",
-      "@@@STEP_LOG_LINE@json.input@      \"CQ-Verified\": 1@@@",
-      "@@@STEP_LOG_LINE@json.input@    }, @@@",
-      "@@@STEP_LOG_LINE@json.input@    \"notify\": \"NONE\"@@@",
-      "@@@STEP_LOG_LINE@json.input@  }, @@@",
-      "@@@STEP_LOG_LINE@json.input@  \"revision_id\": \"current\"@@@",
-      "@@@STEP_LOG_LINE@json.input@}@@@",
-      "@@@STEP_LOG_END@json.input@@@",
-      "@@@STEP_LINK@gerrit link@https://pigweed-review.googlesource.com/q/1@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version/gerrit",
-      "change-query",
-      "-host",
-      "https://pigweed-review.googlesource.com",
-      "-input",
-      "{\"params\": {\"q\": \"is:open (label:Commit-Queue+1 OR label:Commit-Queue+2) (label:CQ-Verified-1 OR label:CQ-Verified+1) (r:cq-bot-account@gserviceaccount.com OR cc:cq-bot-account@gserviceaccount.com) (project:pigweed) \"}}",
-      "-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "pigweed.get labeled changes",
-    "timeout": 30,
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_END@json.output (invalid)@@@",
-      "@@@STEP_LOG_LINE@json.output (exception)@No JSON object could be decoded@@@",
-      "@@@STEP_LOG_END@json.output (exception)@@@",
-      "@@@STEP_LOG_LINE@json.input@{@@@",
-      "@@@STEP_LOG_LINE@json.input@  \"params\": {@@@",
-      "@@@STEP_LOG_LINE@json.input@    \"q\": \"is:open (label:Commit-Queue+1 OR label:Commit-Queue+2) (label:CQ-Verified-1 OR label:CQ-Verified+1) (r:cq-bot-account@gserviceaccount.com OR cc:cq-bot-account@gserviceaccount.com) (project:pigweed) \"@@@",
-      "@@@STEP_LOG_LINE@json.input@  }@@@",
-      "@@@STEP_LOG_LINE@json.input@}@@@",
-      "@@@STEP_LOG_END@json.input@@@"
-    ]
-  },
-  {
-    "name": "$result"
-  }
-]
\ No newline at end of file
diff --git a/recipes/cq_label.proto b/recipes/cq_label.proto
index b8e32f1..95f5133 100644
--- a/recipes/cq_label.proto
+++ b/recipes/cq_label.proto
@@ -17,14 +17,6 @@
 package recipes.pigweed.cq_label;
 
 message InputProperties {
-  // TODO(b/231587812) Remove
-  // [DEPRECATED] Name of the Gerrit host.
-  string host = 1;
-
-  // TODO(b/231587812) Remove
-  // [DEPRECATED] Name of the project on the Gerrit host.
-  string project = 2;
-
   // The account that posts CQ results.
   string cq_account = 3;
 
diff --git a/recipes/cq_label.py b/recipes/cq_label.py
index c334fd9..607439e 100644
--- a/recipes/cq_label.py
+++ b/recipes/cq_label.py
@@ -200,21 +200,12 @@
 def RunSteps(api, props):
     assert re.match(r'^[-\w]+$', props.label)
     assert re.match(r'^[-\w.@]+$', props.cq_account)
-    assert re.match(r'^[-\w./_]*$', props.project)
 
     with api.step.nest('properties') as pres:
         pres.step_summary_text = repr(api.properties.thaw())
 
-    repos = list(props.repo)
-
-    # TODO(b/231587812) Remove transition code.
-    if props.host and props.project and not repos:
-        repos.append(
-            'https://{}.googlesource.com/{}'.format(props.host, props.project)
-        )
-
     projects_by_host = collections.defaultdict(list)
-    for repo in repos:
+    for repo in props.repo:
         match = re.search(
             r'^https://(?P<host>.*).googlesource.com/(?P<project>.*)$', repo,
         )
@@ -260,16 +251,6 @@
     VERIFIED_LABEL = 'CQ-Verified'
     PROJECT = 'pigweed'
 
-    def old_properties(**kwargs):
-        new_kwargs = {
-            'host': 'pigweed',
-            'project': PROJECT,
-            'cq_account': CQ_BOT_ACCOUNT,
-            'label': VERIFIED_LABEL,
-        }
-        new_kwargs.update(**kwargs)
-        return api.properties(**new_kwargs)
-
     def properties(**kwargs):
         new_kwargs = {
             'repo': ['https://pigweed.googlesource.com/{}'.format(PROJECT)],
@@ -356,15 +337,6 @@
         )
 
     yield (
-        api.status_check.test('passed-old')
-        + old_properties()
-        + unlabeled_query_results()
-        + details(message(2, True))
-        + set_passed()
-        + does_not_clear()
-    )
-
-    yield (
         api.status_check.test('passed')
         + properties()
         + unlabeled_query_results()