Skip to content

: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.

fix(data-imports): read fly.io regions from the capitalized Regions key (#110385)

Tom Owersc7b19f62f231
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/fly_io/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/fly_io/settings.py
index 1a0f70799c18..e92a41408e5d 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/fly_io/settings.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/fly_io/settings.py
@@ -84,7 +84,8 @@ FLY_IO_ENDPOINTS: dict[str, FlyIoEndpointConfig] = {
"regions": FlyIoEndpointConfig(
name="regions",
path="/platform/regions",
- response_data_path="regions",
+ # The platform regions endpoint capitalizes its list key, unlike every other Fly.io endpoint.
+ response_data_path="Regions",
primary_keys=["code"],
# Regions are a static lookup with no timestamps.
partition_key=None,
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/fly_io/tests/test_fly_io.py b/products/warehouse_sources/backend/temporal/data_imports/sources/fly_io/tests/test_fly_io.py
index aea1fde06a10..813584002ba7 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/fly_io/tests/test_fly_io.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/fly_io/tests/test_fly_io.py
@@ -101,7 +101,7 @@ class TestPaginationAndUrls:
def test_regions_is_a_platform_wide_lookup(self, MockClientSession) -> None:
# Regions are not org-scoped, so the org slug must not reach the request at all.
session = MockClientSession.return_value
- snaps = _wire(session, [_response({"nearest": "lhr", "regions": [{"code": "iad"}, {"code": "lhr"}]})])
+ snaps = _wire(session, [_response({"nearest": "lhr", "Regions": [{"code": "iad"}, {"code": "lhr"}]})])
rows = _rows(fly_io_source("tok", "regions", "acme", team_id=1, job_id="j"))