Docker impl of ComputeBackend (extract instance lifecycle from docker/agent.py)
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 368
Description
Extract Docker instance lifecycle from docker/agent.py into a ComputeBackend docker impl. destroy_instance idempotent (callable from orphan cleanup with just the handle). list_instances reconstructs instances from container labels (correlation key). No behavior change vs the current DockerAgent instance paths (verify with the #1 CLI). Prioritize the Sokovan-driven ops (create_kernels/destroy_kernel/check_running).
Success Criteria:
- [ ] create/destroy/inspect/list/collect_stats parity with current DockerAgent (via the #1 CLI).
- [ ] destroy_instance idempotent: second call on a gone instance is a no-op.
- [ ] list_instances recovers instances purely from labels.
- [ ] pants test passes for affected packages
JIRA Issue: BA-6759
Contributor guide
Research direction
Start by reading docker/agent.py and tracing the current DockerAgent instance paths, prioritizing create_kernels, destroy_kernel, and check_running. Use the #1 CLI to compare behavior, then run pants test for the affected packages; done means lifecycle parity, idempotent destruction, label-based list_instances recovery, and passing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- backend, infrastructure
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100