mdn / mdn/dex

Use blue/green content prefixes for consistent deployments

Open
#528 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs triage
Dominant language
JavaScript
Stars
6
Forks
4
Avg merge
21h 12m
Merged PRs (30d)
32

Description

What information was incorrect, unhelpful, or incomplete?

Deployments currently synchronize the generated site directly into the live fred/ bucket prefix before updating the regional Cloud Functions.

Requests can therefore observe partially synchronized content or a mismatch between content and the redirects and canonicals embedded in the function.

What did you expect to see?

Alternate deployments between blue/ and green/ prefixes:

  1. Read SOURCE_CONTENT from every regional function and abort if they do not agree on the active prefix.
  2. Synchronize the complete build into the inactive prefix.
  3. Synchronize static assets to both prefixes without deleting older hashed assets, so cached pages continue to work after a cutover or rollback.
  4. Deploy every regional function with SOURCE_CONTENT pointing at the prepared prefix.
  5. Leave the previous prefix unchanged for rollback.

Deployments for each environment should be serialized so concurrent runs cannot select the same inactive prefix.

Do you have any supporting links, references, or citations?

The current production deployment synchronizes content and deploys the functions in .github/workflows/prod-build.yml.

Do you have anything more you want to share?

Each prefix could include a manifest containing the release commit so the workflow and deployed function can verify that they reference the expected build.

This would not make the three regional function updates atomic, but every region would serve a complete, internally consistent release throughout deployment. A load-balancer-level cutover could be considered separately if a single global switch is later required.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading .github/workflows/prod-build.yml to understand the current content synchronization and regional function deployment steps. Implement serialized blue/green deployments with agreed SOURCE_CONTENT values, complete inactive-prefix content, preserved assets, and rollback safety; done means each region serves a complete consistent release and concurrent runs cannot select the same prefix.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
cloud, devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.