fix(deploy): do not treat --image-name as image-only#2113
Open
jlaneve wants to merge 1 commit into
Open
Conversation
Restore the pre-1.42.0 semantics of --image-name: it specifies the image source, not the deploy type. Defaulting to image-only on --image-name broke image-and-dags deploys against deployments that do not have DAG deploys enabled. Dropping the auto-set and the forbidden-flag list restores the historical behavior; --image --image-name remains the explicit image-only form and still skips the project-dir check.
Coverage Report for CI Build 8Coverage decreased (-0.004%) to 39.563%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
schnie
approved these changes
May 4, 2026
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
astro deploy <id> --image-name <tag>is auto-promoted to an image-only deploy. On any Deployment that has not enabled DAG deploys, that fails withDAG-only deploys are not enabled for this Deployment.astronomer/deploy-actionrelies on that — itsdeploy-type: image-and-dagsstep runsastro deploy <id> --wait --image-name <tag>and uses the explicit--image --image-nameform forimage-only. Auto-flipping--image-nameto image-only therefore breaks the image-and-dags + prebuilt-image flow with no replacement.This restores the historical semantics:
--image-namespecifies the image source,--imagespecifies the deploy type. They compose:astro deploy --image-name X./dags)astro deploy --imageastro deploy --image --image-name XChanges
cmd/cloud/deploy.go: dropimage = trueauto-set and the forbidden-flag list (--dags,--dags-path,--no-dags-base-dir,--pytest,--parse,--build-secrets) introduced for--image-name. Scope theEnsureProjectDirskip to--image && --image-name.cmd/cloud/deploy_test.go: replace the now-inverted assertions; add a regression test that--image-namealone does not flipImageto true.The previous user-facing scenario (
astro deploy --image-name Xfrom a non-project dir) is now served by the explicitastro deploy --image --image-name X, which is the formdeploy-actionalready uses for image-only deploys.Test plan
go test ./cmd/cloud/ ./cloud/deploy/passesgo vet ./cmd/cloud/ ./cloud/deploy/cleanastro deploy <id> --image-name <tag>against a Deployment without DAG deploys enabled completes (noenableDagDeployMsg)astro deploy --image --image-name <tag>from a non-project directory still works🤖 Generated with Claude Code