feat(renderer): image.source build|registry mechanism (#532) - #536
Open
RonaldHensbergen wants to merge 2 commits into
Open
feat(renderer): image.source build|registry mechanism (#532)#536RonaldHensbergen wants to merge 2 commits into
RonaldHensbergen wants to merge 2 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the core renderer mechanism from #407, scoped per #532: a per-module
image.sourceconfig (build|registry, defaultbuild) that lets a rendered Compose service pull an already-published image instead of building locally.modules/orchestration/dagster/module.yaml: addedimage.source(enumbuild/registry, defaultbuild) andimage.tag(string) toconfigSchema, alongside the existingimage.variant.cli/renderer.py: new_apply_image_source()step in_render_services(). Whenconfig.image.source == "registry"andconfig.image.tagis set, drops the service'sbuild:block and rewritesimage:todocker.io/ronaldsoeverein/cds-dagster:<tag>. Services without abuild:block are untouched. Ifsource: registrybut notagis set, falls back to the existing build behavior (never emits an untagged registry ref).tests/test_renderer.py: newImageSourceRenderingTestcovering 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)
tagis required whensource: registry, and discouragingtag: latest— Validate image.source: registry requires a tag; discourage tag: latest #533Resolves #532
Testing
python -m unittest discover -s tests -p "test_*.py" -v— 556 tests, all passmake lint— passescds validate profiles/local-dagster-postgres-superset/profile.yaml— still valid