Skip to content

chore(gen2-migration): stable & e2e based snapshots#14782

Merged
iliapolo merged 72 commits intogen2-migrationfrom
epolon/regen-snapshots
Apr 15, 2026
Merged

chore(gen2-migration): stable & e2e based snapshots#14782
iliapolo merged 72 commits intogen2-migrationfrom
epolon/regen-snapshots

Conversation

@iliapolo
Copy link
Copy Markdown
Contributor

@iliapolo iliapolo commented Apr 15, 2026

Description of changes

This PR improves the snapshot sanitization and normalization pipeline for the gen2 migration e2e system. The main goal is to make snapshots as stable as possible so that rerunning them produces the minimal
amount of changes.

Example future PR: #14783

Normalization

A new normalize step was added that runs before sanitization. It replaces run-specific values (random env names, CFN stack hashes) in both file content and filenames with deterministic placeholders,
keeping snapshot filenames stable across runs.

Sandbox identifier

The sandbox deployment now uses --identifier e2e for a deterministic stack name prefix instead of the OS username.

Issue #, if available

N/A

Description of how you validated changes

  • Successfully ran all E2E tests with snapshot generation.

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

iliapolo added 30 commits April 11, 2026 21:06
Add a normalize script that replaces run-specific values
(deploymentName, envName, envHash, sandboxHash, commitHash,
CFN nested stack hashes) with stable placeholders in snapshot
filenames and content, making snapshots deterministic across
e2e runs.

Use a fixed --identifier e2e for ampx sandbox deployments
instead of deriving the stack prefix from os.userInfo().username.

Regenerate and normalize project-boards snapshots.
---
Prompt: commit everything
iliapolo added 21 commits April 14, 2026 09:51
normalize, update docs

Remove getAllFiles wrapper, unused os import, and username
sanitization from sanitize.ts. Fix orphaned JSDoc in
normalize.ts. Update sanitize JSDoc to reflect current behavior.

Add snapshot post-processing documentation to the E2E system
README covering normalization and sanitization steps. Slim down
the migration-apps README to point to the E2E README for details
while keeping the manual invocation instructions local.
---
Prompt: commit
replacements, restore gen2 API key sanitization

Remove the output value replacement logic from sanitize.ts — it
was replacing values inside pre.generate snapshots that the
generate command depends on. Restore the original gen2 API key
extraction and sanitization. Normalize now only renames files,
no content replacement.
---
Prompt: commit
on API key sanitization
---
Prompt: made some changes, commit
@iliapolo iliapolo requested a review from a team as a code owner April 15, 2026 05:19
@iliapolo iliapolo changed the title chore(gen2-migration): regen snapshots using e2e chore(gen2-migration): stable & e2e based snapshots Apr 15, 2026
@iliapolo iliapolo enabled auto-merge (squash) April 15, 2026 05:42
@sai-ray sai-ray self-assigned this Apr 15, 2026
@sai-ray
Copy link
Copy Markdown
Contributor

sai-ray commented Apr 15, 2026

reviewed in-person.

@iliapolo iliapolo merged commit 6597ea0 into gen2-migration Apr 15, 2026
4 checks passed
@iliapolo iliapolo deleted the epolon/regen-snapshots branch April 15, 2026 18:24
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.

2 participants