Skip to content

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 19, 2025

Bumps oban from 2.18.0 to 2.20.1.

Release notes

Sourced from oban's releases.

v2.20.0

This release brings a fantastic new helper function, an optional migration to aid pruning, some stability improvements, and a bevy of documentation updates.

🦋 Update Job

This introduces the Oban.update_job/2,3 function to simplify updating existing jobs while ensuring data consistency and safety. Previously, updating jobs required manually constructing change operations or complex queries that could lead to race conditions or invalid state changes.

Only a curated subset of job fields, e.g. :args, :max_attempts, :meta, etc. may be updated and they use the same validation rules as insertion to prevent invalid data. Updates are also wrapped in a transaction with locking clauses to prevent concurrent modifications.

The function supports direct map changes:

Oban.update_job(job, %{priority: 0, tags: ["urgent"]})

It also has a convenient function-based mode for dynamic changes:

Oban.update_job(job, fn job -> 
  %{meta: Map.put(job.meta, "processed_by", current_node())} 
end)

❄️ Unique State Groups

There are now named unique state groups to replace custom state lists for unique jobs, promoting better uniqueness design and reducing configuration errors.

Previously, developers had to manually specify lists of job states for uniqueness, which was error-prone and could lead to subtle bugs when states were omitted or incorrectly combined. The new predefined groups ensure correctness and consistency across applications.

The new state groups are:

  • :all - All job states
  • :incomplete - Jobs that haven't finished (~w(available scheduled executing retryable)a)
  • :scheduled - Only scheduled jobs ([:scheduled])
  • :successful - Jobs that completed successfully (~w(available scheduled executing retryable completed)a)

These groups eliminate the risk of accidentally creating incomplete or incorrect state lists that could allow duplicate jobs to be created when they shouldn't be, or prevent valid job creation when duplicates should be allowed.

🪺 Nested Plugin Supervision

Plugins and the internal Stager are now nested within a secondary supervision tree to improve system resilience and stability.

Previously, plugins were supervised directly under the main Oban supervisor alongside core process. This meant that plugin failures could potentially impact the entire Oban system, and frequent plugin restarts could trigger cascading failures in the primary supervision tree.

The new supervisor has more lenient restart limits to allow for more plugin restart attempts before giving up. This change makes Oban more robust in production environments where plugins may experience transient failures due to database or connectivity issues.

v2.20.0 — 2025-08-13

Enhancements

... (truncated)

Changelog

Sourced from oban's changelog.

v2.20.1 — 2025-08-15

Bug Fixes

  • [Worker] Handle missing fields in unique Worker validation.

    Workers that specified keys without fields would fail validation at compile time. Now default values are considered for use Oban.Worker as well as Job.new/2.

v2.20.0 — 2025-08-13

Enhancements

  • Migration Add V13 migration for indexing cancelled and discarded states.

    A new V13 migration adds compound indexes to significantly improve Oban.Plugins.Pruner performance when cleaning up discarded and cancelled jobs. This is especially beneficial for applications that process large volumes of jobs and retain them for extended periods.

  • Repo Expose dynamic repo switching as with_dynamic_repo/2

    The function was previously internal, which made impossible to use in external modules or extend upon. Now custom plugins and extensions can use Repo.with_dynamic_repo/2 to use the configured dynamic repo options.

Bug Fixes

  • [Oban] Allow insert_all/1,3 via Oban facade

    The insert_all/1 and insert_all/3 function variants were missing from the generated Oban facade functions when using a named instance.

  • [Testing] Generate correct perform_job/1,2,3 clauses.

    The perform_job/2,3 clauses generated by use Oban.Testing didn't handle the perform_job/2 variant designed to run jobs created with build_job/3. This caused test failures when trying to execute jobs built using the build_job/3 helper function.

    The fix generates the missing perform_job/2 clause along with a convenient perform_job/1 variant, ensuring all testing scenarios work seamlessly regardless of how jobs are constructed.

  • [Testing] Restrict inline execution to available and scheduled states.

    Jobs in the completed state or other non-runnable states were incorrectly attempted by the inline engine, potentially causing errors or unexpected behavior during testing.

  • [Worker] Disallow :keys when :fields doesn't contain :args or :meta

    Unique job configurations using :keys were allowed even when :fields didn't include :args or :meta, which would result in runtime errors since keys can only extract values from these

... (truncated)

Commits
  • d177b52 Release v2.20.1
  • 74756b3 Handle missing fields in Worker unique
  • 6501696 Release v2.20.0
  • baec2df Bump actions/checkout from 4 to 5 (#1331)
  • 215981e Restrict inline execution to available/scheduled
  • f2c26cc Remove commented out dead code from installer
  • d07f740 Bump the production-dependencies group with 2 updates (#1328)
  • 0d462e9 Fix duplicate word typo (#1327)
  • d1124e6 Bump the production-dependencies group with 2 updates (#1325)
  • 902d8c9 Nest plugins within a secondary supervision tree
  • 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 minor less important than important but more than nice-to-have labels Aug 19, 2025
Bumps [oban](https://github.com/oban-bg/oban) from 2.18.0 to 2.20.1.
- [Release notes](https://github.com/oban-bg/oban/releases)
- [Changelog](https://github.com/oban-bg/oban/blob/main/CHANGELOG.md)
- [Commits](oban-bg/oban@v2.18.0...v2.20.1)

---
updated-dependencies:
- dependency-name: oban
  dependency-version: 2.20.1
  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.20.1 branch from 75feb94 to 227cd08 Compare August 31, 2025 07:17
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 minor less important than important but more than nice-to-have
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants