Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add logs #467

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tasks/backfill_existing_gh_app_installations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}

Expand Down
10 changes: 7 additions & 3 deletions tasks/backfill_owners_without_gh_app_installations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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"}

Expand Down
Loading