report_job_log.py has no channel for a push-triggered job that fails #14
Closed
opened 2026-09-10 01:16:48 +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#14
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.
Nothing needed from you right now -- filing this so it is not lost, found
while diagnosing weblib-viewer#26's publish-pipeline fallout.
What happened
fdroid-dev.ymlrunsreport_job_log.pyonif: failure(), same pattern asevery other consumer. weblib-viewer's PR#27 merged to
development, and theresulting
pushrun (task id 1769, shac9d6db67) failed after ~12.5minutes.
report_job_log.pyran (its ownif: failure()guard fired) butposted no comment anywhere --
repos/weblib/weblib-viewer/issues/27/commentsstayed empty even though #27 was the PR that had just introduced the change.
Job logs return 500 on this Gitea (the whole reason this script exists), so
that failure was otherwise completely invisible: no comment, no readable log,
nothing.
Why, by the script's own logic
pull_request_for_branch()is givenGITHUB_HEAD_REForGITHUB_REF_NAMEasbranch, then looks for an open PR whosehead.refequals it. For apushevent ondevelopment, that branch is literallydevelopment-- thebranch pushed to, not the feature branch that was just merged and whose PR
is now closed. No open PR has
head.ref == "development", sopull_request_for_branchcorrectly returnsNone, and the script doesexactly what its own docstring says: "A push to a branch with no PR still has
nowhere to comment, which is honest: there is no thread for it."
So this is not a bug in the branch-lookup logic -- it is working as designed,
and that design is right for an ordinary test/CI workflow where nobody is
watching a closed PR after merge. It stops being right for a publish
workflow that runs on every push to
development/mainand has nosubsequent PR to attach to: a failure there currently has zero readable
channels -- not the log (500), not a PR comment (no open PR), nothing. I only
found this run's actual failure by hardcoding
--pr <known number>on athrowaway debug commit and re-dispatching, which is not a diagnostic anyone
should have to reach for on every red push.
Confirmed working: the workflow_dispatch path
For contrast, dispatching the same workflow manually against a branch that
still has an open PR does get a comment --
pull_request_for_branchcorrectly resolved weblib-viewer#27 from
GITHUB_REF_NAMEfor twoworkflow_dispatchruns (ids 1767, 1773) while that PR was open. The gap isspecifically: event is
push, and there is no open PR for the pushed branchat all (the common case for
development/main, since a push there usuallymeans a PR just merged and closed).
Not proposing a fix here
Options that come to mind, none evaluated: comment on the PR that most
recently merged into the pushed branch (needs a commit-to-PR lookup, which
Gitea may or may not expose cheaply); fall back to opening/commenting on a
standing "CI status" issue for push-triggered failures; or accept the gap and
document it as a known blind spot for anyone adding a push-triggered publish
workflow. Leaving the call to whoever picks this up -- filing it now so the
gap is on record rather than rediscovered the next time a post-merge publish
fails silently.