Skip to content

Commit c690b11

Browse files
Add logs in google issue tracker to facilitate debug (#5067)
Log the issue data before calling the issue tracker API to create a new issue to facilitate debugging. Also, log the file_exception as a structured field when it fails.
1 parent 582190c commit c690b11

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/clusterfuzz/_internal/cron/triage.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,9 @@ def _file_issue(testcase, issue_tracker, throttler):
361361
file_exception = e
362362

363363
if file_exception:
364-
logs.error(f'Failed to file issue for testcase {testcase.key.id()}.')
364+
logs.error(
365+
f'Failed to file issue for testcase {testcase.key.id()}.',
366+
file_exception=file_exception)
365367
monitoring_metrics.ISSUE_FILING.increment({
366368
'fuzzer_name': testcase.fuzzer_name,
367369
'status': 'failed',

src/clusterfuzz/_internal/issue_management/google_issue_tracker/issue_tracker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,10 +809,11 @@ def save(self, new_comment=None, notify=True, skip_emails=[]): # pylint: disabl
809809
self._data['issueComment'] = {
810810
'comment': self._body,
811811
}
812+
logs.info(f'google_issue_tracker: issue body before create: {self._data}')
812813
result = self.issue_tracker._execute(
813814
self.issue_tracker.client.issues().create(
814815
body=self._data, templateOptions_applyTemplate=True))
815-
logs.info('google_issue_tracker: result of create: %s' % result)
816+
logs.info(f'google_issue_tracker: result of create: {result}')
816817
self._is_new = False
817818
else:
818819
logs.info('google_issue_tracker: Updating issue..')

0 commit comments

Comments
 (0)