Skip to content

Commit

Permalink
Prepare release 0.8.0
Browse files Browse the repository at this point in the history
Prepare release 0.8.0, mostly containing the changes in #32.
  • Loading branch information
brandur committed Dec 20, 2024
1 parent 2caf879 commit 30d186f
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
12 changes: 7 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.8.0] - 2024-12-19

⚠️ Version 0.8.0 contains breaking changes to transition to River's new unique jobs implementation and to enable broader, more flexible application of unique jobs. Detailed notes on the implementation are contained in [the original River PR](https://github.com/riverqueue/river/pull/590), and the notes below include short summaries of the ways this impacts this client specifically.

Users should upgrade backends to River v0.12.0 before upgrading this library in order to ensure a seamless transition of all in-flight jobs. Afterward, the latest River version may be used.

### Breaking

- **Breaking change:** The return type of `Client#insert_many` has been changed. Rather than returning just the number of rows inserted, it returns an array of all the `InsertResult` values for each inserted row. Unique conflicts which are skipped as duplicates are indicated in the same fashion as single inserts (the `unique_skipped_as_duplicated` attribute), and in such cases the conflicting row will be returned instead.
- **Breaking change:** Unique jobs no longer allow total customization of their states when using the `by_state` option. The pending, scheduled, available, and running states are required whenever customizing this list.
- **Breaking change:** The return type of `Client#insert_many` has been changed. Rather than returning just the number of rows inserted, it returns an array of all the `InsertResult` values for each inserted row. Unique conflicts which are skipped as duplicates are indicated in the same fashion as single inserts (the `unique_skipped_as_duplicated` attribute), and in such cases the conflicting row will be returned instead. [PR #32](https://github.com/riverqueue/riverqueue-ruby/pull/32).
- **Breaking change:** Unique jobs no longer allow total customization of their states when using the `by_state` option. The pending, scheduled, available, and running states are required whenever customizing this list. [PR #32](https://github.com/riverqueue/riverqueue-ruby/pull/32).

### Added

- The `UniqueOpts` class gains an `exclude_kind` option for cases where uniqueness needs to be guaranteed across multiple job types.
- The `UniqueOpts` class gains an `exclude_kind` option for cases where uniqueness needs to be guaranteed across multiple job types. [PR #32](https://github.com/riverqueue/riverqueue-ruby/pull/32).
- Unique jobs utilizing `by_args` can now also opt to have a subset of the job's arguments considered for uniqueness. For example, you could choose to consider only the `customer_id` field while ignoring the other fields:

```ruby
UniqueOpts.new(by_args: ["customer_id"])
```

Any fields considered in uniqueness are also sorted alphabetically in order to guarantee a consistent result across implementations, even if the encoded JSON isn't sorted consistently.
Any fields considered in uniqueness are also sorted alphabetically in order to guarantee a consistent result across implementations, even if the encoded JSON isn't sorted consistently. [PR #32](https://github.com/riverqueue/riverqueue-ruby/pull/32).

### Changed

- Unique jobs have been improved to allow bulk insertion of unique jobs via `Client#insert_many`.

This updated implementation is significantly faster due to the removal of advisory locks in favor of an index-backed uniqueness system, while allowing some flexibility in which job states are considered. However, not all states may be removed from consideration when using the `by_state` option; pending, scheduled, available, and running states are required whenever customizing this list.
This updated implementation is significantly faster due to the removal of advisory locks in favor of an index-backed uniqueness system, while allowing some flexibility in which job states are considered. However, not all states may be removed from consideration when using the `by_state` option; pending, scheduled, available, and running states are required whenever customizing this list. [PR #32](https://github.com/riverqueue/riverqueue-ruby/pull/32).

- Update REXML dependency. [PR #28](https://github.com/riverqueue/riverqueue-ruby/pull/36).

Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
PATH
remote: .
specs:
riverqueue (0.7.0)
riverqueue (0.8.0)

PATH
remote: driver/riverqueue-sequel
specs:
riverqueue-sequel (0.7.0)
riverqueue-sequel (0.8.0)
pg (> 0, < 1000)
sequel (> 0, < 1000)

Expand Down
4 changes: 2 additions & 2 deletions driver/riverqueue-activerecord/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
PATH
remote: ../..
specs:
riverqueue (0.7.0)
riverqueue (0.8.0)

PATH
remote: .
specs:
riverqueue-activerecord (0.7.0)
riverqueue-activerecord (0.8.0)
activerecord (> 0, < 1000)
activesupport (> 0, < 1000)
pg (> 0, < 1000)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "riverqueue-activerecord"
s.version = "0.7.0"
s.version = "0.8.0"
s.summary = "ActiveRecord driver for the River Ruby gem."
s.description = "ActiveRecord driver for the River Ruby gem. Use in conjunction with the riverqueue gem to insert jobs that are worked in Go."
s.authors = ["Blake Gentry", "Brandur Leach"]
Expand Down
4 changes: 2 additions & 2 deletions driver/riverqueue-sequel/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
PATH
remote: ../..
specs:
riverqueue (0.7.0)
riverqueue (0.8.0)

PATH
remote: .
specs:
riverqueue-sequel (0.7.0)
riverqueue-sequel (0.8.0)
pg (> 0, < 1000)
sequel (> 0, < 1000)

Expand Down
2 changes: 1 addition & 1 deletion driver/riverqueue-sequel/riverqueue-sequel.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "riverqueue-sequel"
s.version = "0.7.0"
s.version = "0.8.0"
s.summary = "Sequel driver for the River Ruby gem."
s.description = "Sequel driver for the River Ruby gem. Use in conjunction with the riverqueue gem to insert jobs that are worked in Go."
s.authors = ["Blake Gentry", "Brandur Leach"]
Expand Down
2 changes: 1 addition & 1 deletion riverqueue.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "riverqueue"
s.version = "0.7.0"
s.version = "0.8.0"
s.summary = "River is a fast job queue for Go."
s.description = "River is a fast job queue for Go. Use this gem in conjunction with gems riverqueue-activerecord or riverqueue-sequel to insert jobs in Ruby which will be worked from Go."
s.authors = ["Blake Gentry", "Brandur Leach"]
Expand Down

0 comments on commit 30d186f

Please sign in to comment.