Skip to content

Reduce Docker plugin template duplication#319

Open
khluu wants to merge 1 commit intomainfrom
cleanup/docker-plugin-template-dedup
Open

Reduce Docker plugin template duplication#319
khluu wants to merge 1 commit intomainfrom
cleanup/docker-plugin-template-dedup

Conversation

@khluu
Copy link
Copy Markdown
Collaborator

@khluu khluu commented Mar 29, 2026

Summary

  • Replace three nearly-identical template dicts (docker_plugin_template, h200_plugin_template, b200_plugin_template) with shared constants (_COMMON_ENV, _COMMON_FIELDS, _DEVICE_CONFIGS, _DEFAULT_CONFIG) and a single config-driven get_docker_plugin() function
  • Remove the copy import since new dicts are built fresh on each call via list() copies
  • Add 18 pytest tests covering all device types, environment variables, volumes, GPU presence, mount_buildkite_agent, and mutation independence

Test plan

  • All 18 tests pass locally (python3 -m pytest tests/test_docker_plugin.py -v)
  • Verify CI passes on the PR
  • Confirm no downstream breakage in pipeline generation (only get_docker_plugin is imported externally)

🤖 Generated with Claude Code

Replace three nearly-identical template dicts with shared constants
(_COMMON_ENV, _DEVICE_CONFIGS, _DEFAULT_CONFIG) and a config-driven
get_docker_plugin() function.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant