Skip to content

Commit

Permalink
Prepare release v0.4.0 (#308)
Browse files Browse the repository at this point in the history
Prepare `v0.4.0` for release. As usual, update all version in `go.mod`
files. Also, add some text in the changelog with a little more
information on breaking changes and the rationale behind putting many of
them in a single release.
  • Loading branch information
brandur authored Apr 21, 2024
1 parent 1200f71 commit ba9f219
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.0] - 2024-04-20

### Changed

⚠️ Version 0.4.0 has a number of small breaking changes which we've decided to release all as part of a single version. More breaking changes in one release is inconvenient, but we've tried to coordinate them in hopes that any future breaking changes will be non-existent or very rare. All changes will get picked up by the Go compiler, and each one should be quite easy to fix. The changes don't apply to any of the most common core APIs, and likely many projects won't have to change any code.

- **Breaking change:** There are a number of small breaking changes in the job list API using `JobList`/`JobListTx`:
- Now support querying jobs by a list of Job Kinds and States. Also allows for filtering by specific timestamp values. Thank you Jos Kraaijeveld (@thatjos)! 🙏🏻 [PR #236](https://github.com/riverqueue/river/pull/236).
- Job listing now defaults to ordering by job ID (`JobListOrderByID`) instead of a job timestamp dependent on on requested job state. The previous ordering behavior is still available with `NewJobListParams().OrderBy(JobListOrderByTime, SortOrderAsc)`. [PR #XXX](https://github.com/riverqueue/river/pull/XXX).
- The function `JobListCursorFromJob` no longer needs a sort order parameter. Instead, sort order is determined based on the job list parameters that the cursor is subsequently used with. [PR #XXX](https://github.com/riverqueue/river/pull/XXX).
- Job listing now defaults to ordering by job ID (`JobListOrderByID`) instead of a job timestamp dependent on on requested job state. The previous ordering behavior is still available with `NewJobListParams().OrderBy(JobListOrderByTime, SortOrderAsc)`. [PR #307](https://github.com/riverqueue/river/pull/307).
- The function `JobListCursorFromJob` no longer needs a sort order parameter. Instead, sort order is determined based on the job list parameters that the cursor is subsequently used with. [PR #307](https://github.com/riverqueue/river/pull/307).
- **Breaking change:** Client `Insert` and `InsertTx` functions now return a `JobInsertResult` struct instead of a `JobRow`. This allows the result to include metadata like the new `UniqueSkippedAsDuplicate` property, so callers can tell whether an inserted job was skipped due to unique constraint. [PR #292](https://github.com/riverqueue/river/pull/292).
- **Breaking change:** Client `InsertMany` and `InsertManyTx` now return number of jobs inserted as `int` instead of `int64`. This change was made to make the type in use a little more idiomatic. [PR #293](https://github.com/riverqueue/river/pull/293).
- **Breaking change:** `river.JobState*` type aliases have been removed. All job state constants should be accessed through `rivertype.JobState*` instead. [PR #300](https://github.com/riverqueue/river/pull/300).
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ require (
github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa
github.com/jackc/pgx/v5 v5.5.5
github.com/jackc/puddle/v2 v2.2.1
github.com/riverqueue/river/riverdriver v0.3.0
github.com/riverqueue/river/riverdriver/riverdatabasesql v0.3.0
github.com/riverqueue/river/riverdriver/riverpgxv5 v0.3.0
github.com/riverqueue/river/rivertype v0.3.0
github.com/riverqueue/river/riverdriver v0.4.0
github.com/riverqueue/river/riverdriver/riverdatabasesql v0.4.0
github.com/riverqueue/river/riverdriver/riverpgxv5 v0.4.0
github.com/riverqueue/river/rivertype v0.4.0
github.com/robfig/cron/v3 v3.0.1
github.com/stretchr/testify v1.9.0
go.uber.org/goleak v1.3.0
Expand Down
2 changes: 1 addition & 1 deletion riverdriver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ go 1.21.4

replace github.com/riverqueue/river/rivertype => ../rivertype

require github.com/riverqueue/river/rivertype v0.3.0
require github.com/riverqueue/river/rivertype v0.4.0
4 changes: 2 additions & 2 deletions riverdriver/riverdatabasesql/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ replace github.com/riverqueue/river/rivertype => ../../rivertype

require (
github.com/lib/pq v1.10.9
github.com/riverqueue/river/riverdriver v0.3.0
github.com/riverqueue/river/rivertype v0.3.0
github.com/riverqueue/river/riverdriver v0.4.0
github.com/riverqueue/river/rivertype v0.4.0
github.com/stretchr/testify v1.9.0
)

Expand Down
4 changes: 2 additions & 2 deletions riverdriver/riverpgxv5/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ replace github.com/riverqueue/river/rivertype => ../../rivertype
require (
github.com/jackc/pgx/v5 v5.5.0
github.com/jackc/puddle/v2 v2.2.1
github.com/riverqueue/river/riverdriver v0.3.0
github.com/riverqueue/river/rivertype v0.3.0
github.com/riverqueue/river/riverdriver v0.4.0
github.com/riverqueue/river/rivertype v0.4.0
github.com/stretchr/testify v1.9.0
)

Expand Down

0 comments on commit ba9f219

Please sign in to comment.