Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump oban from 2.16.3 to 2.17.1 #21

Merged
merged 1 commit into from
Dec 16, 2023
Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 14, 2023

Bumps oban from 2.16.3 to 2.17.1.

Release notes

Sourced from oban's releases.

v2.17.0

This release includes an optional database migration to disable triggers and relax priority checks. See the v2.17 upgrade guide for step-by-step instructions.

📟 Universal Insert Notifications

Historically, Oban used database triggers to emit a notification after a job is inserted. That allowed jobs to execute sooner, without waiting up to a second until the next poll event. Those triggers and subsequent notifications added some overhead to database operations bulk inserts into the same queue, despite deduplication logic in the trigger. Even worse, trigger notifications didn't work behind connection poolers and were restricted to the Postgres notifier.

Now insert notifications have moved out of the database and into application code, so it's possible to disable triggers without running database migrations, and they work for any notifier, not just Postgres.

Disable notifications with the insert_trigger option if sub-second job execution isn't important or you'd like to reduce PubSub chatter:

config :my_app, Oban,
  insert_trigger: false,
  ...

🧑‍🏭 Worker Conveniences

Workers received a few quality of life improvements to make defining unique behaviour more expressive and intuitive.

First, it's now possible to define a job's unique period with time units like {1, :minute} or {2, :hours}, just like a job's :schedule_in option:

use Oban.Worker, unique: [period: {5, :minutes}]

Second, you can set the replace option in use Oban.Worker rather than in an overridden new/2 or as a runtime option. For example, to enable updating a job's scheduled_at value on unique conflict:

use Oban.Worker, unique: [period: 60], replace: [scheduled: [:scheduled_at]]

🐦‍🔥 Oban Phoenix Notifier

The new oban_notifiers_phoenix package allows Oban to share a Phoenix application's PubSub for notifications. In addition to centralizing PubSub communications, it opens up the possible transports to all PubSub adapters. As Oban already provides Postgres and PG (Distributed Erlang) notifiers, the new package primarily enables Redis notifications.

config :my_app, Oban,
  notifier: {Oban.Notifiers.Phoenix, pubsub: MyApp.PubSub},
  ...

🎚️ Ten Levels of Job Priority

Job priority may now be set to values between 0 (highest) and 9 (lowest). This increases the range from 4 to 10 possible priorities, giving applications much finer control over execution order.

</tr></table> 

... (truncated)

Changelog

Sourced from oban's changelog.

v2.17.1 — 2023-12-11

Bug Fixes

  • [Validation] Restore validation helpers still used externally

    Some of the internal validation helpers are needed by external packages that can't easily change to schema validation. This restores those essential validation functions.

v2.17.0 — 2023-12-08

Enhancements

  • [Oban] Add Oban.pause_all_queues/2 and Oban.resume_all_queues/2.

    Pause and resume all queues with a single function call and a single notification signal, rather than manually looping through all queues and issuing separate calls.

  • [Cron] Add non-raising Expression.parse/2 for use in Cron.parse/2 and shared validations.

    Multiple locations used parse! and converted a raised exception into an error tuple. That was inefficient, repetitive, and violated the common practice of avoiding exceptions for flow control.

  • [Validation] Use schema based validation for workers, plugins, and config.

    Validations are now simpler and more consistent, and behaviour based notifiers such as Engine, Repo, and Peer are more descriptive.

  • [Engine] Expand telemetry meta for all engine callbacks events.

    All callbacks now include every argument in telemetry event metadata. In some situations, e.g. :init, this simplifies testing and can be used to eliminate the need to poll a supervision tree to see which queues started.

  • [Notifier] Add Isolated notifier for local use and simplified testing.

    Using PG for async tests has occasional flakes due to its eventually consistent nature. In tests and single node systems, we don't need to broadcast messages between instances or nodes, and a simplified "isolated" mechanism is ideal.

  • [Repo] Add Repo.query!/4 for Ecto.Repo parity

  • [Migration] Configure a third-party engine's migrator using the repo's config map.

Bug Fixes

  • [Cron] Guard against invalid cron range expressions where the left side is greater than the right, e.g. SAT-FRI.

... (truncated)

Commits
  • 52749bf Release v2.17.1
  • 4288e8b Restore validation helpers still used externally
  • 3705af3 Release v2.17.0
  • 2dd13fb Bump ecto_sql from 3.11.0 to 3.11.1 (#997)
  • 832f0ed Convert config to use validate_schema
  • d5db1c2 Bump ecto_sqlite3 from 0.12.0 to 0.13.0 (#995)
  • 762adac Add Expression.parse/1 and use it for validation
  • 6deea9c Add shared cron :schedule schema validator
  • 731ba63 Add schema validation for booleans
  • 20b38cb Disable the prefix by default in testing helpers
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file elixir Pull requests that update Elixir code labels Dec 14, 2023
Bumps [oban](https://github.com/sorentwo/oban) from 2.16.3 to 2.17.1.
- [Release notes](https://github.com/sorentwo/oban/releases)
- [Changelog](https://github.com/sorentwo/oban/blob/main/CHANGELOG.md)
- [Commits](oban-bg/oban@v2.16.3...v2.17.1)

---
updated-dependencies:
- dependency-name: oban
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/hex/oban-2.17.1 branch from 48c4dcc to 3b429ba Compare December 15, 2023 10:26
@evilmarty evilmarty merged commit a5426c2 into main Dec 16, 2023
2 checks passed
@dependabot dependabot bot deleted the dependabot/hex/oban-2.17.1 branch December 16, 2023 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file elixir Pull requests that update Elixir code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant