:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(toolbox): point the prod-us jumphost at the golden namespace (#98551)
Gustavo H. Strassburger0bca4564a2f3
diff --git a/tools/infra-scripts/clitools/test_toolbox.py b/tools/infra-scripts/clitools/test_toolbox.pyindex ed0c1b802330..5b979aeb0a79 100644--- a/tools/infra-scripts/clitools/test_toolbox.py+++ b/tools/infra-scripts/clitools/test_toolbox.py@@ -1029,6 +1029,7 @@ class TestToolbox(unittest.TestCase):"namespace_by_environment": {"dev": "flags-cache-jumphost","prod-eu": "flags-cache-jumphost",+ "prod-us": "flags-cache-jumphost",},"app_label": "flags-cache-jumphost","claimed_label_key": "flags-jumphost-claimed",@@ -1037,21 +1038,31 @@ class TestToolbox(unittest.TestCase):@patch.dict(os.environ, {}, clear=False)def test_resolve_namespace_uses_golden_namespace_for_migrated_environments(self):- """dev and prod-eu run the jumphost on the golden chart, in its own namespace."""+ """Every environment now runs the jumphost on the golden chart, in its own namespace."""os.environ.pop("KUBE_NAMESPACE", None)pool = toolbox_script.POOLS["flags-cache-jumphost"]- for context in ("dev-eks", "dev-admin", "prod-eu-eks", "prod-eu-admin", "prod-eu", "dev"):+ for context in (+ "dev-eks",+ "dev-admin",+ "prod-eu-eks",+ "prod-eu-admin",+ "prod-us-eks",+ "prod-us-admin",+ "prod-eu",+ "dev",+ "prod-us",+ ):with self.subTest(context=context):self.assertEqual(toolbox_script.resolve_namespace(pool, context), "flags-cache-jumphost")@patch.dict(os.environ, {}, clear=False)def test_resolve_namespace_keeps_unmigrated_environments_on_default(self):- """prod-us still runs the posthog-rust release, so it stays in `posthog`."""+ """A context that names no migrated environment falls back to the default namespace."""os.environ.pop("KUBE_NAMESPACE", None)pool = toolbox_script.POOLS["flags-cache-jumphost"]- for context in ("prod-us-eks", "prod-us-admin", None):+ for context in (None, "unknown-eks"):with self.subTest(context=context):self.assertEqual(toolbox_script.resolve_namespace(pool, context), "posthog")diff --git a/tools/infra-scripts/clitools/toolbox.py b/tools/infra-scripts/clitools/toolbox.pyindex 9498f6d2a024..313488c7719e 100755--- a/tools/infra-scripts/clitools/toolbox.py+++ b/tools/infra-scripts/clitools/toolbox.py@@ -50,6 +50,7 @@ POOLS = {"namespace_by_environment": {"dev": "flags-cache-jumphost","prod-eu": "flags-cache-jumphost",+ "prod-us": "flags-cache-jumphost",},"app_label": "flags-cache-jumphost","claimed_label_key": "flags-jumphost-claimed",