riverqueue / riverqueue/river

`FinalizedAt` struct field is not set on `Job` for cancelled events

Open
#515 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
5.7k
Forks
179
Avg merge
15h 43m
Merged PRs (30d)
13

Description

I'm subscribing to terminal job states:

	ch, cancel := rc.Subscribe(
		river.EventKindJobFailed,
		river.EventKindJobCancelled,
		river.EventKindJobCompleted)

And I noticed that the FinalizedAt struct field for Job is nil when the job is cancelled. This is confusing because other parts of the code seem to suggest that Finalized includes cancelled jobs so I would expect it to be set.

https://github.com/riverqueue/riverui/blob/93b4f537a1b64382ac359c42c8730255e9a9f446/ui/src/components/JobList.tsx#L174

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Finalized display logic in ui/src/components/JobList.tsx around line 174, then trace how cancelled job events populate the Go Job struct and FinalizedAt. Confirm the behavior for EventKindJobCancelled alongside failed and completed events; done means cancelled jobs expose a non-nil FinalizedAt consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.