fix(traefik): Forgejo's Actions API gets its own router and a higher rate limit #282
Loading…
Reference in a new issue
No description provided.
Delete branch "jfraeys/fix/forgejo-actions-rate-limit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
After #280 the artifact upload reaches Forgejo (coaching_site run 1058: 11.5 MB uploaded). One item,
precompress, then failed on429 Too Many Requests(six times,Retry-After: 1,X-Retry-In: 896ms); the action retries only five times, one second apart, and gave up. The source is Traefik's generalrate-limitmiddleware (100/min, burst 50) on the Forgejo router: an artifact upload sends many parallel chunk requests from one source address.rate-limit-actions(traefik_actions_rate_average: 1800,traefik_actions_rate_burst: 300, per minute), defined next torate-limitinbase.yml.j2.forgejo-actionsin the Forgejo compose labels:Host(...) && PathPrefix('/api/actions_pipeline/'), priority 1000, same service, entrypoint, TLS and security headers, using the new middleware. Everything else on the Forgejo host keeps the general limit.scripts/tests/test_forgejo_actions_route.py(8 cases, in lint) renders both templates and checks the router rule, the middleware reference and definition, the higher limit, the explicit priority, the unchanged general limit, and that the rendered compose is valid YAML. Verified it fails when the middleware is removed or the limit is lowered to the general one.Rollout
./infra approve,git pull.scripts/release/deploy-services.sh --tags traefik,forgejo --limit services. The Forgejo labels change, so Compose recreates the Forgejo container (a short outage for git and CI): do it when no job is running. Traefik picks up the new middleware from its file provider.ci.yml: all ofBuild artifactsshould upload. Confirm in the Traefik log that the requests carry no 429:docker logs traefik-traefik-1 --since 20m 2>&1 | grep actions_pipeline | grep -c '"DownstreamStatus":429'should print 0.Rollback: revert and redeploy
traefik,forgejo.🤖 Generated with Claude Code
https://claude.ai/code/session_01Ge5tovcwdEUBtPwUktsZZZ