Releases: riverqueue/river
Releases ยท riverqueue/river
v0.39.0
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
MetadataSetto stage job metadata updates from worker middleware,HookWorkBegin, workers, orHookWorkEnd, with changes persisted when the job is completed. PR #1269
Changed
- Add
rivermigrate.ValidateOpts.TargetVersionso validation can check migrations up to a specific target version, matching the target-version behavior available onMigrateandMigrateTx. Notably, this is a breaking API change as the validate functions previously didn't take any options. PR #1259 - When using
(*Migrator[TTx]).Migratewith aTargetVersionthat'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.JobGetAvailableso a stalled standard-pilot fetch no longer hangs a producer indefinitely. PR #1255 - Fixed
rivertest.Worker.WorkandWorkJobto honor a configured customConfig.Schemawhen transitioning a job to its running state. Previously, the running-state update ran unqualified and could fail on a connection whosesearch_pathdidn't include the configured schema. PR #1262
v0.38.0
v0.37.1
v0.37.0
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
Added
Fixed
- Fix unsafe concurrent producer map access in client. PR #1236.
- Mark schema replacements as
Stablein sqlc templates, preventing query SQL from having to be reallocated over and over again.. PR #1242. - Fix bug in
sqltemplatecached path in order in which named args are passed to a query (previously, the order was unstable). PR #1243.
v0.35.1
v0.35.0
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
v0.33.0
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.Startwhere previously it was possible for a River client that only partially started before erroring to not try to start on subsequentStartinvocations. PR #1187.
v0.32.0
Added
riverlog.Middlewarenow supportsMiddlewareConfig.MaxTotalBytes(default 8 MB) to cap total persistedriver:loghistory 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
riverlogperformance and reduced memory amplification when appending to large persistedriver:loghistories. PR #1157. - Reduced snooze-path memory amplification by setting
snoozesin 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
riverpgxv5now adapts JSON parameters forsimple protocol/execquery modes so[]byteJSON payloads are not encoded asbyteain 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 explicitbyteaparameters. Fixes #1153. PR #1155.