Skip to content

Allow slow Docker lifecycle operations on busy hosts - #24

Merged
hanhainebula merged 1 commit into
VectorSpaceLab:mainfrom
hanhainebula:main
Oct 23, 2026
Merged

hanhainebula merged 1 commit into
VectorSpaceLab:mainfrom
hanhainebula:main

Conversation

@hanhainebula

Copy link
Copy Markdown
Collaborator

Summary

On busy hosts, Docker/containerd can take more than 60 seconds to create or remove containers. The shared runner can therefore fail a gateway preflight or teardown even when the operation would complete successfully with a longer bounded wait.

Introduce a shared 300-second lifecycle timeout for gateway preflight container execution, preflight container removal, and docker compose down. Task execution budgets and egress leases are unchanged. Existing ownership checks and cleanup failure handling remain in place.

Update the cleanup timeout assertions and add a regression that simulates slow teardown, checking that the private runtime directory remains available until teardown succeeds and is then removed.

This is the first of two related PRs. The follow-up PR revises three retrieval task packages; this PR contains only the shared lifecycle fix and its tests.

Commit: 1bd88b57237c0a2276c8e915d3f6cf6defdd8d5c — Allow bounded slow Docker lifecycle operations.

Changed files:

  • scripts/harbor_environments.py
  • scripts/tests/test_egress_adapter.py

Validation evidence

Checks ran in an isolated worktree based on fork main at 21ab7a32ed75d4d463b6bc91deb0f304bcb3e3b5, containing only these two file changes:

python -m unittest discover -s scripts/tests -p 'test_*.py'
python scripts/check_release.py
git diff --check
  • All 175 shared tests passed, including the new slow-teardown regression.
  • Release static checks reported zero errors and zero warnings.
  • The diff check passed, and the commit scope was verified to contain exactly the two files above.

The slow-teardown case uses mocks; these checks do not demonstrate a real Docker operation taking more than 60 seconds. Live Docker/model trials were not rerun for this commit. Integration and CI checks against the current upstream base remain part of PR review.

Contributor checklist

  • Changes are limited to shared Docker lifecycle waits and their regression tests.
  • Task budgets, scoring, network leases, and task packages are unchanged.
  • No secrets, downloaded assets, or job outputs included.
  • Validation results and their limits recorded.
  • Enable Allow edits from maintainers, or agree on contributor-applied review fixes.

Maintainer merge checklist

  • Review the lifecycle timeout and cleanup behavior.
  • Run required checks against the current upstream base and final PR head.
  • Merge before the follow-up retrieval-task calibration PR, preserving contributor history.

Raise gateway preflight container creation/removal and Compose teardown
timeouts from 60 to 300 seconds for busy hosts. Keep task execution budgets
and egress leases unchanged.

Update cleanup assertions and cover simulated slow teardown while preserving
the private manifest directory until cleanup succeeds.
@hanhainebula
hanhainebula merged commit 9ee2ab2 into VectorSpaceLab:main Oct 23, 2026
2 checks passed
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