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

supabase / supavisor / 23647210736
79%

Build:
DEFAULT BRANCH: main
Ran 27 Mar 2026 01:02PM UTC
Jobs 2
Files 123
Run time 1min
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 Mar 2026 12:55PM UTC coverage: 78.891% (-3.5%) from 82.398%
23647210736

push

github

web-flow
feat: add tenant ban/unban API endpoint (#895)

## Summary

- Adds `PATCH /api/tenants/:external_id` for banning and unbanning
tenants. Banned tenants receive a `FATAL` wire-level error (`EBANNED`)
on any new connection attempt.
- Adds `banned_at` / `ban_reason` fields to the `tenants` table via
migration, and a `TenantBannedError` that is checked in
`ClientHandler.Checks` before a connection is established.



https://linear.app/supabase/issue/POOLER-275/support-banning-and-unbanning-tenants-via-http-api


## OAS / CastAndValidate scope

`OpenApiSpex.Plug.CastAndValidate` is scoped to the `:patch` action only
via a conditional plug. `PutApiSpec` is added to the `:api` pipeline so
the spec is available for casting. Extending `CastAndValidate` to the
remaining actions is left as a TODO for a follow-up PR — those actions
currently pass params as string-keyed maps and would require coordinated
changes.



## TODO
- [x] make sure the migration that adds the fields is safe for the
version of Postgres we run on and won't do the full table scan to fill
in NULLs
- [ ] add metric for tracking banned tenants (likely a separate PR)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: felipe stival <14948182+v0idpwn@users.noreply.github.com>

20 of 20 new or added lines in 7 files covered. (100.0%)

116 existing lines in 16 files now uncovered.

2489 of 3155 relevant lines covered (78.89%)

58302.97 hits per line

Coverage Regressions

Lines Coverage ∆ File
22
84.74
-7.12% lib/supavisor/client_handler.ex
20
0.0
-83.33% lib/supavisor/client_handler/auth_methods/jit.ex
20
86.45
-6.45% lib/supavisor/db_handler.ex
17
0.0
-80.95% lib/supavisor/client_handler/auth_methods/password.ex
8
82.1
-4.94% lib/supavisor/manager.ex
5
61.54
-38.46% lib/supavisor/client_handler/auth_methods.ex
4
70.08
-2.36% lib/supavisor.ex
4
0.0
-80.0% lib/supavisor/errors/jit_unauthorized_error.ex
3
77.42
-9.68% lib/supavisor/tenant_cache.ex
3
0.0
-100.0% lib/supavisor/errors/jit_request_failed_error.ex
3
82.05
-7.69% lib/supavisor/auth_query.ex
2
67.21
-1.64% lib/supavisor/helpers.ex
2
93.48
-1.45% lib/supavisor/protocol/server.ex
1
75.86
-3.45% lib/supavisor/handler_helpers.ex
1
0.0
-100.0% lib/supavisor/errors/ssl_required_error.ex
1
85.71
-2.86% lib/supavisor/monitoring/tenant.ex
Jobs
ID Job ID Ran Files Coverage
1 run-integration - 23647210736.1 27 Mar 2026 01:02PM UTC 123
42.5
GitHub Action Run
2 run-tests - 23647210736.2 27 Mar 2026 01:04PM UTC 123
77.46
GitHub Action Run
Source Files on build 23647210736
  • Tree
  • List 123
  • Changed 24
  • Source Changed 6
  • Coverage Changed 24
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23647210736
  • 850fa34e on github
  • Prev Build on main (#23540082495)
  • Next Build on main (#23727199329)
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