report_job_log.py always says the job failed, even when it passed #8
Closed
opened 2026-09-07 18:23:57 +00:00 by claude
·
0 comments
Labels
Clear labels
Compat
Breaking
Breaking change that won't be backward compatible
Kind
Documentation
Documentation changes
Kind
Enhancement
Improve existing functionality
Kind
Feature
New functionality
Kind
Question
A question that has to be answered before the work can be specified
Kind
Security
This is security issue
Kind
Testing
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
4
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
On Hold
3
Deliberately deferred. Not blocked by a dependency and not waiting on a fact
Status
Abandoned
4
Somebody has started to work on this but abandoned work
Type
Bug
Something is not working
Type
Chore
Infrastructure, CI, tooling or packaging. No user-visible change
Type
Epic
An umbrella issue with sub-issues. Never worked directly
Type
Meta
About how work is done here rather than about the code
Type
Spike
The deliverable is a measurement or a decision, not merged code
Type
Task
An ordinary unit of work with a deliverable. The default
Milestone
No items
No Milestone
Notifications
Due Date
No due date set.
Reference: weblib/weblib-ci#8
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
report_job_log.py:148hardcodes the word failed into the comment header:Every current caller guards it with
if: failure(), so today the wording isalways true and this is latent, not broken.
It stopped being purely theoretical during weblib-viewer#10. A throwaway probe
job ran the script with an unguarded step to read the runner's egress back —
job logs still 500 on this Gitea, so posting the tail as a comment is the only
way to see anything — and the successful run posted a comment that reads as
a failure report. Anyone scrolling that PR would conclude the probe had failed
when it had passed.
Fix
Take the outcome as an argument rather than assuming it, e.g.
--status failed|passed(or read${{ job.status }}at the call site), and pick theheader from it. Keep
failedas the default so no existing caller changesbehaviour.
Worth doing because the interesting uses of this script are exactly the ones
that want
if: always()— a probe, or a job whose output is the point ratherthan its exit code. Right now those all lie in the header.
Filed from weblib-viewer#10;
Type/Bugbecause the output is wrong,Priority/Lowbecause no current caller can hit it.