From 3addd0f5d6ff3e9f847af4ec2c1eae627624d805 Mon Sep 17 00:00:00 2001 From: kptdobe Date: Thu, 5 Nov 2026 14:39:53 +0100 Subject: [PATCH] fix: preserve dashboard migration sites on deploy Omit production and stage migration vars so keep_vars retains the dashboard-managed values instead of overwriting them with empty lists. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 9 ++++++++- wrangler.toml | 9 ++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3e6e3c2a..956a38b9 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,14 @@ Browse to `http://localhost:8787/list` to ensure you see the expected buckets. 2. Cloudflare KV, which is used for org properties and session login info is locally stored when developing locally. You will need to make your own local KVs to test against. ### Helix 6 migration (dual write) -Sites listed in the `HLX6_MIGRATION_SITES` env variable (see `wrangler.toml`) are being migrated to Helix 6. Every successful modification on those sites (source create/update/delete, folder creation, copy, move, version creation) is also propagated, in the background, to the Helix 6 source bus at `AEM_API` (`https://api.aem.live`) using the caller's IMS token. Failures are logged but do not affect the DA response. +Sites listed in the `HLX6_MIGRATION_SITES` env variable are being migrated to Helix 6. Every successful modification on those sites (source create/update/delete, folder creation, copy, move, version creation) is also propagated, in the background, to the Helix 6 source bus at `AEM_API` (`https://api.aem.live`) using the caller's IMS token. Failures are logged but do not affect the DA response. + +For production and stage, manage `HLX6_MIGRATION_SITES` in the Cloudflare dashboard. +It is intentionally omitted from those environments in `wrangler.toml`: +`keep_vars = true` preserves dashboard values, but an explicit declaration would +override them on deployment. Local and test environments retain their own defaults. +If a previous deployment cleared the value, restore it in the dashboard; this +configuration change cannot recover the previous value. Entries are either: - `org/site`: the same org/site on Helix 6 diff --git a/wrangler.toml b/wrangler.toml index 7d3a8c48..f01d5f35 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -29,9 +29,7 @@ DA_CONTENT = "https://content.da.live" AEM_BUCKET_NAME = "aem-content" AEM_ADMIN_MEDIA_API = "https://admin.hlx.page/media" AEM_API = "https://api.aem.live" -# Sites being migrated to hlx6: modifications are propagated to the AEM_API source bus. -# Format: "org/site" (same org/site on hlx6) or "org/site -> org2/site2" (different hlx6 site) -HLX6_MIGRATION_SITES = [] +# HLX6_MIGRATION_SITES is dashboard-managed; keep_vars preserves it on deploy. # ---------------------------------------------------------------------- # stage environment @@ -59,9 +57,7 @@ DA_CONTENT = "https://stage-content.da.live" AEM_BUCKET_NAME = "aem-content-stage" AEM_ADMIN_MEDIA_API = "https://admin.hlx.page/media" AEM_API = "https://api.aem.live" -# Sites being migrated to hlx6: modifications are propagated to the AEM_API source bus. -# Format: "org/site" (same org/site on hlx6) or "org/site -> org2/site2" (different hlx6 site) -HLX6_MIGRATION_SITES = [] +# HLX6_MIGRATION_SITES is dashboard-managed; keep_vars preserves it on deploy. # ---------------------------------------------------------------------- # ci environment (using stage content) @@ -153,4 +149,3 @@ AEM_API = "https://api.aem.live" # Sites being migrated to hlx6: modifications are propagated to the AEM_API source bus. # Format: "org/site" (same org/site on hlx6) or "org/site -> org2/site2" (different hlx6 site) HLX6_MIGRATION_SITES = [] -