Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

ci(staging): deploy every merge to staging, drop the overnight freeze (#16975)

Othman Abu Ajamieh49d963af7c90
diff --git a/.github/workflows/continuous-delivery-stg.yml b/.github/workflows/continuous-delivery-stg.yml
index 232ef024cc2..eec8650b65d 100644
--- a/.github/workflows/continuous-delivery-stg.yml
+++ b/.github/workflows/continuous-delivery-stg.yml
@@ -13,7 +13,6 @@ on:
type: choice
options:
- deploy-staging # Re-deploy to staging (e.g., after infra change)
- - deploy-staging-skip-freeze # Deploy to staging, ignoring the freeze window
# One deploy run at a time, so e2e always tests the SHA it reports on. A newer
# pending run replaces an older pending one: the latest merge still wins.
@@ -46,29 +45,8 @@ jobs:
echo "is_hotfix_merge=false" >> $GITHUB_OUTPUT
fi
- check-freeze:
- if: github.event_name == 'push'
- runs-on: ubuntu-latest
- outputs:
- frozen: ${{ steps.check.outputs.frozen }}
- steps:
- - name: Check staging freeze window (5 PM - 9 AM UTC)
- id: check
- run: |
- HOUR=$(date -u +%H)
- if [ "$HOUR" -ge 17 ] || [ "$HOUR" -lt 9 ]; then
- echo "Staging is frozen (current UTC hour: $HOUR). Skipping deploy."
- echo "frozen=true" >> $GITHUB_OUTPUT
- else
- echo "frozen=false" >> $GITHUB_OUTPUT
- fi
-
build-image:
- needs: [check-freeze]
- if: |
- always() &&
- ((github.event_name == 'push' && needs.check-freeze.outputs.frozen == 'false') ||
- (github.event_name == 'workflow_dispatch' && (github.event.inputs.action == 'deploy-staging' || github.event.inputs.action == 'deploy-staging-skip-freeze')))
+ if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-24.04
outputs:
image_tag: ${{ steps.set-tag.outputs.image_tag }}
diff --git a/.github/workflows/dast.yml b/.github/workflows/dast.yml
index 9a0ab49b014..19816ecf266 100644
--- a/.github/workflows/dast.yml
+++ b/.github/workflows/dast.yml
@@ -10,8 +10,7 @@ name: DAST (ZAP) — Staging
on:
schedule:
- # 03:00 UTC — inside the staging deploy freeze window (17:00–09:00 UTC), so no deploy
- # races the scan and the target is stable. See continuous-delivery-stg.yml.
+ # 03:00 UTC, when merges are rare: a merge during the scan redeploys staging under it.
- cron: '0 3 * * *'
workflow_dispatch:
diff --git a/brain/knowledge/engineering/cloud-deployment-paths.md b/brain/knowledge/engineering/cloud-deployment-paths.md
index 8b6864eec70..56a9360505f 100644
--- a/brain/knowledge/engineering/cloud-deployment-paths.md
+++ b/brain/knowledge/engineering/cloud-deployment-paths.md
@@ -23,4 +23,4 @@ Cloud's `workflow_call`/scheduled run skips `build-image`, so `deploy-canary` ge
- **Never put a BuildKit cache mount on `/var/cache/apt` or `/var/lib/apt`.** The `node:*-bullseye-slim` base ships `/etc/apt/apt.conf.d/docker-clean`, which wipes downloaded `.deb`s and sets `Keep-Downloaded-Packages "false"` — so the mount caches nothing, but it does persist stale `apt` lists and `partial/` leftovers across Depot builds. When `bullseye-security` republishes and old `.deb`s rotate out, the next build dies on `Hash Sum mismatch` / `Unable to fetch some archives` → `exit code: 100`, which reads like a missing package but isn't. Removed from both Dockerfiles on 2026-08-12; a plain `apt-get update && apt-get install` is what works. Also: bullseye `main` has been frozen since Aug 2025 and Debian 11 LTS ends Aug 2026, so the base image needs a bookworm bump.
- **Building the image locally from a branch can fail before your code is even copied.** Two independent causes seen 2026-09-10 on arm64: (1) `snapshot.debian.org` served corrupt `.deb`s (`Hash Sum mismatch`, `File has unexpected size … Mirror sync in progress?`, `Bad header line`) across three retries, with no cache mount involved — workaround is a throwaway Dockerfile whose base stage is `FROM ghcr.io/activepieces/activepieces:<root package.json version> AS base` (same bun/npm/isolated-vm tooling, no apt), plus `ENV NODE_ENV=development` and `RUN rm -rf /usr/src/app` at the top of the build stage (the published image sets `NODE_ENV=production`, which makes `bun install` skip devDependencies). (2) `bun install --frozen-lockfile` fails whenever any workspace `package.json` version differs from its `bun.lock` entry; check with `bun install --lockfile-only` in a copy and `diff` the result before blaming your change.
- **`breaking = true` on a migration and the `⛓️‍💥 breaking-change` PR label are different axes.** The migration flag is about rollback safety and is what stops deploys; the label is about self-hoster upgrade impact and is enforced by `breaking-change-check.yml` on PRs. Neither implies the other.
-- **The Dockerfile's prune step deletes `packages/pieces/core` (and every community piece but the api's 5), then re-runs `bun install` without a lockfile.** Any other kept workspace that declares one of the removed pieces as `workspace:*` breaks the image build with `Workspace dependency "@activepieces/piece-…" not found`. #15842 hit this by adding core pieces to the engine's devDependencies for CI tests; the prune step now strips the engine's `@activepieces/piece-*` devDependencies. Staging skips `build-image` for pushes inside its freeze window (17:00–09:00 UTC, `check-freeze`), so a broken build hides behind green overnight runs until the first daytime push. Check any new piece dependency outside `packages/pieces` against that step.
+- **The Dockerfile's prune step deletes `packages/pieces/core` (and every community piece but the api's 5), then re-runs `bun install` without a lockfile.** Any other kept workspace that declares one of the removed pieces as `workspace:*` breaks the image build with `Workspace dependency "@activepieces/piece-…" not found`. #15842 hit this by adding core pieces to the engine's devDependencies for CI tests; the prune step now strips the engine's `@activepieces/piece-*` devDependencies. Check any new piece dependency outside `packages/pieces` against that step.
diff --git a/docs/handbook/engineering/onboarding/release-cycle.mdx b/docs/handbook/engineering/onboarding/release-cycle.mdx
index dff7bec3ad8..aea2d94c83f 100644
--- a/docs/handbook/engineering/onboarding/release-cycle.mdx
+++ b/docs/handbook/engineering/onboarding/release-cycle.mdx
@@ -8,9 +8,9 @@ This page explains how code moves from merge to production and why each step exi
## The Cycle
```
-Merge to main (Mon–Thu) ──→ Deploy to staging
+Merge to main ────────────→ Deploy to staging
│
- 5 PM UTC Thu: staging freezes + RC tagged
+ 5 PM UTC Thu: RC tagged
│
Fri–Sat: canary runs daily from main
│
@@ -22,9 +22,9 @@ Merge to main (Mon–Thu) ──→ Deploy to staging
## Cutoffs & Why
-### Staging Freeze / RC Tag — Thursday 5 PM UTC
+### RC Tag — Thursday 5 PM UTC
-Merges to `main` after 5 PM UTC on Thursday are **not deployed to staging**. At Thursday 5 PM UTC, the current staging image and commit are tagged as `release-candidate` — this is the stability gate for the week.
+At Thursday 5 PM UTC, the current staging image and commit are tagged as `release-candidate` — this is the stability gate for the week.
**Why**: Anything merged after the Thursday cut doesn't go to cloud production until the following week. This gives the team a predictable, stable window to validate changes before they reach customers.
@@ -46,8 +46,7 @@ On Monday at 9 AM UTC, the self-hosted release is published: git tag, GitHub rel
| Time | What Happens |
|---|---|
-| Mon–Thu, 9 AM–5 PM UTC | Merge to `main` → auto-deployed to staging |
-| Mon–Thu, 5 PM–9 AM UTC | Merge to `main` → code in `main` only, staging frozen |
+| Any time | Merge to `main` → auto-deployed to staging |
| **Thu 5 PM UTC** | Staging image + commit tagged as `release-candidate` |
| Fri–Sat | Canary deploys daily from `main`; cloud is quiet |
| **Sun 9 AM UTC** | Canary rebuilt from latest `main`; `release-candidate` promoted to cloud production; `deploy/cloud/YYYY-MM-DD` branch created |
@@ -62,11 +61,5 @@ Sometimes the cycle needs to be bypassed:
## FAQ
-**Q: I merged at 6 PM UTC on a Wednesday. When does my code reach production?**
-Your code is in `main` but staging is frozen. It won't be included in the Thursday RC tag unless it lands before 5 PM UTC Thursday. If it misses that cut, it won't reach cloud production until the following Sunday.
-
**Q: I merged at 10 AM UTC on a Wednesday. When does my code reach production?**
It deploys to staging immediately. As long as nothing breaks before Thursday 5 PM UTC, it will be included in the RC tag and will reach cloud production the following Sunday.
-
-**Q: Can I deploy to staging during the freeze window?**
-Yes, manually dispatch `continuous-delivery.yml` with `deploy-staging`. But consider that the content team may be relying on the frozen version.
diff --git a/docs/handbook/engineering/playbooks/releases.mdx b/docs/handbook/engineering/playbooks/releases.mdx
index ea6ba02d23d..2a36f97e80d 100644
--- a/docs/handbook/engineering/playbooks/releases.mdx
+++ b/docs/handbook/engineering/playbooks/releases.mdx
@@ -9,19 +9,18 @@ All changes flow through a staging environment before reaching production. There
Five separate workflows cover the full delivery lifecycle:
-1. **Merge to `main`** (Mon–Thu, 9 AM–5 PM UTC) — `continuous-delivery-stg.yml` automatically builds a Docker image and deploys to **staging** (`stg.activepieces.com`).
-2. **Staging freeze (5 PM UTC)** — merges to `main` after 5 PM UTC are accepted but **not deployed** to staging. The content team uses the frozen staging environment overnight.
-3. **Daily 9 AM UTC** — `continuous-delivery-canary.yml` builds a `version.sha.canary` image from the latest `main` and deploys it to the **canary** environment. Breaking migrations block the deployment. See the [Canary Deployment playbook](/handbook/engineering/playbooks/canary-deployment) for details.
-4. **Thursday 5 PM UTC** — `tag-release-candidate` job tags the current staging image and commit as `release-candidate`.
-5. **Sunday 9 AM UTC** — `continuous-delivery-cloud.yml` runs a fresh canary build from `main` (by calling `continuous-delivery-canary.yml` as a reusable workflow), then promotes `release-candidate` to production and creates a `deploy/cloud/YYYY-MM-DD` branch.
-6. **Monday 9 AM UTC** — `continuous-delivery-release.yml` re-tags the `release-candidate` image and publishes the self-hosted release.
+1. **Merge to `main`** — `continuous-delivery-stg.yml` automatically builds a Docker image and deploys to **staging** (`stg.activepieces.com`).
+2. **Daily 9 AM UTC** — `continuous-delivery-canary.yml` builds a `version.sha.canary` image from the latest `main` and deploys it to the **canary** environment. Breaking migrations block the deployment. See the [Canary Deployment playbook](/handbook/engineering/playbooks/canary-deployment) for details.
+3. **Thursday 5 PM UTC** — `tag-release-candidate` job tags the current staging image and commit as `release-candidate`.
+4. **Sunday 9 AM UTC** — `continuous-delivery-cloud.yml` runs a fresh canary build from `main` (by calling `continuous-delivery-canary.yml` as a reusable workflow), then promotes `release-candidate` to production and creates a `deploy/cloud/YYYY-MM-DD` branch.
+5. **Monday 9 AM UTC** — `continuous-delivery-release.yml` re-tags the `release-candidate` image and publishes the self-hosted release.
## Environments
| Environment | URL | Purpose |
|---|---|---|
| Preview | `branch-name.activepieces.com` | Per-PR ephemeral environment for review. *Requires the `preview` label on the PR.* |
-| Staging | `stg.activepieces.com` | Internal testing, content team daily use |
+| Staging | `stg.activepieces.com` | Internal testing |
| Canary | `canary.activepieces.com` | Daily cut from `main`; catches issues before they reach production |
| Production | `cloud.activepieces.com` | Live customers |
@@ -46,13 +45,12 @@ To run any workflow manually, go to the repo's **Actions** tab, select the workf
| Trigger | What happens |
|---|---|
-| **Push to `main`** | Builds a `version.sha.beta` image and deploys to staging. Skipped automatically during the freeze window (5 PM – 9 AM UTC). |
-| **Manual dispatch** | Presents a dropdown with two choices (see below). |
+| **Push to `main`** | Builds a `version.sha.beta` image and deploys to staging. |
+| **Manual dispatch** | Presents a dropdown with one choice (see below). |
#### Manual dispatch choices
-- **`deploy-staging`** — Re-deploy the latest `main` to staging. Use this after an infra change, or to force a deploy that was skipped due to the freeze window.
-- **`deploy-staging-skip-freeze`** — Same as above but explicitly bypasses the freeze window check.
+- **`deploy-staging`** — Re-deploy the latest `main` to staging. Use this after an infra change.
### `continuous-delivery-cloud.yml` — Production Promotion