From 1bf30670d4868dcaa2315d34b212fd7ab4aa84dd Mon Sep 17 00:00:00 2001 From: Jinwoo Hong <73622457+Jinwoo-H@users.noreply.github.com> Date: Mon, 7 Sep 2026 05:48:19 -0400 Subject: [PATCH] fix(relay-ops): let the rehome trust probe approve the asia-east2 cells (#19275) --- .../dev/scripts/probe-relay-rehome-trust.mjs | 4 +++- .../scripts/probe-relay-rehome-trust.test.mjs | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/cloud/dev/scripts/probe-relay-rehome-trust.mjs b/cloud/dev/scripts/probe-relay-rehome-trust.mjs index 9a7d505d4bb..2208131e58a 100644 --- a/cloud/dev/scripts/probe-relay-rehome-trust.mjs +++ b/cloud/dev/scripts/probe-relay-rehome-trust.mjs @@ -1,7 +1,9 @@ import { pathToFileURL } from 'node:url' import { fetchAdminOnceMore } from './relay-admin-transient-retry.mjs' -const PRODUCTION_CELL = /^production-gce-c(?:7|8|9|10|13|14|15|16|19|20|21|22|23|24|25|26)$/ +// Every general cell that carries the rehome identity: the sixteen US cells and the +// three asia-east2 cells that drain mis-homed hosts back the other way. +const PRODUCTION_CELL = /^production-gce-c(?:7|8|9|10|13|14|15|16|19|20|21|22|23|24|25|26|27|28|29)$/ const DIRECTOR_ORIGIN = 'https://relay.onorca.dev' export function parseRehomeTrustProbeArguments(argv, environment = process.env) { diff --git a/cloud/dev/scripts/probe-relay-rehome-trust.test.mjs b/cloud/dev/scripts/probe-relay-rehome-trust.test.mjs index 7d7b2cd95ac..789d33c40b6 100644 --- a/cloud/dev/scripts/probe-relay-rehome-trust.test.mjs +++ b/cloud/dev/scripts/probe-relay-rehome-trust.test.mjs @@ -111,3 +111,23 @@ test('fails when both trust-probe attempts return a transient 503', async () => ) assert.equal(calls, 2) }) + +test('approves the asia-east2 rehome sources and still rejects unlisted cells', () => { + for (const cellId of ['production-gce-c27', 'production-gce-c28', 'production-gce-c29']) { + const parsed = parseRehomeTrustProbeArguments( + argv.map((value) => (value === 'production-gce-c7' ? cellId : value)), + environment + ) + assert.equal(parsed.cellId, cellId) + } + for (const cellId of ['production-gce-c1', 'production-gce-c17', 'production-gce-c30']) { + assert.throws( + () => + parseRehomeTrustProbeArguments( + argv.map((value) => (value === 'production-gce-c7' ? cellId : value)), + environment + ), + /--cell-id is not approved/ + ) + } +})