Skip to content

Releases: riverqueue/river

v0.31.0

22 Feb 17:04
f603d0d

Choose a tag to compare

Added

  • Added root River CLI flag --statement-timeout so Postgres session statement timeout can be set explicitly for commands like migrations. Explicit flag values take priority over database URL query params, and query params still take priority over built-in defaults. PR #1142.

Fixed

  • Fix connection leak in Listener.Connect in case where afterConnectExec failed. Thanks Johan Kjölhede (@GiGurra)! PR #1147.
  • Fix missing ticker.Stop in producer's pollForSettingChanges (@GiGurra). PR #1148.
  • Fix accidental use of cancelled context for Notifier.Ping (@GiGurra). PR #1149.
  • Add jitter to fetch poll loop to prevent producer stampeding (@GiGurra). PR #1150.

Changed

  • Upgrade supported Go versions to 1.25 and 1.26, and update CI accordingly. PR #1144.

Fixed

  • JobCountByQueueAndState now returns consistent results across drivers, including requested queues with zero jobs, and deduplicates repeated queue names in input. This resolves an issue with the sqlite driver in River UI reported in riverqueue/riverui#496. PR #1140.

v0.30.2

27 Jan 07:39
a8d8127

Choose a tag to compare

Fixed

  • Fix bug in worker-level stuck job detection. PR #1133.

v0.30.1

19 Jan 17:56
584b221

Choose a tag to compare

Fixed

  • Stuck job detection now accounts for worker-level timeouts as well as client-level timeouts. PR #1125.

v0.30.0

12 Jan 20:54
534e585

Choose a tag to compare

Fixed

  • Fix possible nil pointer panic when using nil opts in Migrator.MigrateTx. PR #1117.

v0.29.0

22 Dec 21:11
ccbe042

Choose a tag to compare

Added

  • Added HookPeriodicJobsStart that can be used to run custom logic when a periodic job enqueuer starts up on a new leader. PR #1084.
  • Added Client.Notify().RequestResign and Client.Notify().RequestResignTx functions allowing any client to request that the current leader resign. PR #1085.
  • Basic stuck detection after a job's exceeded its timeout and still not returned after the executor's initiated context cancellation and waited a short margin for the cancellation to take effect. PR #1097.
  • Added Client.JobUpdate which can be used to persist job output partway through a running work function instead of having to wait until the job is completed. PR #1098.

Changed

  • Add a little more error flavor for when encountering a deadline exceeded error on leadership election suggesting that the user may want to try increasing their database pool size. PR #1101.
  • When migrating without an outer transaction, insert/delete version rows immediately after executing migration SQL so that in case a later migration fails, the migrator knows where to restart from. PR #1106.

v0.28.0

24 Nov 16:44
dce66cd

Choose a tag to compare

Added

  • Added riverlog.LoggerSafely which provides a non-panic variant of riverlog.Logger for use when code may or may not have a context logger available. PR #1093.

v0.27.1

21 Nov 16:01
3559f4d

Choose a tag to compare

  • Unique args: Handle embedded fields that are not structs. PR #1088.
  • Fix stack overflow when handling river:"unique" annotations on recursive types. PR #1090.

v0.27.0

17 Nov 04:50
1d6f63e

Choose a tag to compare

Added

  • Periodic jobs with IDs may now be removed by ID using the new PeriodicJobBundle.RemoveByID and PeriodicJobBundle.RemoveManyByID. PR #1071.

Changed

  • Decrease serviceutil.MaxAttemptsBeforeResetDefault from 10 to 7, lowering the effective limit on most internal exponential backoffs from ~512 seconds to 64 seconds. Further lowered the leader elector's keep leadership backoff interval to cap out at 4 seconds since leadership without a successful heartbeat will be lost soon after that anyway. PR #1079.

Fixed

  • Fix snoozed events emitted from rivertest.Worker when snooze duration is zero seconds. PR #1057.
  • Rollbacks now use an uncancelled context so as to not leave transactions in an ambiguous state if a transaction in them fails due to context cancellation. PR #1062.
  • Removing periodic jobs with IDs assigned also remove them from ID map. PR #1070.
  • Clear periodic jobs also fully clears all those assigned with an ID. PR #1083.
  • river:"unique" annotations on substructs within JobArgs structs are now factored into uniqueness ByArgs calculations. PR #1076.
  • Stop subservices and embedded baseservice.Service on error in the event of a periodic job enqueuer start error. PR #1081.

v0.26.0

08 Oct 01:28
3941f3e

Choose a tag to compare

⚠️ Internal APIs used for communication between River and River Pro have changed. If using River Pro, make sure to update River and River Pro to latest at the same time to get compatible versions. River v0.26.0 is compatible with River Pro v0.19.0.

Added

  • The job rescuer now sets river:rescue_count with an integer count of how many times the job has been rescued by the JobRescuer maintenance process when it's considered stuck. PR #1047.

Changed

  • Errors returned from job workers are now logged in full using a slog.Any attribute. Previously, only their error text was logged. PR #1051.

Fixed

  • Set updated_at when invoking pilot PeriodicJobUpsert. PR #1045.

v0.25.0

15 Sep 13:58
96877cf

Choose a tag to compare

⚠️ Internal APIs used for communication between River and River Pro have changed. If using River Pro, make sure to update River and River Pro to latest at the same time to get compatible versions. River v0.25.0 is compatible with River Pro v0.18.0.

Changed

  • Set minimum Go version to Go 1.24. PR #1032.
  • Breaking change: Client.JobDeleteMany now requires the use of JobDeleteManyParams.UnsafeAll to delete all jobs without a filter applied. This is a safety feature to make it more difficult to accidentally delete all non-running jobs. This is a minor breaking change, but on a fairly new feature that's not likely to be used on purpose by very many people yet. PR #1033.

Fixed

  • Don't double log fetch errors. PR #1025.
  • When snoozing a job with zero duration so that it's retried immediately, subscription events no longer appear incorrectly with a kind of rivertype.EventKindJobFailed. Instead they're assigned rivertype.EventKindJobSnoozed just like they would have with a non-zero snooze duration. PR #1037.