Skip to content

fix: avoid blocking Docker readiness checks - #275

Draft
ruirui6946 wants to merge 1 commit into
TencentCloudADP:mainfrom
ruirui6946:agent/fix-docker-readiness-wait
Draft

fix: avoid blocking Docker readiness checks#275
ruirui6946 wants to merge 1 commit into
TencentCloudADP:mainfrom
ruirui6946:agent/fix-docker-readiness-wait

Conversation

@ruirui6946

Copy link
Copy Markdown

Summary

  • move the blocking readiness HTTP request off the asyncio event-loop thread
  • replace the blocking retry delay with asyncio.sleep
  • add a Docker-free async regression test that verifies the event loop progresses during a probe

Why

DockerManager.start_container() could block every coroutine on its event loop for each two-second HTTP probe and one-second retry delay while a container was starting.

Closes #274

Validation

  • ruff check utu/env/utils/docker_manager.py tests/env/test_docker_manager_async.py
  • ruff format --check utu/env/utils/docker_manager.py tests/env/test_docker_manager_async.py
  • pytest -p no:cacheprovider tests/env/test_docker_manager_async.py -q

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.

DockerManager readiness loop blocks the asyncio event loop

1 participant