All notable changes to this project will be documented in this file.
0.7.0 - 2024-12-16
Changed
- Updated internal dependency of
riverqueue/river
to compensate for a change tobaseservice.Archetype
and a utility function.
Removed
- Previously deprecated workflow APIs have been removed. Users should upgrade to v0.6.0 and fix any deprecations before upgrading to this release.
0.6.0 - 2024-11-03
Added
- Added
riverworkflow.NameFromJobRow
andriverworkflow.TaskFromJobRow
to make it easy to extract the workflow name and workflow task name from a job's metadata.
Deprecated
In the v0.5.0 release, several top-level functions were added to the riverpro
package by mistake. These have been deprecated in favor of the riverworkflow
variants:
river.WorkflowIDFromJobRow
becomesriverworkflow.IDFromJobRow
.river.JobListParams
can be changed to the preexistingriverworkflow.JobListParams
.river.JobListParamsByID
can be changed to the preexistingriverworkflow.JobListParamsByID
.
In addition, more deprecations were marked in the riverworkflow
package for things that should now be done with the main riverpro
package. The next release will remove the remaining deprecations.
0.5.1 - 2024-10-18
Fixed
- Fixed an initialization panic when using the
riverpropgxv5
driver with a regularriver.Client
.
0.5.0 - 2024-10-08
⚠️ v0.5.0 makes significant changes to the way workflows are interacted with, and introduces a riverpro.Client
to allow for better extensibility. Pro customers should migrate to this new interface for existing workflow usage, as well as to access new Pro features including Sequences and other upcoming functionality.
The API changes can be fixed with a few quick find & replaces and should take no more than a few minutes to complete:
- Change
river.NewClient
toriverpro.NewClient
. - Change
river.Client
toriverpro.Client
. - Change
river.ClientFromContext
toriverpro.ClientFromContext
. - Change
river.Config
to be nested as theConfig
attr within ariverpro.Config
. - Change
riverworkflow.Workflow
toriverpro.NewWorkflow
. - Change
riverworkflow.Opts
toriverpro.WorkflowOpts
. - Change
riverworkflow.TaskOpts
toriverpro.WorkflowTaskOpts
. - Change
riverworkflow.Prepare(ctx, riverClient,
toriverClient.WorkflowPrepare(ctx,
. - Change
riverworkflow.PrepareTx(ctx, riverClient,
toriverClient.WorkflowPrepareTx(ctx,
.
These APIs should be stable going forward as the new design is flexible enough to support all the upcoming functionality on the short term roadmap.
Added
- Added a new
riverpro.Client
type andriverpro.NewClient
constructor. This newClient
should be used in River Pro projects in order to access Pro functionality like workflows, sequences, and other upcoming features. Most usage of the oldriverworkflow
package has been deprecated and will be removed in an upcoming release. - Introduce a new "Sequences" Pro feature ✨. Sequences enable a sequence of jobs to run in a strict one-at-a-time sequential order based on their insertion order. Sequences can be partitioned in several ways, including by arguments (full or partial), queue name, and job kind. Within each sequence, River Pro ensures that each sequence
- Added
WorkflowCancel
andWorkflowCancelTx
methods toriverpro.Client
to enable cancelling all non-finalized tasks in a workflow. - Add
riverpro.ClientFromContext
to extract ariverpro.Client
from workers, equivalent toriver.ClientFromContext
for regular clients. - Add
riverpro.ContextWithClient
to inject a client into the context in order to facilitate testing a worker that makes use ofriverpro.ClientFromContext
.
Breaking
- The
config
argument has been removed from theriverpropgxv5.New
constructor because it is now provided to theriverpro.Client
constructor and propagated internally as necessary. - The deprecated
Prepare
method onriverworkflow.Workflow
has been removed. Use the top-levelriverpro.Client
type along with itsWorkflowPrepare
/WorkflowPrepareTx
methods.
Deprecated
- ⚠️ Most of the
riverworkflow
package has been deprecated and will be removed in a future release. Users should transition to theriverpro.Client
type along with its related workflow functionality. While this API shift is regrettable, it's necessary to ensure a good experience going forward and to be compatible with upcoming functionality.
0.4.1 - 2024-09-23
Correctly upgrade River dependencies to v0.12.0.
0.4.0 - 2024-09-23
- Upgrade to use River v0.12.0.
v0.3.1 - 2024-09-17
Fixed
- riverpropgxv5:
UnwrapExecutor
(for unwrapping a non-pro executor) now works when using anil
driver, which is required for use in functions likerivertest.RequireInsertedTx
.
v0.3.0 - 2024-09-11
Fixed
- Workflows: Fix an issue with directly mutating user-provided opts structs by ensuring we take copies of them prior to mutating. Without this fix, users who provided the same
InsertOpts
pointer to multiple workflow tasks would see identical metadata on all resulting tasks (rather than task-specific metadata as expected).
v0.2.1 - 2024-08-12
Fixed
- Lowered the
go
directives ingo.mod
to Go 1.21, which River aims to support. A more modern version of Go is specified with thetoolchain
directive. This should provide more flexibility on the minimum required Go version for programs importing River. - Fixed a potential panic when unwrapping the pro driver and executor.
v0.2.0 - 2024-08-03
Added
Tasks can now be dynamically added to an existing workflow. The
riverworkflow.FromExisting()
constructor initiates a workflow from an existing job in that workflow. New tasks can be added using the same.Add()
method that's used for a brand new worfklow. When preparing the workflow for insert using top-levelPrepare
andPrepareTx
functions, existing jobs will be automatically loaded as needed to validate the workflow dependency graph.New top-level functions in the
riverworkflow
package forPrepare
andPrepareTx
. These are used to prepare a workflow's tasks/jobs for insertion into the database, including validations of task dependencies. These functions should be preferred overworkflow.Prepare
which will be removed in the next release.
Deprecated
- The
Prepare
method onriverworkflow.Workflow
has been deprecated in favor of the new top-levelPrepare
andPrepareTx
functions in that package. The new functions present a single interface for preparing workflow tasks for insertion, whether the workflow is brand new or for adding tasks to an existing workflow. This method will be removed in an upcoming release.
v0.1.1 - 2024-07-25
Added
- This is the initial release of River Pro.