Skip to content

feat(docker): add hostname and dns to container create#347

Merged
retr0h merged 1 commit intomainfrom
feat/docker-create-hostname-dns
Apr 3, 2026
Merged

feat(docker): add hostname and dns to container create#347
retr0h merged 1 commit intomainfrom
feat/docker-create-hostname-dns

Conversation

@retr0h
Copy link
Copy Markdown
Collaborator

@retr0h retr0h commented Apr 3, 2026

Summary

  • Add hostname and dns optional fields to DockerCreateRequest for setting container hostname and custom DNS servers at creation time
  • Fields flow through all layers: OpenAPI spec → API handler → job payload → agent processor → Docker provider → Docker API
  • Validation via spec tags: hostname max 253 chars, dns validates each entry as IP address
  • Full test coverage across provider, handler, agent processor, and SDK

Coverage (no regression)

Package Before After
controller/api/node/docker 99.6% 99.6%
provider/container/docker 100% 100%
SDK docker methods 100% 100%

Test plan

  • Provider tests: hostname only, DNS only, both combined
  • Handler unit test: fields propagate to job payload
  • HTTP validation: hostname > 253 chars → 400, invalid DNS IP → 400
  • Agent processor: hostname+DNS flow through job data
  • SDK: create opts with hostname and DNS
  • Build clean, lint clean

🤖 Generated with Claude Code

Add optional hostname and dns fields to the Docker container create
flow across all layers: OpenAPI spec, job types, provider, agent
processor, API handler, SDK types, and SDK client. Both fields are
validated at the API layer (hostname max 253 chars, dns entries must
be valid IPs). Tests added at every layer.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #347   +/-   ##
=======================================
  Coverage   99.91%   99.91%           
=======================================
  Files         441      441           
  Lines       21496    21510   +14     
=======================================
+ Hits        21477    21491   +14     
  Misses         11       11           
  Partials        8        8           
Files with missing lines Coverage Δ
internal/agent/processor_docker.go 100.00% <100.00%> (ø)
...nal/controller/api/node/docker/container_create.go 100.00% <100.00%> (ø)
internal/provider/container/docker/docker.go 100.00% <100.00%> (ø)
pkg/sdk/client/docker.go 100.00% <100.00%> (ø)
pkg/sdk/client/docker_types.go 100.00% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5028b2...0ac64ab. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@retr0h retr0h merged commit d91871f into main Apr 3, 2026
11 checks passed
@retr0h retr0h deleted the feat/docker-create-hostname-dns branch April 3, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant