riverqueue / riverqueue/river

`river_job.max_attempts` (the database column) should have a default value of 25

Open
#1,012 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

While writing documentation for how to insert a job using raw SQL, I came across the fact that while almost every river_job field gets a reasonable default, max_attempts is the odd man out and must have a value specified despite having a clear default of 25 in code.

Having a default on this column would be a slight improvement in that it'd make a manually inserted job a little easier to insert. Also, I think not having a default on this property may have been a mistake anyway since all other properties except the highly variable ones like kind and args have one.

Not worth its own migration, but let's ship the change opportunistically during the next migration that goes out.

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 by locating the river_job schema and the next migration that changes it. Check how other columns define defaults, then verify that a raw SQL insert can omit max_attempts and receive 25; the change is done when the schema default is included in that migration.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql
Domain
database
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.