Platform Release Process
This document describes the release process for the Controller, Admin, and Ecommerce platforms.
Overview
All platforms follow a continuous deployment model where changes merged to main are automatically deployed through staging and preprod environments before requiring manual approval for production. The release system automates changelog generation, GitHub release creation, and Slack notifications.
Deployment Pipeline
Each platform has its own deploy pipeline workflow:
- Controller:
deploy_pipeline.yaml - Admin:
deploy_pipeline_admin.yaml - Ecom:
deploy_pipeline_ecom.yaml
Pipeline stages:
- ref-sha: Locks the commit SHA at pipeline start
- Staging: Automatic deployment and testing
- Preprod: Automatic deployment and testing after staging succeeds
- prepare-release: Creates a draft GitHub release (runs in parallel with prod)
- Prod: Requires manual approval, then deploys and tests
Concurrency and Draft Clobbering
Each commit merged to main triggers its own pipeline. Staging and preprod are serialized (one at a time), but multiple pipelines can be waiting for prod approval simultaneously.
Critical behavior: prepare-release deletes any existing draft release for the platform before creating a new one. This means only the most recent pipeline to complete preprod has a valid draft. Earlier pipelines' drafts are clobbered.
When a user approves an earlier pipeline for prod deployment, publish-release handles two cases:
- Draft exists for this commit: Publishes the draft as-is (notes are already correct —
prepare-releasegenerated them for exactly the(last_release, this_commit]range). - No matching draft (clobbered by a later pipeline): Generates the release from scratch — computes commits, generates changelog, and creates + publishes the release in one step.
In both cases, if the released commit is behind HEAD of main, a new draft release is created for the remaining commits (released_commit, HEAD] so the next deploy pipeline picks them up.
Release Preparation (prepare-release)
After preprod succeeds, the prepare-release action creates a draft GitHub release.
What It Does
- Finds the last published release for the platform
- Identifies commits in
(last_release, target_sha]that triggered the platform's deploy workflow - Generates a changelog from associated PRs
- Deletes any existing draft releases for the platform
- Creates a new draft GitHub release targeting
target_sha - Posts announcement to internal team Slack channel (if webhook is configured)
The target_sha is the specific commit being deployed (locked by ref-sha at pipeline start), not HEAD of main. This ensures the draft notes are always scoped to exactly the commits being released.
Release Tag Format
<platform>.<version>
Examples: controller.5, admin.12, ecom.27
Release Notes Format
Release notes include:
- Changes: List of PRs with title, number, and author
- Chores: PRs prefixed with
chore:(case-insensitive) in title or description are grouped under a separate "Chores" section at the bottom - Deployment: Links to the deploy pipeline run and previous release
Example release notes:
## Changes
- #1551 - Add productTitle to merchandising fields (@author)
- #1546 - Add Lambda deployment monitoring (@author)
## Chores
- #1548 - chore: update dependencies (@author)
## Deployment
- [Deploy Pipeline Run](https://github.com/marqo-ai/cloud_control_plane/blob/445728d0a3ede69aeb9fa75d585b6d2547a443f9/docs/dev/link)
- Previous release: [controller.4](https://github.com/marqo-ai/cloud_control_plane/blob/445728d0a3ede69aeb9fa75d585b6d2547a443f9/docs/dev/link)
- [Full diff](https://github.com/marqo-ai/cloud_control_plane/blob/445728d0a3ede69aeb9fa75d585b6d2547a443f9/docs/dev/link)
Slack Notifications
The release system sends Slack notifications at two points:
1. Draft Release (Internal Team)
When a draft release is created during preprod deployment, a notification is sent to the internal team channel. This requires the RELEASE_DRAFT_SLACK_WEBHOOK secret.
Format:
📢 Controller Platform Release: controller.5
- #1551 - Add feature X (@author)
- #1546 - Fix bug Y (@author)
2. Published Release (Company-Wide)
When a release is published (after production deployment succeeds), a notification is sent to the company-wide channel. This requires the RELEASE_SLACK_WEBHOOK secret.
Format:
📢 Controller Platform Release Published: controller.5
[Full release notes]
Required Secrets
| Secret | Description |
|---|---|
RELEASE_DRAFT_SLACK_WEBHOOK | Webhook URL for internal team channel (draft releases) |
RELEASE_SLACK_WEBHOOK | Webhook URL for company-wide channel (published releases) |
Both secrets are optional. If not configured, the corresponding Slack notification is skipped.
Publishing a Release (publish-release)
The publish-release action runs as a step inside the prod deploy job, before the actual deployment begins. It:
- Resolves the commit SHA being deployed
- Searches for a draft release whose
target_commitishmatches that SHA - If a matching draft exists: publishes it by release ID (notes are already correct)
- If no matching draft exists (clobbered by a later pipeline): generates the release from scratch:
- Finds the last published release for the platform
- Computes commits in
(last_release, commit]filtered by platform workflow runs - Generates changelog and creates a published (non-draft) release
- If the released commit is behind HEAD of main, creates a new draft for
(commit, HEAD] - Sends a company-wide Slack notification
Releasing a Non-Latest Commit
When multiple pipelines are queued for prod and you approve an earlier one:
- The earlier pipeline's draft was likely clobbered by a later
prepare-release publish-releasedetects the missing draft and generates the release from scratch- A forward draft is created for commits after the released commit, ensuring the next deploy pipeline has accurate release notes
Workflow Permissions
The publish-release step requires these permissions on the deploy job:
contents: write— to create/publish GitHub releasesactions: read— to query workflow runs for commit filtering
Rollbacks
To roll back a production deployment:
- Run the appropriate
Deploy & Testworkflow manually - Select
prodas the environment - Enter the previous release tag as the
refinput
Troubleshooting
No commits found
The workflow includes all commits from pipeline runs since the last release. If no deployments have occurred, the changelog will be empty.
PR not appearing in changelog
PRs only appear if:
- The commit triggered a pipeline run
- The commit was merged via a PR (direct pushes won't have associated PRs)
Chore not categorized
Ensure the PR title or description starts with chore: (case-insensitive). The prefix must be at the very beginning.