Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion datadog_sync/model/downtime_schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,28 @@ class DowntimeSchedules(BaseResource):
# Additional DowntimeSchedules specific attributes

async def get_resources(self, client: CustomClient) -> List[Dict]:
# `include=created_by` populates `relationships.created_by.data.id` on
# each downtime. Downstream consumers (e.g. HAMR managed-sync's OBO
# grouper) key on that field to route the resource under its creator's
# identity; without the include, the LIST response omits `relationships`
# entirely and downstream code falls back to a service-account identity.
resp = await client.paginated_request(client.get)(
self.resource_config.base_path,
pagination_config=self.pagination_config,
params={"include": "created_by"},
)

return resp

async def import_resource(self, _id: Optional[str] = None, resource: Optional[Dict] = None) -> Tuple[str, Dict]:
if _id:
source_client = self.config.source_client
resource = await source_client.get(self.resource_config.base_path + f"/{_id}")
resource = (
await source_client.get(
self.resource_config.base_path + f"/{_id}",
params={"include": "created_by"},
)
)["data"]

if resource["attributes"].get("canceled"):
raise SkipResource(resource["id"], self.resource_type, "Downtime is canceled.")
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2026-05-19T10:21:20.061536-04:00
2026-07-14T16:27:42.752855-04:00
23,892 changes: 12,070 additions & 11,822 deletions tests/integration/cassettes/test_cli/TestCli.test_cleanup.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
2026-05-19T10:20:19.112442-04:00
2026-07-14T16:26:50.134799-04:00
15,738 changes: 10,402 additions & 5,336 deletions tests/integration/cassettes/test_cli/TestCli.test_import.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
2026-05-19T10:20:41.186353-04:00
2026-07-14T16:27:20.145500-04:00
20,500 changes: 9,440 additions & 11,060 deletions tests/integration/cassettes/test_cli/TestCli.test_import_without_verify_ddr_status.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
2026-05-19T10:21:07.234257-04:00
2026-07-14T16:27:35.358959-04:00
28,485 changes: 12,708 additions & 15,777 deletions tests/integration/cassettes/test_cli/TestCli.test_migrate.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
2026-05-19T10:20:54.627394-04:00
2026-07-14T16:27:27.444395-04:00
Loading
Loading