Skip to content

feat(renderer): image.source build|registry mechanism (#532) - #536

Open
RonaldHensbergen wants to merge 2 commits into
mainfrom
feat/image-source-renderer-532
Open

feat(renderer): image.source build|registry mechanism (#532)#536
RonaldHensbergen wants to merge 2 commits into
mainfrom
feat/image-source-renderer-532

Conversation

@RonaldHensbergen

Copy link
Copy Markdown
Owner

Summary

Implements the core renderer mechanism from #407, scoped per #532: a per-module image.source config (build | registry, default build) that lets a rendered Compose service pull an already-published image instead of building locally.

  • modules/orchestration/dagster/module.yaml: added image.source (enum build/registry, default build) and image.tag (string) to configSchema, alongside the existing image.variant.
  • cli/renderer.py: new _apply_image_source() step in _render_services(). When config.image.source == "registry" and config.image.tag is set, drops the service's build: block and rewrites image: to docker.io/ronaldsoeverein/cds-dagster:<tag>. Services without a build: block are untouched. If source: registry but no tag is set, falls back to the existing build behavior (never emits an untagged registry ref).
  • tests/test_renderer.py: new ImageSourceRenderingTest covering default build behavior (regression), registry+tag rewrite, registry without tag fallback, services without build left alone, and variant-prefixed tags (e.g. hardened-1.8.0).

Out of scope (tracked separately)

Resolves #532

Testing

  • python -m unittest discover -s tests -p "test_*.py" -v — 556 tests, all pass
  • make lint — passes
  • cds validate profiles/local-dagster-postgres-superset/profile.yaml — still valid

Adds config.image.source (build|registry, default build) and
config.image.tag to modules/orchestration/dagster/module.yaml, and a new
renderer step (_apply_image_source) that, when source is "registry" and a
tag is configured, drops a service's build: block and rewrites image: to
docker.io/ronaldsoeverein/cds-dagster:<tag>. Services without a build:
block, or with source: registry but no tag configured, are left
unchanged so an untagged registry reference is never silently emitted.

Resolves #532

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.

image.source: build|registry — renderer mechanism to emit image: instead of build:

1 participant