MCPcopy Index your code
hub / github.com/apache/tvm / comment_failure

Method comment_failure

ci/scripts/github/github_tvmbot.py:579–601  ·  view source on GitHub ↗
(self, msg: str, exceptions: Exception | list[Exception])

Source from the content-addressed store, hash-verified

577 raise e
578
579 def comment_failure(self, msg: str, exceptions: Exception | list[Exception]):
580 if not isinstance(exceptions, list):
581 exceptions = [exceptions]
582
583 logging.info(f"Failed, commenting {exceptions}")
584
585 # Extract all the traceback strings
586 for item in exceptions:
587 try:
588 raise item
589 except Exception:
590 item.exception_msg = traceback.format_exc()
591
592 comment = f"{msg} in {args.run_url}\n\n"
593 for exception in exceptions:
594 comment += f"<details>\n\n```\n{exception.exception_msg}\n```\n\n"
595 if hasattr(exception, "read"):
596 comment += f"with response\n\n```\n{exception.read().decode()}\n```\n\n"
597 comment += "</details>"
598
599 pr.comment(comment)
600 pr.has_error = True
601 return exception
602
603
604def check_author(pr, triggering_comment, args):

Callers 2

runMethod · 0.80
runMethod · 0.80

Calls 4

infoMethod · 0.80
commentMethod · 0.80
readMethod · 0.65
decodeMethod · 0.45

Tested by

no test coverage detected