Skip to content

ci: run preview deploys concurrently - #33386

Open
zeke wants to merge 1 commit into
productionfrom
ci/parallel-preview-deploys
Open

ci: run preview deploys concurrently#33386
zeke wants to merge 1 commit into
productionfrom
ci/parallel-preview-deploys

Conversation

@zeke

@zeke zeke commented Sep 10, 2026

Copy link
Copy Markdown
Member

This PR makes the two wrangler deploy calls in the Deploy Preview job's "Deploy to Cloudflare Workers" step run concurrently instead of sequentially.

Each PR preview is deployed twice, once under the short commit SHA and once under the branch-slug name, to the same dispatch namespace. These deploys are independent of each other, but currently run back-to-back in a single shell step, roughly doubling the time of that step (observed ~5m18s across two deploys on a recent run).

This backgrounds both wrangler deploy invocations and waits on each, so the step fails the same way as before if either deploy fails, but the wall-clock time should be close to that of a single deploy.

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Review

⚠️ 1 warning found in commit 8a99842.

👉 Fix in your agent 👈
Fix the following review findings in PR #33386 (https://github.com/cloudflare/cloudflare-docs/pull/33386).

Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
  or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order

After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.

The comment must come before the commit — the bot reads PR comments when a new
push triggers a review, so skip comments posted after the push will be missed.

---

## Code Review

### Warnings (1)

#### CR-d92421014d76 · Background job status lost on first failure
- **File:** `.github/workflows/ci.yml` line 296
- **Issue:** The step runs under GitHub Actions' default shell (`bash -e -o pipefail`). If the short-SHA deploy fails, `wait "$short_sha_pid"` returns non-zero and `set -e` terminates the script immediately, so `wait "$branch_slug_pid"` (line 297) never executes. The branch-slug deploy is left running as an orphaned background process and its exit status is never collected, so a failure of that deploy goes unreported and the process may outlive the step.
- **Fix:** Capture both exit statuses before letting the script exit, e.g. `set +e; wait "$short_sha_pid"; s1=$?; wait "$branch_slug_pid"; s2=$?; set -e; exit $((s1 || s2))`, so both deploys are always awaited and either failure fails the step.

Code Review

This code review is in beta and may not always be helpful — use your judgment.

Warnings (1)
File Issue
.github/workflows/ci.yml line 296 Background job status lost on first failure — The step runs under GitHub Actions' default shell (bash -e -o pipefail). If the short-SHA deploy fails, wait "$short_sha_pid" returns non-zero and set -e terminates the script immediately, so wait "$branch_slug_pid" (line 297) never executes. The branch-slug deploy is left running as an orphaned background process and its exit status is never collected, so a failure of that deploy goes unreported and the process may outlive the step. Fix: Capture both exit statuses before letting the script exit, e.g. set +e; wait "$short_sha_pid"; s1=$?; wait "$branch_slug_pid"; s2=$?; set -e; exit $((s1 || s2)), so both deploys are always awaited and either failure fails the step.

Conventions

No convention issues found.

Style Guide Review

No style-guide issues found.

Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.
/disable-auto-review Stops automatic reviews from triggering on future pushes to this PR. Codeowners can still run /review or /full-review manually.
/rebase Rebases the PR branch against production. On conflict, attempts to resolve automatically using AI. Stops with an explanation if confidence is not high enough.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/.github/ @ahaywood, @colbywhite, @MohamedH1998, @mvvmm, @cloudflare/content-engineering

@github-actions

Copy link
Copy Markdown
Contributor

@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://ci-parallel-preview-deploys.previews.developers.cloudflare.com (commit 8a99842)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://27a53e22.previews.developers.cloudflare.com 8a99842 2026-09-10T22:20:24.522Z Visit the dashboard ↗

@mvvmm

mvvmm commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

I'm fine w the review finding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants