From 7442ec4303f2e0ba2e31a6555c4da34b96de0ee1 Mon Sep 17 00:00:00 2001 From: Jiri Kyjovsky Date: Mon, 17 Jul 2023 18:59:26 +0200 Subject: [PATCH] backend: log task dict in case of error returned from redis so if cases like https://github.com/fedora-copr/copr/issues/2315 happens again, we can debug it and see what happenned --- backend/copr_backend/createrepo.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/copr_backend/createrepo.py b/backend/copr_backend/createrepo.py index 9a6f405e8..0fdc49a41 100644 --- a/backend/copr_backend/createrepo.py +++ b/backend/copr_backend/createrepo.py @@ -152,7 +152,12 @@ def options(self): self.log.info("Key %s already processed, skip", key) continue - task_opts = json.loads(task_dict["task"]) + try: + task_opts = json.loads(task_dict["task"]) + except KeyError: + self.log.info("KeyError exception. Task dictionary for key %s: %s", + key, task_dict) + raise skip = False for attr in ["devel", "appstream"]: