Build API: Implement validate_only calls.

Add validate-only support to all existing endpoints and
tests to enforce the setting is respected.
Add is_in validator to help transition some endpoints
to decorator-only validation.
Some cleanup and standardization in the controller tests.

BUG=chromium:987263
TEST=run_tests

Cq-Depend: chromium:1726252
Change-Id: I108dfc1a221847eae47a18f2f60e12d2575c9ea8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1726253
Reviewed-by: David Burger <dburger@chromium.org>
Commit-Queue: Alex Klein <saklein@chromium.org>
Tested-by: Alex Klein <saklein@chromium.org>
diff --git a/api/controller/android.py b/api/controller/android.py
index cdbb9aa..c657d43 100644
--- a/api/controller/android.py
+++ b/api/controller/android.py
@@ -25,7 +25,8 @@
 
 
 @validate.require('tracking_branch', 'package_name', 'android_build_branch')
-def MarkStable(input_proto, output_proto):
+@validate.validation_complete
+def MarkStable(input_proto, output_proto, _config):
   """Uprev Android, if able.
 
   Uprev Android, verify that the newly uprevved package can be emerged, and
@@ -35,7 +36,8 @@
 
   Args:
     input_proto (MarkStableRequest): The input proto.
-    output_proto (MarkStableReSponse): The output proto.
+    output_proto (MarkStableResponse): The output proto.
+    _config (api_config.ApiConfig): The call config.
   """
   tracking_branch = input_proto.tracking_branch
   package_name = input_proto.package_name
@@ -72,14 +74,15 @@
     output_proto.status = android_pb2.MARK_STABLE_STATUS_EARLY_EXIT
 
 
-def UnpinVersion(_input_proto, _output_proto):
+@validate.validation_complete
+def UnpinVersion(_input_proto, _output_proto, _config):
   """Unpin the Android version.
 
   See AndroidService documentation in api/proto/android.proto.
 
   Args:
     _input_proto (UnpinVersionRequest): The input proto. (not used.)
-    _output_proto (google.protobuf.Empty): The output proto. (not used.)
+    _output_proto (UnpinVersionResponse): The output proto. (not used.)
+    _config (api_config.ApiConfig): The call config.
   """
-
   osutils.SafeUnlink(ANDROIDPIN_MASK_PATH)