posit-dev / posit-dev/images-shared
Split BakeryConfig into a document model, CRUD manager, and build service
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 0
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 22
Description
`config/config.py` (1,210 LOC) mixes five distinct responsibilities in one file: YAML lifecycle, CRUD operations, target generation, build orchestration, and registry cleanup. It imports from `image.bake.bake`, `registry_management.ghcr`, and `image.image_target`, coupling config parsing to build and registry concerns. Tests for config parsing are entangled with tests for build orchestration.
Split into:
- `BakeryConfigDocument` — pure Pydantic model (already exists in name)
- `BakeryConfigManager` — YAML CRUD, stays in `config/`
- Build orchestration service — moves to `image/` or a new `orchestration/` module
The target-generation slice maps to `select_targets()` from `RFC-TARGET-SELECTION.md`, which is a prerequisite for the full split.
Files: `config/config.py`, `config/image/image.py`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading config/config.py, config/image/image.py, and RFC-TARGET-SELECTION.md, with select_targets() as the prerequisite entry point. Map the existing configuration parsing, CRUD, target generation, build orchestration, and registry cleanup responsibilities before splitting them. Done means the document model, YAML manager, and build orchestration are separated and configuration tests are no longer entangled with orchestration tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100