Skip to content

refactor(server): split monolithic docker.py into modular package#832

Merged
hittyt merged 3 commits intoalibaba:mainfrom
Pangjiping:refactor/docker-service-split
May 5, 2026
Merged

refactor(server): split monolithic docker.py into modular package#832
hittyt merged 3 commits intoalibaba:mainfrom
Pangjiping:refactor/docker-service-split

Conversation

@Pangjiping
Copy link
Copy Markdown
Collaborator

Summary

Replace 2698-line docker.py with focused mixin modules:

  • docker_service.py: core orchestration, CRUD, public API
  • container_ops.py: image management, platform resolution, container creation
  • networking.py: network validation, endpoints, egress sidecar
  • volumes.py: volume validation, bind mounts, PVC
  • runtime.py: execd distribution, bootstrap launcher

Testing

  • Not run (explain why)
  • Unit tests
  • Integration tests
  • e2e / manual verification

Breaking Changes

  • None
  • Yes (describe impact and migration path)

Checklist

  • Linked Issue or clearly described motivation
  • Added/updated docs (if needed)
  • Added/updated tests (if needed)
  • Security impact considered
  • Backward compatibility considered

Replace 2698-line docker.py with focused mixin modules:
- docker_service.py: core orchestration, CRUD, public API
- container_ops.py: image management, platform resolution, container creation
- networking.py: network validation, endpoints, egress sidecar
- volumes.py: volume validation, bind mounts, PVC
- runtime.py: execd distribution, bootstrap launcher

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Pangjiping and others added 2 commits May 3, 2026 13:03
- Move docker_diagnostics, port_allocator, ossfs_mixin into docker/
- Move docker_snapshot_runtime into docker/
- Split docker_windows_profile into docker/windows_profile (Docker-specific)
  and windows_profile_common (shared with k8s)
- Update all import paths across codebase and tests

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Shorter name, same semantics. Linter also trimmed unused imports.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@hittyt hittyt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hittyt hittyt merged commit c7d25f0 into alibaba:main May 5, 2026
17 of 18 checks passed
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.

3 participants