oban v2.11.0 Release Notes

Release Date: 2022-02-13 // about 2 years ago
  • โœจ Enhancements

    • [Migration] Change the order of fields in the base index used for the primary Oban queries.

    The new order is much faster for frequent queries such as scheduled job staging. Check the v2.11 upgrade guide for instructions on swapping the index in existing applications.

    • ๐Ÿ‘ท [Worker] Avoid spawning a separate task for workers that use timeouts.

    • ๐Ÿ‘ท [Engine] Add insert_job, insert_all_jobs, retry_job, and retry_all_jobs as required callbacks for all engines.

    • ๐Ÿ”Œ [Oban] Raise more informative error messages for missing or malformed plugins.

    Now missing plugins have a different error from invalid plugins or invalid options.

    • ๐Ÿ“‡ [Telemetry] Normalize telemetry metadata for all engine operations:

      • Include changeset for insert
      • Include changesets for insert_all
      • Include job for complete_job, discard_job, etc
    • [Repo] Include [oban_conf: conf] in telemetry_options for all Repo operations.

    With this change it's possible to differentiate between database calls made by Oban versus the rest of your application.

    ๐Ÿ› Bug Fixes

    • ๐Ÿ‘ท [Telemetry] Emit discard rather than error events when a job exhausts all retries.

    Previously discard_job was only called for manual discards, i.e., when a job returned :discard or {:discard, reason}. Discarding for exhausted attempts was done within error_job in error cases.

    • ๐Ÿ‘ท [Cron] Respect the current timezone for @reboot jobs. Previously, @reboot expressions were evaluated on boot without the timezone applied. In that case the expression may not match the calculated time and jobs wouldn't trigger.

    • [Cron] Delay CRON evaluation until the next minute after initialization. Now all cron scheduling ocurrs reliably at the top of the minute.

    • [Drainer] Introduce discard accumulator for draining results. Now exhausted jobs along with manual discards count as a discard rather than a failure or success.

    • [Oban] Expand changeset wrapper within multi function.

    Previously, Oban.insert_all could handle a list of changesets, a wrapper map with a :changesets key, or a function. However, the function had to return a list of changesets rather than a changeset wrapper. This was unexpected and made some multi's awkward.

    • โฑ [Testing] Preserve attempted_at/scheduled_at in perform_job/3 rather than overwriting them with the current time.

    • ๐Ÿ”Œ [Oban] Include false as a viable queue or plugin option in typespecs

    ๐Ÿ—„ Deprecations

    • ๐Ÿ—„ [Telemetry] Hard deprecate Telemetry.span/3, previously it was soft-deprecated.

    Removals

    • ๐Ÿ“š [Telemetry] Remove circuit breaker event documentation because :circuit events aren't emitted anymore.

    ๐Ÿ‘€ For changes prior to v2.11 see the v2.10 docs.

    ๐Ÿ“„ [opc]: https://getoban.pro/docs/pro/changelog.html ๐ŸŒ [owc]: https://getoban.pro/docs/web/changelog.html