From 270d6eeb54865fc4e7d0103cb6ce37b52525093f Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Fri, 17 Apr 2020 11:32:59 -0400 Subject: [PATCH 1/2] importer: fix response error exception message Simple `s/Signing/Importing/`. --- coreos-ostree-importer/send-ostree-import-request.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coreos-ostree-importer/send-ostree-import-request.py b/coreos-ostree-importer/send-ostree-import-request.py index 753d7c7..942d021 100755 --- a/coreos-ostree-importer/send-ostree-import-request.py +++ b/coreos-ostree-importer/send-ostree-import-request.py @@ -92,8 +92,8 @@ def validate_response(response): if response["status"].lower() == "failure": # https://pagure.io/robosignatory/pull-request/38 if "failure-message" not in response: - raise Exception("Signing failed") - raise Exception(f"Signing failed: {response['failure-message']}") + raise Exception("Importing failed") + raise Exception(f"Importing failed: {response['failure-message']}") assert response["status"].lower() == "success", str(response) From c92a36eedd6c72140c298881200f27da4967a778 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Fri, 17 Apr 2020 11:33:55 -0400 Subject: [PATCH 2/2] importer: start validating response from service The importer is fully up and running now, so let's start checking that it correctly imported the commit and error out if an error occurred. --- coreos-ostree-importer/send-ostree-import-request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreos-ostree-importer/send-ostree-import-request.py b/coreos-ostree-importer/send-ostree-import-request.py index 942d021..7abe876 100755 --- a/coreos-ostree-importer/send-ostree-import-request.py +++ b/coreos-ostree-importer/send-ostree-import-request.py @@ -78,7 +78,7 @@ def send_ostree_import_request(args): "target_repo": args.repo, }, ) - # validate_response(response) + validate_response(response) def get_bucket_and_prefix(path):