No results found.

Ephemeral Feature Environments

Automated deployment of temporary Magento 2 environments for pull requests, using anonymised production data to reduce risk and speed up reviews

Automatic deployment of temporary Magento environments for every pull request, complete with anonymized production data and unique subdomains. Environments spin up within 5-10 minutes, with full shell access for debugging, enable parallel QA testing, and clean up automatically when PRs close.

Problem

QA and code review bottlenecked on shared dev environments where only one feature could be tested at a time. And releases often blocked due to client change requests once work hits the staging site. And often the hosted staging and development site, would lack production-realistic data causing regressions and bugs to slip through.

⚠️

The shared staging environment became a critical bottleneck - any client RFCs cause release blockages. And stale data cause bugs going live, that could have been prevented.

Solution

Created a ephemeral host, which was capable of deploying warden environments and providing temporary sites for individual features to be validated prior to being added to the release queue. Environments created on PR creation with a recent (last 24 hours) stripped production database and automatically destroyed on closure.

Along with a complimentary CLI tool, to facilitate log, shell and DB access for debugging purposes to the deployment environment based on current GIT remote and active branch.

Paired with Dependabot/Renovate and a E2E test suite, allows Module and Platform updates to be performed entirely by QA/PMs.

🚀
Environments automatically created on PRs
Spun up within ~5-15 minutes
Unique subdomain with auto-provisioned SSL
e.g., feature-123.staging.example.com
📁
Media files proxied from production
reducing disk requirements
🗄️
Stripped production databases
recent data to avoid preventable bugs
🚀
Zero Dev Magento Updates
empowers Magento updates without dev work
🧪
Isolated Testing
allow clients to test features in isolation

Impact

0
Blocked Releases
↑ No Blockages
80%
Code Review Efficiency
↑ vs local testing
0
Data Related Bugs
↑ Realistic Data
100%
QA Coverage
↑ Production data
Before
After
Blocked Releases
Few per month
Zero Blockages
Data Related Bugs
A handful per month
Zero Bugs
Client Reviews
None
Unrestricted
Stakeholder Previews
Manual setup needed
Automatic link

Technical Highlights

💡
Cost Optimization

Dedicated servers providing significant compute at low cost, running Docker Swarm for orchestrating workloads for many clients.

Automated Updates

Feature environments are a critical part of an effective automated update pipeline

  1. Dependabot creates PR with updates
  2. Feature environment automatically deployed
  3. E2E tests run in CI
  4. QA manually validates in environment
  5. PM approves deployment from environment preview

Code Review Process

Ephemeral environments significantly boosts QA productivity and effectiveness

  1. Developer opens PR
  2. Feature environment link automatically posted to PR
  3. Reviewers can test the changes
  4. Feedback cycle shortens dramatically
  5. Confident merging with real-world testing

Impact

  • Reduced review time from days to hours
  • Eliminated environment conflicts between teams
  • Enabled non-technical stakeholders to preview changes
  • Caught integration issues earlier in development cycle
  • Accelerated automated updates by removing dev requirement
  • Improved code quality through easier testing