Bulk tenant health rejects exactly 500 refs, the documented maximum
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 25/100
Research direction
Read lib/realtime_web/controllers/tenant_controller.ex, focusing on within_ref_limit?/1 and the @max_refs value. Check the existing tests for POST /api/tenants/health; done means exactly 500 refs are accepted while 501 are rejected. A linked pull request is already open.
Written by the indexing model from the issue text.
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I searched issues and PRs for this behavior.
Describe the bug
POST /api/tenants/health rejects a request with exactly 500 refs. It answers 422 with refs exceeds the maximum of 500. The request schema TenantBulkHealthParams sets maxItems: 500, and the error message also names 500 as the maximum. So 500 refs should be accepted, and only 501 or more rejected.
To reproduce
Send POST /api/tenants/health with a valid API JWT and a body of exactly 500 string refs:
{"refs": ["ref-1", "ref-2", "...", "ref-500"]}
Expected behavior
200 with present and missing, the same as for 499 refs.
Actual behavior
422 with {"message": "refs exceeds the maximum of 500"}.
Cause
within_ref_limit?/1 in lib/realtime_web/controllers/tenant_controller.ex checks length(refs) < @max_refs, and @max_refs is 500. Nothing validates the OpenAPI schema at runtime, so this check is the only limit.
System information
main at cea1926d (2.150.2).
- Dominant language
- Elixir
- Stars
- 7.7k
- Forks
- 479
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 74
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from supabase/realtime
-
Send-only broadcasts do not restart event sampling after idle shutdownPossibly taken @hsusul claimed this 2 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 54/100
Maintainers usually reply within 1 day
-
Private Presence diffs delivered after track auto-enables Presence are not countedPossibly taken @hsusul claimed this 3 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Publication refresh can remove a successful Postgres Changes subscription without retrying itPossibly taken @hsusul claimed this 3 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
ReplicationPoller never reaches recovery thresholds after repeated polling failuresPossibly taken @hsusul claimed this 4 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Broadcast can omit a newly joined region until RegionRings reconcilesPossibly taken @hsusul claimed this 4 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
All issues in supabase/realtime
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
hexlet-codebattle/codebattle#2374 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
intellij-elixir/intellij-elixir#4585 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
mathieuprog/tz#44 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
easy elixir first-contributor first-contributors good first issue help wanted up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 88/100
fork-commit-merge/fork-commit-merge#8454 ·
Maintainers usually reply within 1 day