Open allancalix opened 1 month ago
Can you confirm which mechanism you are using to cancel the job?
I used the button in the UI in RiverUI, I'm assuming that calls JobCancel but I haven't checked. I did receive the event in the channel but got a nil pointer exception.
Thanks! This must be a scenario where the job is running on a remote node and gets cancelled, but for some reason doesn’t emit the fully updated job state.
I made a small program to replicate this issue but got a seemingly different issue, despite successfully canceling jobs I never get any events on my listener.
https://github.com/riverqueue/river/compare/master...allancalix:river:bug-cancel-sub-events?expand=1
I'm subscribing to terminal job states:
And I noticed that the
FinalizedAt
struct field forJob
is nil when the job is cancelled. This is confusing because other parts of the code seem to suggest thatFinalized
includes cancelled jobs so I would expect it to be set.https://github.com/riverqueue/riverui/blob/93b4f537a1b64382ac359c42c8730255e9a9f446/ui/src/components/JobList.tsx#L174