[Stager] Rescue and report staging errors with telemetry
Staging errors from queue contention or other database issues would cause the top level stager process to crash. Eventually that could shut down the entire Oban supervision tree. Now we rescue standard database connectivity issues instead and report them as errors in telemetry.
[Telemetry] Include result in job exception telemetry
Returning an {:error, reason} tuple triggers an :exception telemetry event, but there's still a return value. Exception events for crashes, raises, timeouts, and kills will have a nil result value.
[Queue] Add producer handle_call clause for engine put_meta calls.
Previously, the only way to put meta was through a non-blocking notification to handle_info.
v2.17.2
Enhancements
[Oban] Support passing changeset streams to insert_all.
Accepting streams makes Oban.insert_all more flexible and may, in some circumstances, make it possible to reduce memory usage for streams of large resources.
Bug Fixes
[Config] Validate :repo option without checking for Ecto.Repo behaviour.
Repo wrappers that don't implement all functions of the Ecto.Repo behaviour are still viable and shouldn't be validated with a behaviour check. This changes repo validation back to the way it was done in older versions, by checking that it's a valid module that exports config/0.
[Peer] Handle rollback during Oban.Peers.Postgres peer election
Infrequently, the postgres peer election transaction returns {:error, :rollback}. Now that return value is handled to prevent a match error.
The peer maintains its current leader? status on rollback—this may cause inconsistency if the leader encounters an error and multiple rollbacks happen in sequence. That tradeoff is acceptable because the situation is unlikely and less of an issue than crashing the peer.
[Oban] Skip queue existence check for pause_all_queues and resume_all_queues when the local_only option is passed.
v2.17.1
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
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.
[Stager] Rescue and report staging errors with telemetry
Staging errors from queue contention or other database issues would cause the top level stager
process to crash. Eventually that could shut down the entire Oban supervision tree. Now we
rescue standard database connectivity issues instead and report them as errors in telemetry.
[Telemetry] Include result in job exception telemetry
Returning an {:error, reason} tuple triggers an :exception telemetry event, but there's still
a return value. Exception events for crashes, raises, timeouts, and kills will have a nil
result value.
[Queue] Add producer handle_call clause for engine put_meta calls.
Previously, the only way to put meta was through a non-blocking notification to handle_info.
v2.17.2 — 2023-01-11
Enhancements
[Oban] Support passing changeset streams to insert_all.
Accepting streams makes Oban.insert_all more flexible and may, in some circumstances, make it
possible to reduce memory usage for streams of large resources.
Bug Fixes
[Config] Validate :repo option without checking for Ecto.Repo behaviour.
Repo wrappers that don't implement all functions of the Ecto.Repo behaviour are still viable and
shouldn't be validated with a behaviour check. This changes repo validation back to the way it
was done in older versions, by checking that it's a valid module that exports config/0.
[Peer] Handle rollback during Oban.Peers.Postgres peer election
Infrequently, the postgres peer election transaction returns {:error, :rollback}. Now that
return value is handled to prevent a match error.
The peer maintains its current leader? status on rollback—this may cause inconsistency if the
leader encounters an error and multiple rollbacks happen in sequence. That tradeoff is
acceptable because the situation is unlikely and less of an issue than crashing the peer.
[Oban] Skip queue existence check for pause_all_queues and resume_all_queues when the
local_only option is passed.
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 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)
Bumps oban from 2.13.5 to 2.17.3.
Release notes
Sourced from oban's releases.
... (truncated)
Changelog
Sourced from oban's changelog.
... (truncated)
Commits
8f11903
Release v2.17.3e02b96b
Add producer call handler for put_meta events230a778
Include result in job exception telemetryea2dfb5
Update package description to mention sqlite3e8bd32d
Set pool size to double schedulers online611565f
Bump ecto_sqlite3 from 0.14.0 to 0.15.0 (#1020)4ca452a
Rescue and report staging errors with telemetrye0c4051
Ensure queues are running during start_supervised5f5c738
Update upgrade guide to reference the new down migration (#1017)542185f
Reduce assert receive wait time for shutdown testsDependabot 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