Skip to content

Releases: riverqueue/river

v0.39.0

03 Jun 15:23
5535390

Choose a tag to compare

โš ๏ธ Breaking API change: rivermigrate.Migrator.Validate and rivermigrate.Migrator.ValidateTx now take a *rivermigrate.ValidateOpts parameter. Pass nil to preserve previous behavior. We normally endeavor not to make any breaking API changes, but this one will keep the API in a much nicer state, and is on an ancillary function that most installations won't be using. PR #1259

Added

  • Added MetadataSet to stage job metadata updates from worker middleware, HookWorkBegin, workers, or HookWorkEnd, with changes persisted when the job is completed. PR #1269

Changed

  • Add rivermigrate.ValidateOpts.TargetVersion so validation can check migrations up to a specific target version, matching the target-version behavior available on Migrate and MigrateTx. Notably, this is a breaking API change as the validate functions previously didn't take any options. PR #1259
  • When using (*Migrator[TTx]).Migrate with a TargetVersion that's already applied, River now no-ops idempotently instead of returning an error as a user convenience. PR #1260
  • Add logging statement for dropped job and queue subscription events at warn level when a subscriber buffer is full. PR #1271

Fixed

  • Add a 10-second timeout around StandardPilot.JobGetAvailable so a stalled standard-pilot fetch no longer hangs a producer indefinitely. PR #1255
  • Fixed rivertest.Worker.Work and WorkJob to honor a configured custom Config.Schema when transitioning a job to its running state. Previously, the running-state update ran unqualified and could fail on a connection whose search_path didn't include the configured schema. PR #1262

v0.38.0

22 May 17:54
4feea6a

Choose a tag to compare

Added

  • Added new configuration Config.SoftStopTimeout to provide a cleaner way to gracefully stop a client. PR #1239

v0.37.1

15 May 15:35
6e9d05c

Choose a tag to compare

Fixed

  • Wrap PeriodicJobEnqueuer.insertBatch database calls in a 30-second timeout. Previously, a stalled pgx Begin/Insert/Commit could hang the periodic enqueuer indefinitely, halting all periodic job insertion until the process was restarted or leader re-elected. PR #1251

v0.37.0

11 May 18:14
51699f5

Choose a tag to compare

Added

  • Added "resumable jobs" that can be broken down into multiple steps and with a step persisted after it finishes that lets them skip work that's already been done. This is particularly useful for long running jobs that may experience a cancellation (like in the event of a deploy) during the span of their run. PR #1226.

v0.36.0

10 May 00:22
86f0c84

Choose a tag to compare

Added

  • Add QeueueBundle.Remove to remove an already added queue/producer. PR #1235 and PR #1240.

Fixed

  • Fix unsafe concurrent producer map access in client. PR #1236.
  • Mark schema replacements as Stable in sqlc templates, preventing query SQL from having to be reallocated over and over again.. PR #1242.
  • Fix bug in sqltemplate cached path in order in which named args are passed to a query (previously, the order was unstable). PR #1243.

v0.35.1

26 Apr 18:29
051836e

Choose a tag to compare

Fixed

  • Fix accidentally inverted conditional on notifier error log check. PR #1231.

v0.35.0

18 Apr 20:20
0a60446

Choose a tag to compare

Changed

  • Ignore errors like tls: failed to send closeNotify alert (but connection was closed anyway) when closing listeners. PR #1216.

Fixed

  • Fixed leader election to track explicit database-issued leadership terms, reducing handoff flakiness and same-client reacquisition edge cases while making reelection and resign target the current leadership lease instead of a stale one. PR #1213.

v0.34.0

09 Apr 04:02
0143b85

Choose a tag to compare

Added

  • Added Config.ReindexerIndexNames and ReindexerIndexNamesDefault() so the reindexer's target indexes can be customized from the public API. PR #1194.

Fixed

  • Upon a client gaining leadership, its queue maintainer is given more than one opportunity to start. PR #1184.

v0.33.0

03 Apr 13:05
a0d45b0

Choose a tag to compare

Changed

  • Jobs erroring or panicking no longer logs at the error/warn level because this is not indicative of a problem inside of River itself. These log statements have been demoted to info. PR #1190.

Fixed

  • Fix in Client.Start where previously it was possible for a River client that only partially started before erroring to not try to start on subsequent Start invocations. PR #1187.

v0.32.0

23 Mar 16:25
0274f75

Choose a tag to compare

Added

  • riverlog.Middleware now supports MiddlewareConfig.MaxTotalBytes (default 8 MB) to cap total persisted river:log history per job. When the cap is exceeded, oldest log entries are dropped first while retaining the newest entry. Values over 64 MB are clamped to 64 MB. PR #1157.

Changed

  • Improved riverlog performance and reduced memory amplification when appending to large persisted river:log histories. PR #1157.
  • Reduced snooze-path memory amplification by setting snoozes in metadata updates before marshaling, avoiding an extra full-payload JSON rewrite. PR #1159.
  • Schema names are now quoted in SQL operations, enabling the use of spaces and other odd characters. PR #1175.

Fixed

  • riverpgxv5 now adapts JSON parameters for simple protocol / exec query modes so []byte JSON payloads are not encoded as bytea in pgx text-mode execution paths. This fixes invalid JSON syntax errors when running through protocol-constrained setups like PgBouncer transaction pooling while preserving normal behavior for explicit bytea parameters. Fixes #1153. PR #1155.