Changelog for Oban Pro v1.0.0

The v1.0 release contains absolutely no features or bug fixes, purely some deprecation cleanup and a renamed Smart engine.


❤️‍🩹🌟 Upgrading

Firstly, if your Pro version is behind v0.14, then the best method is to upgrade to Pro v0.14 and address any lingering deprecation warnings. You're ready to move on once you've handled older deprecation warnings!

All renamed or removed modules are also outlined below in deprecation cleanup.


Smart Engine

The SmartEngine moved into an Engines namespace for parity with Oban's engines. Rename any SmartEngine instances in your configuration:

- engine: Oban.Pro.Queue.SmartEngine
+ engine: Oban.Pro.Engines.Smart

Reference the Smart engine docs in their new home under the modules tab.


Structured Worker

The structured: ... option for defining the expected argument structure was replaced with args_schema in Pro v0.14. The translation mechanism that converted structured options into the corresponding args_schema is removed in v1.0, and you must update any structured workers:

- use Oban.Pro.Worker, structured: [keys: [:id, :account_id], required: [:id]]
+ use Oban.Pro.Worker
+ args_schema do
+   field :id, :id, required: true
+   field :account_id, :id
+ end

The args_schema syntax is far more robust than the old structured: ... keyword mechanism, so take some time to explore the Structured Jobs docs.


v1.0.1 — 2023-08-04



  • [DynamicPruner] Compare against the scheduled_at timestamp for all states.

    This matches similar changes to the Pruner in Oban v2.15.3 with this message:

    The previous pruning query checked a different timestamp field for each prunable state, e.g. cancelled used cancelled_at. There aren't any indexes for those timestamps, let alone the combination of each state and timestamp, which led to slow pruning queries in larger databases.

  • [Worker] Verify the Smart engine is used to run recorded jobs.

    Recorded jobs will run with the Basic engine, but nothing is recorded. Now, rather than silently failing, it returns an error tuple with a helfpul message.

  • [Smart] Validate the presence of :fields when :keys is set for partitions.

    Partitions require one or more :fields, but defaulted to an empty list. The empty list was ignored and limiters fell back to a non-partitioned mode.


Bug Fixes

  • [Smart] Safely cancel orphaned jobs from brand new global queues.

    Cancelling orphaned jobs from a queue that matches a currently running queue would cause an update failure: Postgrex.Error: ERROR 23502 (not_null_violation).

    The failure was due to an unhandled null case when attempting to decrement the tracked global count. This fixes the unhandled case while also preventing attempts to track jobs on "dead" producers entirely.

  • [DynamicCron] Include String.t as a possible error value

    Both delete/2 and update/3 may return a "not found" string when a cron entry isn't found.


v1.0.0 — 2023-06-30


Breaking Changes

  • [Oban.Pro.Queue.SmartEngine] Renamed to Oban.Pro.Engines.Smart.

  • [Oban.Pro.Worker] No longer supports :structured opts, use args_schema instead.


Deprecation Cleanup