Skip to content

feat(release): add SubPlat tag schema and release workflow#20647

Open
david1alvarez wants to merge 1 commit into
mainfrom
PAY-3701
Open

feat(release): add SubPlat tag schema and release workflow#20647
david1alvarez wants to merge 1 commit into
mainfrom
PAY-3701

Conversation

@david1alvarez
Copy link
Copy Markdown
Contributor

@david1alvarez david1alvarez commented May 26, 2026

Because

  • SubPlat-owned services (payments-next, payments-api) need to deploy on an independent cadence from FxA so the two teams can ship without dragging the rest of the monorepo's pods along on every release. The parent epic (PAY-3556) describes the goal of alternating-week deploys so QA can focus on one service area at a time.
  • This is the fxa-repo half of that split: it introduces the SubPlat tag convention and CI routing. The pod-rolling half (which pods actually update for a given tag) lives in PAY-3702 and is blocked on this work landing.

This pull request

  • Adds .github/workflows/tag-release-subplat.yml, a manual workflow_dispatch workflow that resolves the latest v1.TRAIN.0 tag, runs two pre-flight existence checks (refusing if subplat-v1.TRAIN.0 or subplat-train-TRAIN already exists on origin with a clear error message), and otherwise creates the subplat-train-TRAIN branch and subplat-v1.TRAIN.0 tag at the same commit as the latest FxA train.
  • Expands the tag-validation regex in .github/workflows/docker.yml to accept an optional subplat- prefix, so the same Docker image-build pipeline serves either tag scheme (one mono image, two tag strings).
  • Adds _scripts/trigger-docker-push-subplat.sh and _scripts/trigger-dot-release-subplat.sh, mirroring their FxA siblings but strict on subplat-v1.X.Y[-rcN] format. The dot-release script enforces that the user is on subplat-train-TRAIN and refuses to tag if subplat-v1.X.Y already exists locally or on the remote.
  • Wires both scripts into root package.json as trigger:docker-push-subplat and trigger:dot-release-subplat yarn aliases.
  • Tightens 7 FxA test-job tag filters in .circleci/config.yml from /.*/ to /^v\d+\.\d+\.\d+(-rc\d+)?$/, so v1.* tags only fan out to FxA test jobs. Init, Build, and Lint stay on /.*/ and run for both tag schemes.
  • Adds a playwright-payments-tests invocation to the test_and_deploy_tag workflow with tag filter /^subplat-v\d+\.\d+\.\d+(-rc\d+)?$/, so SubPlat tags run only payments functional tests. The job definition itself was already parameterized; this is just a new invocation.

Issue that this pull request solves

Closes: PAY-3701

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).
  • I have manually reviewed all AI generated code.

How to review (Optional)

  • Key files/areas to focus on:
    • .github/workflows/tag-release-subplat.yml — pre-flight existence checks for the SubPlat tag and branch
    • .circleci/config.yml — the seven tags: only: filter changes and the new playwright-payments-tests job
    • .github/workflows/docker.yml — single-line regex change
  • Suggested review order:
    1. .github/workflows/tag-release-subplat.yml (the new workflow, biggest net-new file)
    2. .circleci/config.yml (filter tightening + new job invocation)
    3. .github/workflows/docker.yml (regex)
    4. _scripts/trigger-{docker-push,dot-release}-subplat.sh (parallel to existing FxA scripts)
    5. package.json (two new yarn aliases)
  • Risky or complex parts:
    • Tightening the FxA test-job filters from /.*/ to /^v\d+\.\d+\.\d+(-rc\d+)?$/ means any ad-hoc tag that doesn't match either the FxA or SubPlat pattern (e.g. a manually-pushed staging-1) will no longer trigger CircleCI test jobs. No such ad-hoc tags appear to be in active use, but worth a sanity check with SREs.

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

This PR alone does not change deploy behavior — it only adds the SubPlat tag convention and routes the right CircleCI jobs. The actual pod-rolling split (teaching ArgoCD that subplat-* tags should only update payments-next / payments-api pods) lives in PAY-3702 (global-platform-admin + webservices-infra changes), which is blocked on this work landing.

Because:

  - SubPlat-owned services (payments-next, payments-api) need to
    deploy on an independent cadence from FxA without dragging the
    rest of the monorepo's pods along on every release.
  - PAY-3701 introduces the fxa-repo half of that split: a parallel
    subplat-v1.TRAIN.PATCH tag convention and CI routing so SubPlat
    tags only run payments tests. The MozCloud/ArgoCD half (which
    pods actually roll for each tag) lands in PAY-3702.

