Repository navigation
feat(BA-8443): push ingresses from the coordinator to api-delivery workers - #15833
Merged
Merged
Conversation
jopemachine
added a commit
that referenced
this pull request
Oct 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks done
jopemachine
changed the base branch from
main
to
feat/BA-8440-internal-ingress-push-port
October 19, 2026 04:35
jopemachine
added a commit
that referenced
this pull request
Oct 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jopemachine
force-pushed
the
feat/BA-8443-coordinator-ingress-push
branch
from
October 19, 2026 04:56
2cbb6d9 to
5d0277b
Compare
jopemachine
added a commit
that referenced
this pull request
Oct 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jopemachine
force-pushed
the
feat/BA-8443-coordinator-ingress-push
branch
from
October 19, 2026 05:58
5d0277b to
0965095
Compare
jopemachine
added a commit
that referenced
this pull request
Oct 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jopemachine
changed the base branch from
feat/BA-8440-internal-ingress-push-port
to
main
October 20, 2026 01:33
3 tasks done
jopemachine
added a commit
that referenced
this pull request
Oct 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jopemachine
changed the base branch from
main
to
feat/BA-8443-worker-ingress-mode
October 20, 2026 02:08
jopemachine
added a commit
that referenced
this pull request
Oct 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks done
jopemachine
added a commit
that referenced
this pull request
Oct 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jopemachine
force-pushed
the
feat/BA-8443-coordinator-ingress-push
branch
from
October 20, 2026 05:30
96cfd2b to
23c7172
Compare
jopemachine
added a commit
that referenced
this pull request
Oct 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jopemachine
force-pushed
the
feat/BA-8443-coordinator-ingress-push
branch
from
October 20, 2026 06:27
cdd09b4 to
cf35298
Compare
jopemachine
added a commit
that referenced
this pull request
Oct 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jopemachine
force-pushed
the
feat/BA-8443-coordinator-ingress-push
branch
from
October 20, 2026 06:43
cf35298 to
737550d
Compare
jopemachine
changed the base branch from
feat/BA-8639-coordinator-secret-middleware
to
main
October 20, 2026 06:43
This was referenced Oct 20, 2026
jopemachine
added a commit
that referenced
this pull request
Oct 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jopemachine
force-pushed
the
feat/BA-8443-coordinator-ingress-push
branch
from
October 20, 2026 07:44
74dad3c to
f80751f
Compare
jopemachine
changed the base branch from
main
to
feat/BA-8642-coordinator-worker-client
October 20, 2026 07:44
jopemachine
added a commit
that referenced
this pull request
Oct 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jopemachine
force-pushed
the
feat/BA-8443-coordinator-ingress-push
branch
from
October 20, 2026 07:50
f80751f to
76eeb95
Compare
jopemachine
added a commit
that referenced
this pull request
Oct 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jopemachine
force-pushed
the
feat/BA-8443-coordinator-ingress-push
branch
from
October 20, 2026 08:00
76eeb95 to
07f4c6d
Compare
Base automatically changed from
feat/BA-8642-coordinator-worker-client
to
main
October 20, 2026 08:15
jopemachine
added a commit
that referenced
this pull request
Oct 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jopemachine
force-pushed
the
feat/BA-8443-coordinator-ingress-push
branch
from
October 20, 2026 08:16
07f4c6d to
831017f
Compare
jopemachine
marked this pull request as ready for review
October 22, 2026 04:26
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Startup initialization and delivery failure handling contain unresolved defects that can prevent service startup or leave worker state incorrect.
3 open issues
What changed in this PR
Adds the AppProxy coordinator’s manager-facing ingress API and stateless delivery to API-mode workers, providing the push path for the ingress stack.
Changes:
- Adds authenticated upsert and remove endpoints with typed request context and responses.
- Groups pushes by authority, discovers API-delivery workers, and uses the shared HTTP client pool.
- Adds service tests for worker selection, skipped authorities, and delivery failures.
| File | Description |
|---|---|
tests/unit/appproxy/coordinator/services/test_ingress.py |
Tests worker selection and push failures. |
tests/unit/appproxy/coordinator/services/BUILD |
Registers the new service tests. |
tests/unit/appproxy/coordinator/clients/worker/test_client.py |
Updates address fixtures and removes obsolete pool tests. |
src/ai/backend/common/dto/appproxy/v2/ingress/response.py |
Adds the coordinator upsert response. |
src/ai/backend/appproxy/coordinator/types.py |
Declares ingress service and delivery dependencies. |
src/ai/backend/appproxy/coordinator/services/ingress.py |
Discovers workers and dispatches ingress operations. |
src/ai/backend/appproxy/coordinator/server.py |
Wires routes, discovery, client pooling, and service lifecycle. |
src/ai/backend/appproxy/coordinator/dto/context.py |
Provides request-scoped ingress service access. |
src/ai/backend/appproxy/coordinator/dto/__init__.py |
Initializes the DTO package. |
src/ai/backend/appproxy/coordinator/clients/worker/client.py |
Uses typed addresses and externally managed sessions. |
src/ai/backend/appproxy/coordinator/api/ingress.py |
Defines manager-authenticated ingress endpoints. |
changes/15833.feature.md |
Records the new coordinator ingress API. |
Review effort: Balanced
Comment on lines
+74
to
+76
| except ValueError: | ||
| # RedisServiceDiscovery raises ValueError for a group with no registered service. | ||
| workers = [] |
wngh4628
reviewed
Oct 22, 2026
3 tasks done
… session Drop AppProxyWorkerClientPool so the coordinator holds worker sessions in the common ClientPool. The client takes the worker address as a HostPortPair, asks for JSON error bodies, and reports a timeout as an unreachable worker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ivery workers POST /v2/ingress/upsert and /v2/ingress/remove take ingresses or keys from the manager, group them by authority, and push each group to every worker node of that authority whose ingress delivery mode is api, found through the worker service discovery on the AppProxy redis. Both answer 204. The coordinator answers after every push has settled, and reports the failed nodes together in ApiDeliveryWorkerPushFailedError (502). It keeps no ingress state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wngh4628
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


