Stop the reporter naming a path that no longer exists
The comment it posts said "posted by `tools/report_job_log.py`". Since weblib-archive#44 there is no such file in any consuming repo -- the script lives here. So it pointed a reader at a path they cannot find, on the one occasion they are already looking for the cause of a failure. Links here instead. Found by deliberately breaking a build on weblib-fs#31 to prove the failure path worked. A green run never renders this message, so nothing else would have surfaced it. Co-authored-by: bit <bit@das-labor.org>
This commit is contained in:
BIN
__pycache__/report_job_log.cpython-313.pyc
Normal file
BIN
__pycache__/report_job_log.cpython-313.pyc
Normal file
Binary file not shown.
@@ -9,6 +9,10 @@ can be read, next to the change that caused it.
|
|||||||
Standard library only, like `sync_blocked_label.py`, so it needs nothing but an
|
Standard library only, like `sync_blocked_label.py`, so it needs nothing but an
|
||||||
interpreter.
|
interpreter.
|
||||||
|
|
||||||
|
Lives in `weblib/weblib-ci` and is used by the other repos from there, so the
|
||||||
|
comment it posts must not name a path inside the repo it is reporting on --
|
||||||
|
there is no copy there to find.
|
||||||
|
|
||||||
Usage, from a workflow step guarded by `if: failure()`:
|
Usage, from a workflow step guarded by `if: failure()`:
|
||||||
|
|
||||||
report_job_log.py /tmp/build.log
|
report_job_log.py /tmp/build.log
|
||||||
@@ -143,7 +147,8 @@ def main(argv=None):
|
|||||||
sha = (os.environ.get("GITHUB_SHA") or "")[:8]
|
sha = (os.environ.get("GITHUB_SHA") or "")[:8]
|
||||||
body = (f"**`{args.job}` failed**{f' on `{sha}`' if sha else ''}.\n\n"
|
body = (f"**`{args.job}` failed**{f' on `{sha}`' if sha else ''}.\n\n"
|
||||||
"Job logs return 500 on this Gitea, so here is the tail of the "
|
"Job logs return 500 on this Gitea, so here is the tail of the "
|
||||||
"build output, posted by `tools/report_job_log.py`.\n\n"
|
"build output, posted by [`report_job_log.py`]"
|
||||||
|
"(https://git.chaosbit.de/weblib/weblib-ci).\n\n"
|
||||||
f"{text}\n")
|
f"{text}\n")
|
||||||
|
|
||||||
# A failure to report a failure must not itself be silent, but it also must
|
# A failure to report a failure must not itself be silent, but it also must
|
||||||
|
|||||||
Reference in New Issue
Block a user