posit-dev / posit-dev/images-shared

Split BakeryConfig into a document model, CRUD manager, and build service

Open
#593 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cvp:0 docker tdp:2
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.