refactor: rename container domain to docker#256
Merged
Conversation
Container operations will be managed through the standard API/CLI/SDK path using the new container domain endpoints, not through an in-process DSL that runs osapi inside containers. Remove RuntimeTarget, DockerTarget, ScopedPlan, ContainerProvider, deploy helpers, provider run CLI, and provider registry. Rewrite container-targeting example and docs to use SDK client directly. Update design doc and implementation plan. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Design doc for renaming the generic container domain to docker-specific, with per-runtime domains, CLI nesting under `client container docker`, API paths at /container/docker, and orchestrator DSL helpers. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Rename directory internal/api/container to internal/api/docker.
Update OpenAPI spec: paths from /node/{hostname}/container to
/node/{hostname}/container/docker, all schema names Container*
to Docker*, operationIds PostNodeContainer* to
PostNodeContainerDocker*, security scopes container:* to docker:*,
parameter ContainerId to DockerId, tags container_* to docker_*.
Regenerate docker.gen.go from the updated spec, remove old
container.gen.go.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Rename PermContainer{Read,Write,Execute} constants to
PermDocker{Read,Write,Execute} with docker:* string values.
Update AllPermissions, DefaultRolePermissions, and the
combined OpenAPI spec security scopes.
Co-Authored-By: Claude <noreply@anthropic.com>
Flatten provider/container/runtime/ to provider/docker/, rename all job
operation constants (OperationContainer* to OperationDocker*), data
types (ContainerCreateData to DockerCreateData, etc.), client methods
(ModifyContainerCreate to ModifyDockerCreate, etc.), agent processor
category routing, and API handler method signatures and schema types to
match the new generated OpenAPI types. Update all HTTP test paths from
/node/{hostname}/container to /node/{hostname}/container/docker.
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Rename ContainerSmokeSuite → DockerSmokeSuite and update all CLI args to use the new `client container docker` command hierarchy. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Update all documentation to reflect the container→docker rename:
- Permissions: container:read/write/execute → docker:read/write/execute
- CLI commands: client container <op> → client container docker <op>
- SDK calls: c.Container.* → c.Docker.*
- Generated types: gen.Container* → gen.Docker*
- API paths: /node/{hostname}/container/* → /node/{hostname}/container/docker/*
- Job operations: container.*.* → docker.*.*
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Rename processor_container.go → processor_docker.go - Rename handler_container.go → handler_docker.go - Rename containerProvider → dockerProvider throughout agent package - Rename GetContainerHandler → GetDockerHandler in API wiring - Update all tests to match 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Remove the Service/Driver/Provider split. Client now directly implements Provider (with Ping merged in). This eliminates the pure-delegation Service layer and renames NewDriver → New. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Add closure execution and error path tests for all 8 Docker DSL methods using httptest servers with proper JSON responses. Coverage goes from 16.7% to 100% per method. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
Thank you for contributing to this project! 😊🕹️ |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #256 +/- ##
==========================================
- Coverage 99.94% 99.94% -0.01%
==========================================
Files 227 222 -5
Lines 9587 9512 -75
==========================================
- Hits 9582 9507 -75
Misses 3 3
Partials 2 2
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Add Changed bool to Container, ActionResult, ExecResult, and PullResult so the agent handler can extract it consistently via extractChanged(). Start/Stop/Remove now return *ActionResult instead of bare error, matching the pattern used by DNS, command, file, and host providers. Also fix broken Docusaurus link to renamed API doc path. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Move the 8 Docker CLI operation docs from container/ to container/docker/ to match the CLI command hierarchy (client container docker <op>). Add docker.mdx parent page and simplify container.mdx to a runtime grouping. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Rename 8 operation doc files from container-*.md to docker-*.md to match the docker.* operation names. Update links in orchestrator.md and fix container-ops → docker-ops role name. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Cleanup (remove) was at the same dependency level as exec and inspect tasks, causing a race where the container could be deleted before exec commands ran. Fix by making cleanup depend on all tasks that need the container. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Cleanup was skipped because it depended on deliberately-fails which always errors. That task is independent and shouldn't block cleanup. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Add a pre-cleanup task that removes any leftover container from a previous run before creating a new one. Errors are swallowed since the container may not exist. This prevents "name already in use" failures on re-runs. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
containerdomain todockeracross all layers (API,provider, agent, job, CLI, SDK, permissions, docs, tests)
client container docker <op>to supportfuture runtimes (LXD, Podman) under the
containerparentand Service/Driver delegation layer
Test plan
go build ./...compilesgo test ./...passes (all packages)golangci-lint runreports 0 issuesgofumpt/golinesformatting cleanpkg/sdk/orchestrator/docker.gojust go::unit-int)🤖 Generated with Claude Code