Repository navigation
refactor(driver): dedupe docker lifecycle guards and command helpers - #1512
Conversation
Add requireDevContainer for the container-not-found guard and runLoggedDockerCommand for the log-writer and docker run block used by push, tag, and commit. Error and log text are unchanged.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
✅ Deploy Preview for devsydev canceled.
|
✅ Deploy Preview for images-devsy-sh canceled.
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
Summary
requireDevContainerfor the container-not-found guard and use it inCommandDevContainer,StartDevContainer,StopDevContainer,GetDevContainerLogs, andUpdateContainerUserUID.runLoggedDockerCommandfor the log writer, debug line, and docker run block and use it inPushDevContainer,TagDevContainer, andCommitContainer.CommitContainerkeeps itscontainer not found: workspaceID=%smessage inline.Why
The Docker driver repeats the "container not found" guard six times and the log-writer plus docker-run block three times; a single requireDevContainer and runLoggedDockerCommand helper removes the duplication and mirrors the apple driver's requireDevContainer, without changing any error text or behaviour.
Validation
mkdir -p distthentask cli:format: pass, no files changed beyond the two in scope.task cli:lint:ci: pass, 0 issues.go test ./pkg/driver/docker/...: pass.GOOS=windows go vet ./pkg/driver/docker/andGOOS=linux go vet ./pkg/driver/docker/: pass.CodeRabbit CLI
coderabbit review --agent --committed --base-commit $(git merge-base HEAD origin/main): completed, 0 findings onpkg/driver/docker/lifecycle.goandpkg/driver/docker/useruid.go.Auto-merge
Eligible: yes. 2 files, under 600 changed lines, no tests touched, no excluded paths, no
//nolintadded, no CLI/output/config/wire changes.Summary by CodeRabbit