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

supabase / auth / 24202395786
69%

Build:
DEFAULT BRANCH: master
Ran 09 Apr 2026 04:56PM UTC
Jobs 1
Files 187
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

09 Apr 2026 04:50PM UTC coverage: 69.358% (+0.2%) from 69.154%
24202395786

push

github

web-flow
feat: support live reloading of individual rate limits (#2469)

Move API limiter setup out of internal/api and into a dedicated
internal/api/apilimiter package, then wire it into serve-time config
reloads so rate limit changes are picked up without restarting the
service.

This change replaces the old LimiterOptions type with an
apilimiter.Limiter instance passed through api.WithLimiter(...). API
construction now defaults to apilimiter.New(...) when no limiter is
injected, and tests are updated to use the new option-based wiring.

The new apilimiter package centralizes:
- construction of all ratelimit and tollbooth limiters
- mapping between config/env vars and limiter fields
- copy/update logic for reusing existing limiter state where possible
- structured logging for limiter changes during config reload

On config reload in serve():
- keep track of the previously active limiter set
- call previousLim.Update(...) against the latest config
- build the new API with the updated limiter set
- store the new API, reload apiworker config, and retain the latest
limiter for the next reload cycle

This fixes the prior behavior where hot config reload rebuilt the API
but kept stale limiter settings, meaning rate-limit changes were not
applied until process restart.

Additional ratelimit changes:
- persist the original parsed conf.Rate value in conf.Rate via val
- add GetRateValue() for logging/comparison purposes
- extend ratelimit.Limiter with Config() so limiters can expose their
backing configuration
- add ratelimit.Equal(...) helper to compare limiters, configs, and rate
strings consistently
- store conf.Rate on BurstLimiter and IntervalLimiter and expose
Config()
- add String() methods to identify limiter type in tests/debug output
- rename IntervalLimiter.limit to events for clarity

Behavioral note:
- BurstLimiter documentation now matches implementation for non-positive
event counts: burst size becomes 0, so no events are allowed

Tests:
- update API te... (continued)

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

1 existing line in 1 file now uncovered.

16630 of 23977 relevant lines covered (69.36%)

81.91 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
99.1
-0.45% internal/reloader/reloader.go
Jobs
ID Job ID Ran Files Coverage
1 24202395786.1 09 Apr 2026 04:56PM UTC 187
69.36
GitHub Action Run
Source Files on build 24202395786
  • Tree
  • List 187
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • d03d7961 on github
  • Prev Build on master (#24093786732)
  • 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