📚 Stacked PRs
Part of the AppProxy worker Ingress stack (epic BA-8433). Merge in order (bottom-up):
feat(BA-8443): push ingresses from the coordinator to api-delivery workers ← you are herefeat(BA-8444): export ingresses from the coordinator to Traefik etcdResolves #15539 (BA-8443)
Summary
IngressHandlerclass withapi_handlermethods. Each route is wrapped withauth_required("manager"), and the handler takesIngressServiceCtx, aMiddlewareParamcarrying only theIngressService:POST /v2/ingress/upserttakesIngressUpsertRequestand answers 204. A success means every node holds every sent ingress, so there is nothing to return.POST /v2/ingress/removetakesIngressRemoveRequestand answers 204.IngressServicegroups ingresses by authority and reads theappproxy-workergroup from service discovery. It pushes concurrently, with anAppProxyWorkerClient(feat(BA-8642): add the coordinator client that pushes ingresses to api-delivery workers #15915) on a session from the commonClientPool, to the endpoint of every node labelledingress-delivery-mode=apifor that authority (labels from feat(BA-8635): choose how the AppProxy worker receives ingresses #15890). An authority with no such node is skipped, since its workers read ingresses from Redis. It keeps no ingress state and needs no schema change.redis, where the workers register;core_redisonly moves the coordinator's own registration.ApiDeliveryWorkerPushFailedError(502).data.failuresholds the error body of each failed node:ApiDeliveryWorkerRejectedError; 5xx →ApiDeliveryWorkerServerError; unreachable →ApiDeliveryWorkerUnreachableError. All from feat(BA-8642): add the coordinator client that pushes ingresses to api-delivery workers #15915.data.worker_addr; rejected and server errors also carry the worker'sstatusandbody.failures[].type.Not in this PR
Test plan
pants check/pants testontests/unit/appproxy::andsrc/ai/backend/appproxy::tests/unit/appproxy/coordinator/services/test_ingress.py— pushes go to each authority'sapi-delivery nodes only; an authority with no node is skipped; a failed node fails the push after every node finishes; every failed node is reported infailures🤖 Generated with Claude Code