Skip to content

test: throwaway preview-env smoke test (do not merge)#275

Closed
nourshoreibah wants to merge 5 commits into
mainfrom
test/throwaway-preview-smoke
Closed

test: throwaway preview-env smoke test (do not merge)#275
nourshoreibah wants to merge 5 commits into
mainfrom
test/throwaway-preview-smoke

Conversation

@nourshoreibah

Copy link
Copy Markdown
Collaborator

Throwaway — do not merge. Exists only to exercise the ephemeral PR preview environment (#274).

Changes

  • Frontend: sidebar label BRANCHBRANCH Test (apps/frontend/src/app/components/Navbar.tsx)
  • Backend: donors lambda forces every donor name to Hello World (apps/backend/lambdas/donors/handler.ts)

Touches both apps/frontend and apps/backend/lambdas so a preview deploy proves the frontend build+sync and lambda code deploy both work.

How to test (after #274 is merged to main)

  1. Add the test-environment label to this PR.
  2. Wait for the 🌿 Preview environment — ready ✅ comment, open the URL.
  3. Confirm the sidebar reads BRANCH Test and every donor shows Hello World.
  4. Push a trivial commit → confirm the updated in place comment + no terraform in the Actions log.
  5. Remove the label (or close) → confirm teardown.

Not for merge. Exercises the ephemeral PR preview environment end to end:
- frontend: sidebar label "BRANCH" -> "BRANCH Test"
- backend: donors lambda forces every donor name to "Hello World"

Touches both apps/frontend and apps/backend/lambdas so a preview deploy proves
frontend build+sync AND lambda code deploy work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nourshoreibah nourshoreibah added do-not-merge test-environment Creates a temporary (nearly free) test environment. Uses prod DB and cognito labels Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🌿 ⏳ Creating preview environment… (logs)

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🌿 Preview environment — ready ✅

Open: https://d3nmtjoh6ir9ym.cloudfront.net/pr-275/
API: https://75n541sku6.execute-api.us-east-2.amazonaws.com/prod

Shared RDS + Cognito (prod data); DB migrations are not applied here. New commits update this environment in place — a note is posted here on each update. Remove the test-environment label or close the PR to tear it down.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🌿 Test environment updated in place ✅ — Click here to open. updated for 6afa9b4 · logs

Throwaway preview smoke test — any GET /expenditures returns a single
hardcoded expenditure regardless of auth status/access. Not for merge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🌿 Test environment updated in place ✅ — Click here to open. updated for b436289 · logs

The frontend sends Content-Type: application/json on every request, so even
GETs are non-simple and trigger a browser preflight. The preview frontend
(shared CloudFront) and preview API are cross-origin; the API resources only
defined GET/POST, so preflight OPTIONS hit no method and API Gateway returned a
403 with no CORS headers -> opaque 'CORS error' in the browser.

- Add OPTIONS to every preview API resource, routed to the proxy lambda (which
  already returns 200 + Access-Control-Allow-Origin: * for OPTIONS).
- Add CORS headers to DEFAULT_4XX/5XX gateway responses so real errors (lambda
  502s, unmatched routes) surface with their status instead of as CORS errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🌿 Test environment updated in place ✅ — Click here to open. updated for 2cc87a7 · logs

@nourshoreibah nourshoreibah removed the test-environment Creates a temporary (nearly free) test environment. Uses prod DB and cognito label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🌿 Preview environment torn down 🧹 — the stack for this PR has been destroyed.

1 similar comment
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🌿 Preview environment torn down 🧹 — the stack for this PR has been destroyed.

@nourshoreibah nourshoreibah added the test-environment Creates a temporary (nearly free) test environment. Uses prod DB and cognito label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🌿 ⏳ Creating preview environment… (logs)

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🌿 Preview environment — ready ✅

Open: https://d3nmtjoh6ir9ym.cloudfront.net/pr-275/
API: https://1wxdrr1th6.execute-api.us-east-2.amazonaws.com/prod

Shared RDS + Cognito (prod data); DB migrations are not applied here. New commits update this environment in place — a note is posted here on each update. Remove the test-environment label or close the PR to tear it down.

@nourshoreibah nourshoreibah removed the test-environment Creates a temporary (nearly free) test environment. Uses prod DB and cognito label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🌿 Preview environment torn down 🧹 — the stack for this PR has been destroyed.

@nourshoreibah nourshoreibah added the test-environment Creates a temporary (nearly free) test environment. Uses prod DB and cognito label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🌿 ⏳ Creating preview environment… (logs)

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🌿 Preview environment — ready ✅

Open: https://d3nmtjoh6ir9ym.cloudfront.net/pr-275/
API: https://0mob8s4zva.execute-api.us-east-2.amazonaws.com/prod

Shared RDS + Cognito (prod data); DB migrations are not applied here. New commits update this environment in place — a note is posted here on each update. Remove the test-environment label or close the PR to tear it down.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🌿 Preview environment torn down 🧹 — the stack for this PR has been destroyed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge test-environment Creates a temporary (nearly free) test environment. Uses prod DB and cognito

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant