Skip to content

fix: multi-backend review (internal CI) - #3

Open
songzhendong wants to merge 6 commits into
masterfrom
feature/python-multi-backend-review-fix
Open

fix: multi-backend review (internal CI)#3
songzhendong wants to merge 6 commits into
masterfrom
feature/python-multi-backend-review-fix

Conversation

@songzhendong

Copy link
Copy Markdown
Owner

Internal CI for apache#415 review fixes. Official PR head unchanged.

One channel for the process lifetime with C-core pick_first over
comma-separated collector addresses (Node native failover analogue).
Single address stays plain host:port; multi uses ipv4:/ipv6: (mixed
families via IPv4-mapped). Multi hostnames expand once at channel build.
pick_first shuffleAddressList is on; target / default_authority stay in
config order.

Channel options: HTTP proxy off, no keepalive, reconnect backoff capped
at 30s, service_config retries only reportInstanceProperties. Skip
reports until READY. Unary and sync streaming RPCs use a deadline (10s
floor, always > queue window); aio client-streaming collect omits
timeout because generators await empty queues. Failed send batches are
counted as drops. Instance properties errors do not block keepAlive.
Replacing a protocol closes the previous channel (sync close; aio await
aclose on the agent loop). Timed shutdown flush so atexit cannot hang.

Includes unit coverage and a multi-OAP gRPC failover E2E case.
@songzhendong
songzhendong force-pushed the feature/python-multi-backend-review-fix branch 2 times, most recently from 266a428 to 7fa3e4f Compare August 29, 2026 15:56
…own, RPC margin)

Skip sw_grpc instrumentation for agent collector channels via thread-local
scope; move throttled reporter logs off grpc_channel so GRPC_ENABLE_FORK_SUPPORT
is set before import grpc; cancel only background tasks on async shutdown;
widen sync RPC deadline vs queue batch window.
@songzhendong
songzhendong force-pushed the feature/python-multi-backend-review-fix branch 2 times, most recently from 17b454e to 852ac8f Compare August 30, 2026 08:52
Run async cleanup on the asyncio.run root after _finished is set so
protocol aclose() completes before Runner teardown. Preserve the first
Queue.get attempt when SW_AGENT_QUEUE_TIMEOUT=0. Add regression tests.
@songzhendong
songzhendong force-pushed the feature/python-multi-backend-review-fix branch 2 times, most recently from f7293c3 to f6edd44 Compare August 31, 2026 00:08
Wait on both the shutdown event and background tasks so failures like
__command_dispatch() are retrieved and logged instead of being ignored.
Retrieve outcomes from already-done tasks during shutdown cancellation.
@songzhendong
songzhendong force-pushed the feature/python-multi-backend-review-fix branch from f6edd44 to 7833ec3 Compare August 31, 2026 00:55
… failures

Supervisor treats early success/cancel as errors; cleanup only logs real exceptions and skips already-handled outcomes so clean shutdown stays silent.
Satisfy flake8 B010 by assigning task._sw_outcome_handled directly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant