Skip to content

Phase 28: harden hosted-GCE deploy (SDK dep fix + infra IAM/monitoring/budgets)#98

Merged
helloiamvu merged 2 commits into
mainfrom
phase28/deploy-hardening
Jul 4, 2026
Merged

Phase 28: harden hosted-GCE deploy (SDK dep fix + infra IAM/monitoring/budgets)#98
helloiamvu merged 2 commits into
mainfrom
phase28/deploy-hardening

Conversation

@helloiamvu

Copy link
Copy Markdown
Member

Hardens the Phase 28 hosted-GCE deploy after executing the first live full apply of the 90-resource platform layer (all 4 Cloud Run services/jobs live, 1-station backfill pilot SUCCEEDED). Folds in every fix the live apply surfaced so a clean tofu apply from scratch reproduces a working, green platform.

SDK dependency fix (blocks CI image builds)

  • packages/weather [satellite] extra pinned s3fs/gcsfs open-ended, but each hard-pins fsspec==<own-release> on differing cadences → pip ResolutionImpossible; the images had never built. Pinned fsspec==s3fs==gcsfs==2026.6.0 (latest co-released, py3.12-installable triple).

Infra hardening (infra/)

  • deletion_protection=false on the 6 Cloud Run service/job resources — lets TF replace a tainted/failed initial revision.
  • runtime_agent_iam.tf (new) — grants the 3 Cloud Run service agents artifactregistry.reader (cross-project image pull) and the weather-backfill runtime SA batch.agentReporter + logging.logWriter + AR reader (the first pilot failed "no VM has agent reporting" without these). Folds the manual grants into Terraform.
  • monitoring.tfr2_partition_ageDISTRIBUTION/DELTA + bucket_options (value_extractor requires a distribution); data_freshness aligner → ALIGN_PERCENTILE_99; per-project email channels so the satellite/ingest alert policies reference same-project channels.
  • budgets.tf — email-only tripwires until the Cloud Billing budget system SA is Console-provisioned (Pub/Sub budget-notify + its publisher IAM deferred, documented inline).
  • enable_public_invoker gate (default false) — allUsers invoker is rejected by the org Domain-Restricted-Sharing policy; flip true after an org-admin adds a project-scoped allowAll exception on mr-serving.
  • .gcloudignore — trims the Cloud Build image-seed source upload.

Verified

  • tofu applyApply complete! 15 added, 2 changed, 0 destroyed, 0 errors (state 115 → 130).
  • All resources green except the two deliberately-deferred, externally-blocked items: public invoker (org-admin) and Pub/Sub budget-notify (Console-provisioned system SA).

Operator follow-ups (not code)

  1. Org-admin: project-scoped iam.allowedPolicyMemberDomains allowAll exception on mr-serving, then set enable_public_invoker=true + re-apply.
  2. Console-create one Pub/Sub budget once to provision billing-budget-alerts@system, then restore the Pub/Sub budget-notify + billing_budget_publisher.

minereda added 2 commits July 4, 2026 13:10
s3fs and gcsfs each hard-pin fsspec==<their-own-release> on differing
cadences, so the open '>=2024.0' floor made pip explode the
s3fs x gcsfs x fsspec exact-pin combinatorics and fail with
ResolutionImpossible -- the [satellite] extra (and every deploy image
that installs it) never built. Pin the triple exactly to the latest
co-released, py3.12-installable version (2026.6.0).
Fold in fixes the first live full apply surfaced:
- deletion_protection=false on the 6 Cloud Run service/job resources so
  TF can replace a tainted/failed initial revision.
- runtime_agent_iam.tf: grant the 3 Cloud Run service agents AR reader
  (cross-project image pull) + the weather-backfill runtime SA
  batch.agentReporter + logging.logWriter + AR reader (Batch VM needs
  these; the first pilot failed 'no VM has agent reporting' without them).
- monitoring.tf: r2_partition_age -> DISTRIBUTION + bucket_options;
  data_freshness aligner -> ALIGN_PERCENTILE_99; per-project email
  channels so satellite/ingest alerts use same-project channels.
- budgets.tf: email-only until the Cloud Billing budget system SA is
  Console-provisioned (Pub/Sub budget-notify + publisher IAM deferred).
- enable_public_invoker gate (default false): allUsers is rejected by the
  org Domain-Restricted-Sharing policy until an org-admin adds a
  project-scoped allowAll exception on mr-serving.
- .gcloudignore for the Cloud Build image-seed upload.
@helloiamvu helloiamvu requested a review from Tarabcak July 4, 2026 11:10
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

Parity ticket gate: PASSED

parity-ticket-check: PR does not touch parity-trigger surface; gate skipped.

See CROSS-SDK-SYNC.md §2 for the workflow.

@helloiamvu helloiamvu merged commit 3f7d079 into main Jul 4, 2026
21 checks passed
@helloiamvu helloiamvu deleted the phase28/deploy-hardening branch July 4, 2026 11:55
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