• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / auth / 17277690859 / 1
71%
master: 71%

Build:
DEFAULT BRANCH: master
Ran 27 Aug 2025 08:23PM UTC
Files 154
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Aug 2025 08:15PM UTC coverage: 70.588% (-0.2%) from 70.815%
17277690859.1

push

github

web-flow
feat: introduce request-scoped background tasks & async mail sending (#2126)

## Summary
Introduce a new `apitask` package for running background tasks within
the lifecycle of an API request. We then use this feature in the mailer
client to send emails in the background. Before the request returns to
the caller we first wait for all in-flight tasks to exit.

**Summary:**
* Define a `Task` interface for light background work.
* Add `Run(ctx, task)` to schedule tasks asynchronously when supported,
or fall back to synchronous execution otherwise.
* Add `Wait(ctx)` to block until all request-scoped tasks finish
* Add `Middleware` to wrap HTTP handlers, attaching a request-scoped
worker to the context and ensuring all tasks complete before returning a
response.
* Add a check for `EmailBackgroundSending` in mailer package, when
present wrap the mail client in a `backgroundMailClient`. When `Mail` is
called it will send a `mailer.Task` to `apitasks.Run` to send the email
in the background using the wrapped `MailClient`.
* Add config `GOTRUE_MAILER_EMAIL_BACKGROUND_SENDING` (def `false`) -
on/off switch.

I will follow up with unit tests once the team has had an opportunity to
review.

---------

Co-authored-by: Chris Stockton <chris.stockton@supabase.io>

12348 of 17493 relevant lines covered (70.59%)

69.65 hits per line

Source Files on job 17277690859.1
  • Tree
  • List 154
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 17277690859
  • 2c8ea611 on github
  • Prev Job for on master (#17273411118.1)
  • Next Job for on master (#17278664257.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc