Skip to content

Copy bundles to deployment previews - #168

Open
jeremybeard wants to merge 1 commit into
named-dag-bundlesfrom
preview-bundle-copy
Open

jeremybeard wants to merge 1 commit into
named-dag-bundlesfrom
preview-bundle-copy

Conversation

@jeremybeard

@jeremybeard jeremybeard commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

A deployment preview is cloned from astro deployment inspect --template, which carries no bundles, so a named-bundle deploy to a preview failed. create-deployment-preview now copies the original deployment's bundles: DAG bundles by name, then non-DAG bundles with their mount path, type, and links to the preview's DAG bundles of the same names. It skips the copy with a notice on CLIs older than 1.44.0, and with a warning on runners without jq.

Contents aren't copied; the README says to add each bundle's deploy step to the workflow that creates the preview. A dags-only step on a new preview now deploys its DAGs.

E2E: the preview test registers a named DAG bundle and a linked non-DAG bundle on the original deployment, and checks both reach the preview with the link remapped. Its bundle lookup now matches a deploy by any of its bundles, since the preview's deploys list several.

@jeremybeard
jeremybeard added this pull request to stack #169 October 15, 2026 17:25
@jeremybeard
jeremybeard force-pushed the preview-bundle-copy branch 2 times, most recently from 062180f to f431dea Compare October 16, 2026 18:25
@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
else
# with ASTRO_API_TOKEN set, the CLI prints "Using an Astro API Token" to stdout ahead of the JSON
list_bundles() {
astro deployment bundle list --deployment-id "$1" --json | jq -Rsc 'sub("^[^{]*"; "") | fromjson | .bundles // []'

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.

curious q: will this fail loudly or silently with empty list for deployments that do not support bundles?

This branch is waiting to be deployed

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