Repository navigation
Conversation
|
Could a maintainer take a look when convenient? This keeps an idle HTTP connection from blocking health probes and metrics requests. The two strengthened tests time out on the original implementation; all 14 metrics-server tests pass with the fix in the local CPU environment. I don't see a CI run on the PR. If running CI requires maintainer approval, could you approve it? Happy to address any feedback. Thanks! |
|
Updating against current main revealed that this fix is now superseded by #3767 ( The two merge conflicts are modify/delete conflicts in exactly the implementation and test files this PR changes. Restoring them would reintroduce code that upstream intentionally removed. There is no remaining implementation in current main to apply this idle-connection fix to, so I am closing this PR as no longer applicable. The original fix remains available on the branch if it is needed for a maintained older release. |
An accepted TCP connection that sends no HTTP request blocks
HTTPServerin its request handler. While that connection remains open, bothHealthServerandMetricsServerstop answering other clients, including Kubernetes liveness probes;stop()also waits for that handler.Use the standard-library
ThreadingHTTPServerin both startup paths so each connection has a daemon handler thread. Extend the existing start/stop tests to keep an idle connection open while fetching the endpoint and stopping the server. There are no new dependencies or configuration fields.Validation on Python 3.12 (CPU, lightweight uv environment):
tests/unit/utils/test_metrics_server.py: 14 passed.TimeoutError, 12 passed.git diff --checkpassed.Full GPU training tests were not run; this change is confined to the HTTP observability servers.