chore(deps): update dependency oban to v2.22.1#486
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
4c597aa to
00b3246
Compare
00b3246 to
bca4229
Compare
bca4229 to
1fc5e09
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.21.1→== 2.22.1Release Notes
oban-bg/oban (oban)
v2.22.1Compare Source
Bug Fixes
[Repo] Conditionally reference database driver errors
The retryable_exceptions macro previously hard-coded references to
MyXQL.ErrorandPostgrex.Error, which Elixir v1.20.0.rc.2+ flags as missing module references at macroexpansion time when the corresponding driver isn't a project dependency. The missing module
reference could escalate into a deadlock, and compilation would halt entirely.
Driver error lists are now resolved at compile time and only include modules that are actually
loaded, so projects using
PostgrexwithoutMyXQL(or vice versa) compile cleanly.[Cron] Reject impossible combinations in cron expressions
Cron strings whose day and month fields could never align (e.g. "0 0 30 2 *", or "0 0 31 4 *")
parsed, but caused
next_at/2andlast_at/2to loop indefinitely.Now expressions are validated to ensure at least one day fits within the maximum length of at
least one selected month.
[Cron] Validate cron range bounds before expansion
Range parts like 0-99999999 were accepted and expanded into the full integer range before the
out-of-bounds check fired. For sufficiently large upper bounds that could stall the BEAM and
risk OOM. The same path was reachable via the step variant 0-99999999/1 and the open-ended form
9999999/1.Expression parsing now compares against the field's allowed min/max and rejects out-of-range
values before any range is materialized.
[Migration] Fix prefix escaping in Postgres migrations
Switch to the standard doubled-quote escape so it works under default Postgres configuration.
The escaped_prefix value was using
\'to escape single quotes, which hasn't been enabled bydefault since 9.1. Under default settings, the backslash was treated literally and the quote
terminated the string, allowing a crafted prefix to break out of the SQL literal in
migrated_version/1and the notify trigger bodies.[Backoff] Narrow
with_retryexit catch to :timeoutExits never carry a database error module atom in the first tuple
element. Connection failures surface as raised database exceptions,
which the rescue clause above already handles. The catch now only
matches
:exit, {:timeout, _}, the one shape that's actually reachable.v2.22.0Compare Source
Enhancements
[Oban] Add
Oban.all_jobs/2andOban.Job.query/1Introduce
Oban.Job.query/1, a keyword-based builder that composes Ecto queryable from a smallset of field filters. Scalar values become equality matches, lists become
INmatches, atomsare coerced, and
argsormetaare compiled to a containment check.That pairs with
Oban.all_jobs/2, a thin function that runs any queryable through theconfigured repo.
[Oban] Verify migrations at startup in testing mode
When Oban starts in a testing mode, it now verifies that migrations have been run and are up to
date. This catches migration issues early in CI rather than failing with confusing database
errors during test execution or worse, in production.
For Postgres, the check verifies the migration version is current, while for SQLite and MySQL,
the check verifies the
oban_jobstable exists.[Sonar] Reduce ping rate with status-aware intervals
Sonar previously pinged every 5s regardless of cluster state, which is aggressive for systems
where nothing is changing. It now walks between a min and max interval, resetting on any status
change and otherwise backing off toward a status driven target:
:clusteredscales with peer count so aggregate traffic stays ~1 ping permin_intervalregardless of cluster size
:solitarydrifts to the max interval, since its only job is verifying the notifier channel:isolatedand:unknownstay atmin_intervalto keep recovery probesStale-node pruning now uses an absolute window (default 120s) instead of a multiple of the
current interval, and scheduled pings are jittered to avoid synchronizing nodes.
[Repo] The Repo retry behavior is now compile-time configurable, partially for
testing purposes, but also to allow tweaking the internal retry behavior
based on system requirements.
[Repo] Allow disabling
transaction/3retriesPass
retry: 0orretry: falseto skip retries entirely, including for expected conflictslike deadlocks and serialization failures. This is intended for callers invoking queries like
Oban.insert/2from within an existing transaction, where a retry inside a savepoint would maskthe real error from the outer transaction.
Bug Fixes
[Stager] Notify queues regardless of staging success
When
stage_jobs/3raises a non-recoverable exception (e.g. a unique constraint violation), thewrapping transaction rolls back and the queue notification never fires. Pre-existing
availablejobs would then sit until the stager either recovered or the cluster was restarted.
The stager now falls back to notifying queues outside the failed transaction, preferring the
configured global path so the whole cluster is reached, and dropping to a local registry notify
if the database itself is unreachable.
[Testing] Include suspended jobs in test helper queries
The query used by test helpers like
all_enqueued/0,1now includessuspendedjobs in additionto
availableandscheduledstates.[Repo] Tolerate unavailable Repo modules from all operations
In development using containers, where recompiles take several seconds, the repo module can be
purged and not-yet-reloaded for long enough that multiple
Stagerticks occur. Each tick maycrash with
UndefinedFunctionError, blowing through the supervisor's restart quota.The Repo now rescues
UndefinedFunctionErroralongside the existing connection errors.[Notifier] Fix duplicate pid accumulation in Postgres notifier
Registering from the same process multiple times would accumulate duplicate pids in the Postgres
notifier. Listening was deduplicated, but process registration wasn't.
Configuration
📅 Schedule: (in timezone America/New_York)
* 0-3 * * *)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.