Nobody has started this yet — be first.
Business impact
Today, changing just one route's rate limit during an incident (turning it down because a client is hammering an upstream, say) means reconstructing and re-sending the entire route body from whatever the operator currently has on hand -- easy to get subtly wrong (drop a field by accident, revert someone else's more recent change to a different field) under exactly the time pressure where a small, targeted change is what is needed.
Problem
PUT /admin/routes/{id} exists and works, but it is a full replace: the caller has to send the entire RouteConfig body, including every field they do not want to change. There is now a PATCH /admin/routes/{id} endpoint too, but it is a stub -- it always responds 501 Not Implemented regardless of what is in the request body.
Current behavior
Calling PATCH /admin/routes/{id} with any body currently returns 501 Not Implemented -- patch_route's handler body has not been written yet.
Expected behavior
PATCH /admin/routes/{id} accepts a partial JSON body (any subset of RouteConfig's fields, e.g. just {"rate_limit": {"requests_per_second": 5, "burst": 10}}) and merges only those fields into the existing route, leaving everything else (auth, , , , etc.) untouched. It is effective immediately, same as , and still goes through the same breaker-config-consistency check as any other table mutation.
Steps to reproduce
Why this matters
The tricky part is not the top-level merge (route-level fields) so much as deciding what "merge" means for a nested field like rate_limit if the patch only sends part of it -- that behavior needs to be decided and documented rather than guessed implicitly, and it still has to flow through RouteTable's existing _check_breaker_config_consistency check exactly like PUT does, so a patch cannot sneak past the same consistency guarantee.
Suggested approach
Look at RouteConfig (a pydantic BaseModel) -- pydantic models have a documented pattern for producing an updated copy from a partial set of field overrides without touching the fields you do not mention. Decide explicitly how a partial rate_limit object should combine with the existing one before writing the merge.
Acceptance criteria
Verification
pytest practice_tickets/tests/test_ticket_05_admin_patch_partial_update.py -v
Hints (0/2)
Try it without hints first — the reading is the exercise.
Working on this ticket
Work on a branch named for the ticket — that's what you'll submit.
Branch off your fork
Sign in to create it automatically, or do it yourself:
$git checkout -b feat/admin-patch-partial-updateFix it and commit
Meet every acceptance criterion, and add a test that would have caught this.
Push the branch
$git push -u origin feat/admin-patch-partial-updateSubmit it below
Paste your fork URL and the branch name, with a short write-up of the root cause.
Questions
Ask about anything unclear in the ticket — the maintainer and anyone who has solved it can answer. Please don't post full solutions.
Sign in to ask a question or reply.
Sign intimeoutstransformcircuit_breakerPUThttp://localhost:8080fast_echo/echo/.../large/{size_mb}slow_upstream/delay/{s}/flaky/always-downroutes.yamlcurl localhost:8080/healthzcurl localhost:8080/readyz/admin/*Authorization: Bearer <GATEWAY_ADMIN_TOKEN>You do not need Docker running at all to work the tickets — the test suite fakes Redis with fakeredis (plus lupa for real Lua-script support), so everything runs against a plain virtualenv:
python3 -m venv .venv && .venv/bin/pip install -r requirements-dev.txt
.venv/bin/pytest practice_tickets/tests/test_ticket_09_breaker_threshold_off_by_one.py -v # a single ticket
./practice_tickets/run_tickets.sh # all 15, clean pass/fail summary
./practice_tickets/run_tickets.sh 06 09 15 # just a few, by number
All 15 tests fail at the start; as you fix each ticket in app/, its test (and only its test) should flip to passing. .venv/bin/pytest tests/ runs the project's own main suite — as of writing it shows 8 pre-existing failures caused by ticket bugs 02, 04, 06, and 09; fixing those tickets fixes those failures too, not a separate task.
Level 2
Implement a feature
Extend the system within its own patterns.