Merge "Add github event processing debug logs"

This commit is contained in:
Zuul 2023-08-23 00:56:41 +00:00 committed by Gerrit Code Review
commit 210ca5d235
1 changed files with 8 additions and 1 deletions

View File

@ -432,10 +432,16 @@ class GithubEventProcessor(object):
for event in events:
# Note we limit parallel requests per installation id to avoid
# triggering abuse detection.
lock_start = time.perf_counter()
with self.connection.get_request_lock(installation_id):
lock_elapsed = int((time.perf_counter() - lock_start) * 1000)
event.project_hostname = self.connection.canonical_hostname
event.delivery = self.delivery
event.zuul_event_id = self.delivery
event.timestamp = self.ts
self.log.debug("Post-processing event %s, "
"lock wait time for installation id %s: %sms",
event, installation_id, lock_elapsed)
project = self.connection.source.getProject(event.project_name)
change = None
if event.change_number:
@ -462,8 +468,9 @@ class GithubEventProcessor(object):
protected = change.branch_protected
self.connection.checkBranchCache(project.name, event,
protected=protected)
self.log.debug("Checked branch cache")
event.project_hostname = self.connection.canonical_hostname
self.log.debug("Finished post-processing event %s", event)
self.events = events
def _event_push(self):