Telemetry options are exposed in Ecto instrumentation but aren't obviously available in the opts passed to prepare_query. Now all queries have an oban: true option so users can ignore them in multi-tenancy setups.
[Engine] Generate a UUID for all Basic and Lite queue instances to aid in identifying orphaned jobs or churning queue producers.
[Oban] Use Logger.warning/2 and replace deprecated use of :warn level with :warning across all modules.
Bug Fixes
[Job] Validate changesets during Job.to_map/1 conversion
The Job.to_map/1 function converts jobs to a map "entry" suitable for use in insert_all. Previously, that function didn't perform any validation and would allow inserting (or attempting to insert) invalid jobs during insert_all. Aside from inconsistency with insert and insert!, insert_all could insert invalid jobs that would never run successfully.
Now to_map/1 uses apply_action!/2 to apply the changeset with validation and raises an exception identical to insert!, but before calling the database.
[Notifier] Store PG notifier state in the registry for non-blocking lookup
We pull the state from the notifier's registry metadata to avoid GenServer.call timeouts when the system is under high load.
[Migration] Add primary_key explicitly during SQLite3 migrations
If a user has configured Ecto's :migration_primary_key to something other than bigserial the schema is incompatible with Oban's job schema.
v2.15.1
Enhancements
[Telemetry] Add [:oban, :stager, :switch] telemetry event and use it for logging changes.
Aside from an instrumentable event, the new logs are structured for consistent parsing on external aggregators.
[Job] Remove default priority from job schema to allow changing defaults through the database
Bug Fixes
[Basic] Restore attempt < max_attempts condition when fetching jobs
In some situations, a condition to ensure the attempts don't exceed max attempts is still necessary. By checking the attempts outside the CTE we maintain optimal query performance for the large scan that finds jobs, and only apply the check in the small outer query.
[Pruner] Add missing :interval to t:Oban.Plugins.Pruner.option/0
v2.15.0
🗜️ Notification Compression
Oban uses notifications across most core functionality, from job staging to cancellation. Some notifications, such as gossip, contain massive redundancy that compresses nicely. For example, this table breaks down the compression ratios for a fairly standard gossip payload containing data from ten queues:
Telemetry options are exposed in Ecto instrumentation, but they aren't obviously available in the
opts passed to prepare_query. Now all queries have an oban: true option so users can ignore
them in multi-tenancy setups.
[Engine] Generate a UUID for all Basic and Lite queue instances to aid in identifying
orphaned jobs or churning queue producers.
[Oban] Use Logger.warning/2 and replace deprecated use of :warn level with :warning
across all modules.
Bug Fixes
[Job] Validate changesets during Job.to_map/1 conversion
The Job.to_map/1 function converts jobs to a map "entry" suitable for use in insert_all.
Previously, that function didn't perform any validation and would allow inserting (or attempting
to insert) invalid jobs during insert_all. Aside from inconsistency with insert and
insert!, insert_all could insert invalid jobs that would never run successfully.
Now to_map/1 uses apply_action!/2 to apply the changeset with validation and raises an
exception identical to insert!, but before calling the database.
[Notifier] Store PG notifier state in the registry for non-blocking lookup
To avoid GenServer.call timeouts when the system is under high load we pull the state from the
notifier's registry metadata.
[Migration] Add primary_key explicitly during SQLite3 migrations
If a user has configured Ecto's :migration_primary_key to something other than bigserial the
schema is incompatible with Oban's job schema.
v2.15.1 — 2023-05-11
Enhancements
[Telemetry] Add [:oban, :stager, :switch] telemetry event and use it for logging changes.
Aside from an instrumentable event, the new logs are structured for consistent parsing on
external aggregators.
[Job] Remove default priority from job schema to allow changing defaults through the database
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 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)
Bumps oban from 2.12.0 to 2.15.2.
Release notes
Sourced from oban's releases.
... (truncated)
Changelog
Sourced from oban's changelog.
... (truncated)
Commits
68dbebf
Release v2.15.292940b1
Format using Elixir 1.15 with updated format rules0b8fd4e
Bump Elixir to 1.15 as latest in testing matrix83857bb
Handle lingering use of deprecated :warn log levelda1ba3c
Add primary_key explicitly to SQLite3 (#911)843270a
Use Logger.warning/2 (#912)72d5696
Validate job changesets during map conversion2336848
Fix code sample for expected failures (#910)eb49010
Add troubleshooting docs around disabling peersa4ad81c
Generate and expose a uuid for basic producersDependabot 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 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)