Skip to content

chore(dcp): restore prod stateless deletion protection - #62

Closed
jm-rivera wants to merge 3 commits into
feat/dcp-v1.1.6from
chore/dcp-prod-deletion-protection
Closed

jm-rivera wants to merge 3 commits into
feat/dcp-v1.1.6from
chore/dcp-prod-deletion-protection

Conversation

@jm-rivera

Copy link
Copy Markdown
Contributor

Sets stateless_deletion_protection = true again in infra/dfo-prod/dcp/dfo.auto.tfvars. Prod turned it off so the Data Commons Platform 1.1.6 apply could delete the Cloud Run preprocessing job. Merge after prod runs 1.1.6 and that job is gone from state.

Testing: terraform fmt -check on the file. Not applied.

DCP v1.1.6 removes the serving service account's project-wide
secretmanager.secretAccessor role. search_api_gemini_key reads the
Gemini key through that role, so after the upgrade the service would
start without GEMINI_API_KEY and /api/search/* would return 502. A
per-secret grant on "${namespace}-gemini-api-key" keeps the access
under both module versions, and the key script now waits for it.

v1.1.6 also deletes the Cloud Run preprocessing job, which Terraform
cannot do while stateless_deletion_protection is on. Prod turns it off
here, on v1.1.5, so the v1.1.6 apply can complete.
infra/stacks/dcp/main.tf, variables.tf and outputs.tf are upstream's
1.1.6 root files with the module ref pinned to v1.1.6. dcp_version
defaults to 1.1.6, which picks the 1.1.6 ingestion images, the
ingestion-1.1.6 Dataflow template and the new rollback template.
Preprocessing runs as a Cloud Batch job with cpu and memory in milliCPU
and MiB, so batch.googleapis.com joins the enabled APIs. The
ingestion_prep_job_name output goes, since the Cloud Run preprocessing
job no longer exists.

The justfile pins CLI 1.1.6. seed-db is removed, init-db drops
--init-only, and init-db and migrate-db run under the caller's
application default credentials, which need roles/spanner.databaseAdmin
and roles/spanner.databaseUser. docs/development.md and the dfo-dev
dcp README state the same.
Prod runs Data Commons Platform 1.1.6 and its Cloud Run preprocessing
job is gone, so stateless_deletion_protection returns to true.
@jm-rivera

Copy link
Copy Markdown
Contributor Author

Prod keeps stateless_deletion_protection on; the 1.1.6 cutover in #61 removes the Cloud Run preprocessing job from state and deletes it with gcloud instead, so there is nothing to restore.

@jm-rivera jm-rivera closed this Oct 23, 2026
@jm-rivera
jm-rivera deleted the chore/dcp-prod-deletion-protection branch October 23, 2026 14:28
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