fix: default DAG_DEPLOY_ENABLED to false and quote in bash condition#141
Merged
neel-astro merged 1 commit intoastronomer:mainfrom Mar 20, 2026
Merged
Conversation
When `astro deployment inspect` returns an empty string for deployments
without DAG deploy configured, the unquoted step output in the bash
condition on line ~454 produces invalid syntax (`|| == false`), causing
an exit code 2 / "conditional binary operator expected" error.
Two changes:
1. Use `${DAG_DEPLOY_ENABLED:-false}` when writing to GITHUB_OUTPUT so
the value is always "true" or "false", never empty.
2. Quote `"${{ steps.dag-deploy-enabled.outputs.DAG_DEPLOY_ENABLED }}"` in
the Get Deploy Type condition so an empty value (if it somehow slips
through) doesn't break bash syntax.
Fixes astronomer#140
neel-astro
approved these changes
Mar 20, 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
Fixes #140 — bash syntax error (
conditional binary operator expected) when a deployment does not have DAG deploy enabled.Root cause
astro deployment inspect ... --key configuration.dag_deploy_enabledreturns an empty string when DAG deploy is not configured. This empty string is written directly toGITHUB_OUTPUTand then used unquoted in theGet Deploy Typebash condition:Fix
Two changes, both defensive layers:
Default to
falseat output time — use${DAG_DEPLOY_ENABLED:-false}so the value written toGITHUB_OUTPUTis always"true"or"false", never empty.Quote the step output in the condition —
"${{ steps.dag-deploy-enabled.outputs.DAG_DEPLOY_ENABLED }}" == "false"so even an empty value produces valid bash ("" == "false").Test plan
Get Deploy Typestep should no longer fail withconditional binary operator expectedDAG_DEPLOY_ENABLED=true, full image deploy skipped correctly)🤖 Generated with Claude Code