Skip to content

Migration PR 4, Stage 4: load-balancer runbook, executed state, and initial URL-map snapshot#3745

Merged
anth-volk merged 4 commits into
masterfrom
feat/migration-pr4-stage4-load-balancer
Jul 8, 2026
Merged

Migration PR 4, Stage 4: load-balancer runbook, executed state, and initial URL-map snapshot#3745
anth-volk merged 4 commits into
masterfrom
feat/migration-pr4-stage4-load-balancer

Conversation

@anth-volk

Copy link
Copy Markdown
Collaborator

Summary

Documentation for Stage 4 of the host cutover — the load balancer described here is already provisioned and validated (executed 2026-07-08 with step-by-step authorization; this PR records how, exactly as built).

  • Runbook (docs/migration/history/pr4-stage4-load-balancer-runbook.md): gcloud/REST commands for every action, amended with execution reality — reserved IPs recorded (34.117.200.13 / 2600:1901:0:347b::), and the two serverless-NEG platform constraints discovered mid-execution: timeoutSec is rejected (the LB timeout is fixed at 60 minutes for serverless backends, making the planned --timeout=600 unnecessary), and portName is rejected while older gcloud sets it unconditionally — so backend services were created via the Compute REST API with backends inline.
  • Weight-change procedure added to docs/migration/cloud-run-operations.md: export → diff → edit → import → verify → commit snapshot. url-maps import replaces the whole resource, so the committed snapshot is what makes editing safe.
  • Initial URL-map snapshot (docs/migration/urlmap/20260708T182458Z-lb-api.yaml) at app_engine=100 / cloud_run=0 — the diff anchor for every future ramp step.

Exit gates (all passed 2026-07-08)

  • Cert ACTIVE, both hostnames authorized (~8 min after the Squarespace CNAMEs)
  • curl --resolve via the LB IP: 200 in 0.40s with X-PolicyEngine-Backend: app_engine — over IPv4 and IPv6
  • Port 80 → 301 to https
  • LB request logs populated with backend_service_name: bs-app-engine (note for Stage 6: this project's http_load_balancer logs also contain aef-default-* entries from App Engine's own internal serving — monitoring must filter on bs-*)

No public traffic touches the LB: DNS for api.policyengine.org still points at App Engine, and nothing resolves to the LB IPs until Stage 5's api-lb record.


🤖 Generated with Claude Code

anth-volk and others added 4 commits July 8, 2026 18:28
Gcloud equivalents of every console action for provisioning the global
external ALB (EXTERNAL_MANAGED): dual IPv4+IPv6 frontends (the current
host serves AAAA via ghs.googlehosted.com, so IPv6 clients exist),
DNS-authorized Certificate Manager cert for both hostnames, serverless
NEGs for App Engine and Cloud Run in us-central1, backend services with
timeout 600 and full request logging, and a URL map pinned to
app_engine=100/cloud_run=0 so every future ramp step is a weight edit.
Committed before execution per the plan's manual-infra rule; exit gates
and full teardown included. The recurring weight-change procedure
(export -> diff -> edit -> import -> verify -> commit snapshot) lands in
the living operations doc.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
timeoutSec and portName are rejected on backend services with
serverless NEG backends; the timeout is platform-fixed at 60 minutes
(docs-verified), making the planned --timeout=600 both impossible and
unnecessary. Old gcloud sets portName unconditionally at create, so the
services were created via the Compute REST API with backends inline.

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

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.89%. Comparing base (08176b4) to head (ab7ee0e).
⚠️ Report is 12 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3745   +/-   ##
=======================================
  Coverage   79.89%   79.89%           
=======================================
  Files          70       70           
  Lines        4332     4332           
  Branches      807      807           
=======================================
  Hits         3461     3461           
  Misses        652      652           
  Partials      219      219           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@anth-volk anth-volk merged commit 844510f into master Jul 8, 2026
10 checks passed
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.

1 participant