Skip to content

Deploy DAGs on dags-only runs with no diff, and reject image-name where it can't apply - #165

Merged
jeremybeard merged 3 commits into
mainfrom
dags-only-fallbacks
Oct 19, 2026
Merged

jeremybeard merged 3 commits into
mainfrom
dags-only-fallbacks

Conversation

@jeremybeard

@jeremybeard jeremybeard commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

dags-only deployed nothing when there was no diff to go on (workflow_dispatch, a push that creates a branch, a missing diff base), where the other deploy types deploy everything. It now deploys DAGs in that case, when DAG deploys are enabled. The DAG deploy e2e test covers a dispatch.

image-name is now rejected where it can't apply, as the Astro CLI rejects the equivalent flags alongside --image-name:

  • with dags-only, which never deploys an image; this used to deploy nothing at all
  • with parse or pytest on infer and image-and-dags (image-only doesn't pass them on)
  • with build-secrets

A custom image is deployed as it was built, so none of these combinations did anything useful. Input validation tests cover each.

@jeremybeard
jeremybeard added this pull request to stack #169 October 15, 2026 17:25
@jeremybeard jeremybeard changed the title Deploy DAGs on dags-only runs with no diff or a custom image Deploy DAGs on dags-only runs with no diff, and reject image-name where it can't apply Oct 15, 2026
@jeremybeard
jeremybeard marked this pull request as ready for review October 16, 2026 19:11
@jeremybeard
jeremybeard requested a review from a team as a code owner October 16, 2026 19:11
Comment thread action.yaml Outdated
# validate deploy-type-specific inputs
# a custom image is deployed as it was built, so there is nothing to test or build, and dags-only never
# deploys an image; the CLI rejects the equivalent flags alongside --image-name
if [[ "${{ inputs.image-name }}" != "no-custom-image" ]]; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to also validate the action before going into this block? Like, if the action is going to be delete-deployment-preview, should it matter what the rest of the variables are? The below if [[ ${{ inputs.action }} == delete-deployment-preview ]]; then branch doesn't seem to care what type it is, but we won't make it there if we exit here.

@wendtek wendtek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One possible nit. I leave it up to your judgement on whether it's a valid scenario.

Comment thread action.yaml Outdated
# history is already present from the fetch-depth: 0 checkout, so no fetch is needed;
# a `git fetch` here would also fail on private repos due to persist-credentials: false
if ! git cat-file -e "$GITHUB_EVENT_BEFORE" 2>/dev/null; then
echo "Commit $GITHUB_EVENT_BEFORE does not exist, falling back to image deploy."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this log is not consistent with the behavior now, correct? Maybe it was misleading before this PR as well, if I understand the PR description correctly 😅

Base automatically changed from e2e-parallel to main October 19, 2026 13:18
jeremybeard and others added 2 commits October 19, 2026 10:33
A delete deploys nothing, so inputs that only shape a deploy shouldn't stop it. A delete step sharing a deploy step's inputs would otherwise start failing after an upgrade that newly rejects one of them, leaving the preview running.

Co-Authored-By: Claude <[email protected]>
Without a diff, the action deploys everything deploy-type covers, which for dags-only is a DAG deploy rather than an image deploy.

Co-Authored-By: Claude <[email protected]>
@jeremybeard
jeremybeard merged commit 562d690 into main Oct 19, 2026
12 of 13 checks passed

This branch is waiting to be deployed

1 waiting deployment
e2e-test — 4e0bed9a Waiting Oct 19, 2026 by jeremybeard via Redact Inputs #369
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.

3 participants