Skip to content

Support Synthetics Test Suites#478

Open
melkouri wants to merge 4 commits intomainfrom
malak.elkouri/SYNTH-24620/support-tests-suites
Open

Support Synthetics Test Suites#478
melkouri wants to merge 4 commits intomainfrom
malak.elkouri/SYNTH-24620/support-tests-suites

Conversation

@melkouri
Copy link
Contributor

@melkouri melkouri commented Mar 19, 2026

Requirements for Contributing to this repository

  • Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • The pull request must only fix one issue, or add one feature, at the time.
  • The pull request must update the test suite to demonstrate the changed functionality.
  • After you create the pull request, all status checks must be pass before a maintainer reviews your contribution. For more details, please see CONTRIBUTING.

What does this PR do?

This PR adds support for syncing Synthetics Test Suites between orgs, ensuring they are replicated with their test references correctly mapped to destination test IDs.

Description of the Change

A test suite is bundle of multiple tests, so we added tests as a dependency of Suites.
We first create tests then tests Suites that check the mapping between the source and destination tests.

Using the v2 Public API https://docs.datadoghq.com/api/latest/synthetics/#create-a-test-suite

  • List │ GET │ /api/v2/synthetics/suites/search
  • Get │ GET │ /api/v2/synthetics/suites/{public_id}
  • Create │ POST │ /api/v2/synthetics/suites
  • Update │ PUT │ /api/v2/synthetics/suites/{public_id}
  • Delete │ POST │ /api/v2/synthetics/suites/bulk-delete

Verification Process

image image
  • Updated test suites on R1, and changes are correctly propagated to R2
  • Deleting a suite from source and running with --cleanup True correctly deletes it from destination

Additional Notes

Release Notes

Review checklist (to be filled by reviewers)

  • Feature or bug fix MUST have appropriate tests (unit, integration, etc...)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have one changelog/ label attached. If applicable it should have the backward-incompatible label attached.
  • PR should not have do-not-merge/ label attached.
  • If Applicable, issue must have kind/ and severity/ labels attached at least.

@melkouri melkouri changed the base branch from malak.elkouri/SYNTH-25085/support-synthetics-file-replication-for-ddr to main March 20, 2026 13:21
@melkouri melkouri force-pushed the malak.elkouri/SYNTH-24620/support-tests-suites branch from fe46585 to a6557a9 Compare March 20, 2026 13:31
@melkouri melkouri marked this pull request as ready for review March 20, 2026 13:32
@melkouri melkouri requested a review from a team as a code owner March 20, 2026 13:32
Copy link
Collaborator

@heyronhay heyronhay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, one potential issue found.

Comment on lines +42 to +44
async def get_resources(self, client: CustomClient) -> List[Dict]:
resp = await client.get(self.search_path)
return resp["data"]["attributes"]["suites"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this return paginated results or is it just always just a single list of results?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that the endpoint https://api.datadoghq.com/api/v2/synthetics/suites/search could be used with pagination using start (The offset from which to start returning results) and count (The maximum number of results to return) (doc)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in a072397

@melkouri melkouri requested a review from heyronhay March 20, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants