payload service: remove key parameter
We don't need to receive the key parameter for the images as if we're
getting a signed image the correctly formatted key name will be present
by parsing the target image artifact location.
We're removing this from the recipes side and config as well.
BUG=b:177903628
TEST=./run_tests
Change-Id: Ie74f13761de66a91e1d50e57e25ad3db9e7160a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3291946
Tested-by: George Engelbrecht <engeg@google.com>
Auto-Submit: George Engelbrecht <engeg@google.com>
Commit-Queue: Jack Neus <jackneus@google.com>
Reviewed-by: Jack Neus <jackneus@google.com>
Reviewed-by: Alex Klein <saklein@chromium.org>
diff --git a/api/controller/payload.py b/api/controller/payload.py
index 00d5cf1..d0fa6a3 100644
--- a/api/controller/payload.py
+++ b/api/controller/payload.py
@@ -66,18 +66,11 @@
# Find the value of bucket or default to 'chromeos-releases'.
destination_bucket = input_proto.bucket or 'chromeos-releases'
- if input_proto.dryrun:
- keyset = ''
- upload = False
- else:
- keyset = input_proto.keyset
- upload = True
-
# There's a potential that some paygen_lib library might raise here, but since
# we're still involved in config we'll keep it before the validate_only.
payload_config = payload.PayloadConfig(tgt_image, src_image,
destination_bucket, input_proto.verify,
- keyset, upload,
+ upload=not input_proto.dryrun,
cache_dir=_DEFAULT_PAYGEN_CACHE_DIR)
# If configured for validation only we're done here.
@@ -88,7 +81,7 @@
local_path, remote_uri = payload_config.GeneratePayload()
_SetGeneratePayloadOutputProto(output_proto, local_path, remote_uri)
- if remote_uri or not upload and local_path:
+ if remote_uri or input_proto.dryrun and local_path:
return controller.RETURN_CODE_SUCCESS
else:
return controller.RETURN_CODE_COMPLETED_UNSUCCESSFULLY