This commit:

  - Adds .github/workflows/tag-release-subplat.yml, a manual
    workflow_dispatch that resolves the latest v1.TRAIN.0 tag,
    fails fast if subplat-v1.TRAIN.0 or subplat-train-TRAIN already
    exists on origin, and otherwise creates the SubPlat train
    branch and tag at the same commit.
  - Expands the docker.yml tag-validation regex to accept an
    optional `subplat-` prefix so the same image-build pipeline can
    build either tag scheme.
  - Adds _scripts/trigger-docker-push-subplat.sh and
    _scripts/trigger-dot-release-subplat.sh, mirroring their FxA
    siblings but strict on the subplat-v1.TRAIN.PATCH format and
    rooted on the subplat-train-TRAIN branch.
  - Wires both scripts up via new trigger:docker-push-subplat and
    trigger:dot-release-subplat yarn aliases in root package.json.
  - Tightens the FxA test-job tag filters in .circleci/config.yml
    from `/.*/` to `/^v\d+\.\d+\.\d+(-rc\d+)?$/` so v1.* tags only
    trigger FxA test jobs, and adds a playwright-payments-tests
    invocation filtered to `/^subplat-v\d+\.\d+\.\d+(-rc\d+)?$/`
    for SubPlat tags. Init / Build / Lint stay on `/.*/` and run
    for both schemes.

Closes #PAY-3701
@david1alvarez david1alvarez marked this pull request as ready for review May 26, 2026 18:48
@david1alvarez david1alvarez requested a review from a team as a code owner May 26, 2026 18:48
Copilot AI review requested due to automatic review settings May 26, 2026 18:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a SubPlat-specific tag/branch convention (subplat-v* / subplat-train-*) and routes CI appropriately so SubPlat-owned services can ship on an independent cadence without triggering the full FxA tag-test fanout.

Changes:

  • Added a manual GitHub Actions workflow to create subplat-train-<TRAIN> and subplat-v1.<TRAIN>.0 from the latest FxA train tag after preflight checks.
  • Updated the GitHub Actions Docker workflow and CircleCI tag filters so SubPlat tags trigger only payments Playwright tests, while FxA tags continue to trigger FxA test jobs.
  • Added SubPlat-specific helper scripts and wired them into package.json for triggering docker builds and dot-releases.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
package.json Adds yarn aliases for SubPlat docker push and dot-release scripts.
.github/workflows/tag-release-subplat.yml New workflow to create SubPlat train branch + .0 tag from latest FxA train tag.
.github/workflows/docker.yml Expands tag validation to accept optional subplat- prefix.
.circleci/config.yml Tightens FxA tag filters and adds a SubPlat-tag-only invocation for payments Playwright tests.
_scripts/trigger-dot-release-subplat.sh New SubPlat dot-release tagging script with train-branch enforcement and remote/local tag existence checks.
_scripts/trigger-docker-push-subplat.sh New SubPlat docker build trigger script via gh workflow run.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- name: Resolve latest FxA train tag
run: |
set -euo pipefail
latest_fxa_tag=$(git tag -l 'v1.*.0' --sort=version:refname | grep -v '-' | tail -1)
Comment thread .circleci/config.yml
ignore: /.*/
tags:
only: /.*/
only: /^v\d+\.\d+\.\d+(-rc\d+)?$/
Comment thread .circleci/config.yml
ignore: /.*/
tags:
only: /.*/
only: /^v\d+\.\d+\.\d+(-rc\d+)?$/
Comment thread .circleci/config.yml
ignore: /.*/
tags:
only: /.*/
only: /^v\d+\.\d+\.\d+(-rc\d+)?$/
Comment thread .circleci/config.yml
ignore: /.*/
tags:
only: /.*/
only: /^v\d+\.\d+\.\d+(-rc\d+)?$/
Comment thread .circleci/config.yml
ignore: /.*/
tags:
only: /.*/
only: /^v\d+\.\d+\.\d+(-rc\d+)?$/
Comment thread .circleci/config.yml
ignore: /.*/
tags:
only: /.*/
only: /^v\d+\.\d+\.\d+(-rc\d+)?$/
Comment thread .circleci/config.yml
ignore: /.*/
tags:
only: /.*/
only: /^v\d+\.\d+\.\d+(-rc\d+)?$/
Comment thread .circleci/config.yml
branches:
ignore: /.*/
tags:
only: /^subplat-v\d+\.\d+\.\d+(-rc\d+)?$/
Copy link
Copy Markdown
Contributor

@xlisachan xlisachan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Davey!

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