From e18b4ff2979b7b0b02d9cccd7a3c56c2f4d4ea85 Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 24 May 2024 14:32:17 -0600 Subject: [PATCH] add logs (#467) --- tasks/backfill_existing_gh_app_installations.py | 8 ++++++-- tasks/backfill_owners_without_gh_app_installations.py | 10 +++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/tasks/backfill_existing_gh_app_installations.py b/tasks/backfill_existing_gh_app_installations.py index f519bc343..5c1abfdd4 100644 --- a/tasks/backfill_existing_gh_app_installations.py +++ b/tasks/backfill_existing_gh_app_installations.py @@ -111,11 +111,15 @@ def run_impl( owner_service=owner_service, gh_app_installation=gh_app_installation, ) - log.info("Successful backfill", extra=dict(ownerid=ownerid)) + log.info( + "Successful backfill", + extra=dict(ownerid=ownerid, parent_id=self.request.parent_id), + ) return {"successful": True, "reason": "backfill task finished"} except: log.info( - "Backfill unsuccessful for this owner", extra=dict(ownerid=ownerid) + "Backfill unsuccessful for this owner", + extra=dict(ownerid=ownerid, parent_id=self.request.parent_id), ) return {"successful": False, "reason": "backfill unsuccessful"} diff --git a/tasks/backfill_owners_without_gh_app_installations.py b/tasks/backfill_owners_without_gh_app_installations.py index 8943ffa78..504ae7b6a 100644 --- a/tasks/backfill_owners_without_gh_app_installations.py +++ b/tasks/backfill_owners_without_gh_app_installations.py @@ -171,7 +171,7 @@ def run_impl( # Create new GH app installation and add all repos the gh app has access to log.info( "This owner has no Github App Installation", - extra=dict(ownerid=ownerid), + extra=dict(ownerid=ownerid, parent_id=self.request.parent_id), ) gh_app_installation = GithubAppInstallation( owner=owner, @@ -195,11 +195,15 @@ def run_impl( owner_service=owner_service, gh_app_installation=gh_app_installation, ) - log.info("Successful backfill", extra=dict(ownerid=ownerid)) + log.info( + "Successful backfill", + extra=dict(ownerid=ownerid, parent_id=self.request.parent_id), + ) return {"successful": True, "reason": "backfill task finished"} except: log.info( - "Backfill unsuccessful for this owner", extra=dict(ownerid=ownerid) + "Backfill unsuccessful for this owner", + extra=dict(ownerid=ownerid, parent_id=self.request.parent_id), ) return {"successful": False, "reason": "backfill unsuccessful"}