Skip to content

Commit 73a77ee

Browse files
committed
add logging for issue creation
1 parent d4528fe commit 73a77ee

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

scripts/automated_ingestion/eessi_task.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,10 @@ def _perform_task_add(self) -> bool:
12841284
)
12851285
return True
12861286
else:
1287+
log_message(LoggingScope.STATE_OPS, 'ERROR',
1288+
'Failed to add %s, return code %s',
1289+
os.path.basename(self.payload.payload_object.local_file_path),
1290+
ingest_cmd.returncode)
12871291
issue_title = f'Failed to add {os.path.basename(self.payload.payload_object.local_file_path)}'
12881292
issue_body = self.config['github']['failed_ingestion_issue_body'].format(
12891293
command=' '.join(ingest_cmd.args),
@@ -1292,6 +1296,9 @@ def _perform_task_add(self) -> bool:
12921296
stdout=ingest_cmd.stdout.decode('UTF-8'),
12931297
stderr=ingest_cmd.stderr.decode('UTF-8'),
12941298
)
1299+
log_message(LoggingScope.STATE_OPS, 'INFO',
1300+
'Creating issue for failed ingestion: title: %s, body: %s',
1301+
issue_title, issue_body)
12951302
if self._issue_exists(issue_title, state='open'):
12961303
log_message(LoggingScope.STATE_OPS, 'INFO',
12971304
'Failed to add %s, but an open issue already exists, skipping...',

0 commit comments

Comments
 (0)