From bb151ab0c18ef84a31b9addbf20aa052d9cd1102 Mon Sep 17 00:00:00 2001 From: datadog-bits <263423550+datadog-bits@users.noreply.github.com> Date: Fri, 20 Nov 2026 14:35:53 +0000 Subject: [PATCH 1/2] Migrate datadog_ci action from dd-sts to Datadog WIF Replace DataDog/dd-sts-action (policy system-tests) with the datadog-workload-identity-federation-github-action intake action, and update docs and comments that referenced dd-sts. Co-Authored-By: Claude Opus 5.5 (1M context) Co-authored-by: cbeauchesne <11915659+cbeauchesne@users.noreply.github.com> --- .github/actions/datadog_ci/action.yml | 18 +++++++++--------- .github/workflows/system-tests.yml | 4 ++-- docs/CI/github-actions.md | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/actions/datadog_ci/action.yml b/.github/actions/datadog_ci/action.yml index 65374fcaf94..7db86a817fd 100644 --- a/.github/actions/datadog_ci/action.yml +++ b/.github/actions/datadog_ci/action.yml @@ -1,5 +1,5 @@ name: "Interact with datadog-ci CLI" -description: "Run all datadog-ci command for one job (allow to have only one API call per job on dd-sts)" +description: "Run all datadog-ci command for one job (allow to have only one credential exchange per job)" inputs: datadog_site: description: Which DataDog site shoud be used @@ -35,18 +35,18 @@ runs: path: repo - name: Get Datadog credentials - id: dd-sts + id: dd-wif if: github.event.pull_request.user.login != 'dependabot[bot]' continue-on-error: true - uses: DataDog/dd-sts-action@639d841c72f15e4e77747bd726ef8105ce971da2 # v1.0.5 + uses: DataDog/datadog-workload-identity-federation-github-action/intake@c9456387851248e0a5452f99085b16ad14fc3acb # v1.0.0 with: - policy: system-tests - retries: 16 + org_uuid: 8dee7c38-00cb-11ea-a77b-8b5a08d3b091 + site: ${{ inputs.datadog_site }} # https://docs.datadoghq.com/tests/setup/junit_xml/?tab=linux - name: Push results continue-on-error: true - if: github.event.pull_request.user.login != 'dependabot[bot]' && steps.dd-sts.outcome == 'success' && inputs.push_to_test_optimization == 'true' + if: github.event.pull_request.user.login != 'dependabot[bot]' && steps.dd-wif.outcome == 'success' && inputs.push_to_test_optimization == 'true' shell: bash run: | cd repo @@ -58,14 +58,14 @@ runs: --xpath-tag "test.codeowners=/testcase/properties/property[@name='test.codeowners']" env: DATADOG_SITE: ${{ inputs.datadog_site }} - DATADOG_API_KEY: ${{ steps.dd-sts.outputs.api_key }} + DATADOG_API_KEY: ${{ steps.dd-wif.outputs.api_key }} DD_TAGS: ${{ inputs.ci_environment != '' && format('test.configuration.ci_environment:{0}', inputs.ci_environment) || '' }} - name: Tag system-tests workflow continue-on-error: true - if: github.event.pull_request.user.login != 'dependabot[bot]' && steps.dd-sts.outcome == 'success' && inputs._is_official_system_tests_job == 'true' + if: github.event.pull_request.user.login != 'dependabot[bot]' && steps.dd-wif.outcome == 'success' && inputs._is_official_system_tests_job == 'true' shell: bash run: datadog-ci tag --level job --tags ci.framework.name:system-tests env: DATADOG_SITE: ${{ inputs.datadog_site }} - DATADOG_API_KEY: ${{ steps.dd-sts.outputs.api_key }} + DATADOG_API_KEY: ${{ steps.dd-wif.outputs.api_key }} diff --git a/.github/workflows/system-tests.yml b/.github/workflows/system-tests.yml index 7bb77ce0cce..18f0eae1e93 100644 --- a/.github/workflows/system-tests.yml +++ b/.github/workflows/system-tests.yml @@ -116,7 +116,7 @@ on: required: false type: string dd_sts_policy: - description: "dd-sts policy to use to get a Datadog API key for Test Optimization" + description: "Deprecated and unused, kept for backward compatibility" default: "" required: false type: string @@ -303,7 +303,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - id-token: write # needed by dd-sts to tag the job + id-token: write # needed by Datadog Workload Identity Federation to tag the job steps: - name: Checkout id: checkout diff --git a/docs/CI/github-actions.md b/docs/CI/github-actions.md index dc283260699..3a8336d0b2c 100644 --- a/docs/CI/github-actions.md +++ b/docs/CI/github-actions.md @@ -53,7 +53,7 @@ jobs: | `library` | Library to test | string | true | — | | `parametric_job_count` | How many jobs should be used to run PARAMETRIC scenario | number | false | 1 | | `_experimental_parametric_runs_on` | JSON-encoded runner label, label array, or runner group definition for PARAMETRIC | string | false | `{"group":"APM Larger Runners"}` | -| `push_to_test_optimization` | Push tests results to DataDog Test Optimization. Fetches credentials automatically via dd-sts | boolean | false | false | +| `push_to_test_optimization` | Push tests results to DataDog Test Optimization. Fetches credentials automatically via Datadog Workload Identity Federation | boolean | false | false | | `test_optimization_datadog_site` | DataDog site to use for test optimization | string | false | datadoghq.com | | `ref` | system-tests ref to run the tests on (can be any valid branch, tag or SHA in system-tests repo) | string | false | main | | `scenarios` | Comma-separated list scenarios to run | string | false | DEFAULT | @@ -61,7 +61,7 @@ jobs: | `skip_empty_scenarios` | Skip scenarios that contain only xfail or irrelevant tests | boolean | false | false | -Note: if `test_optimization_datadog_site` is set to `true`, then the calling repo must be referenced in [dd-sts](https://github.com/DataDog/dd-source/blob/main/domains/seceng/sit/apps/apis/dd-sts/config/policies/us1.ddbuild.io/system-tests.yaml). +Note: the calling repo must be allowed by the `system-tests` Datadog Workload Identity Federation [intake mappings](https://app.datadoghq.com/organization-settings/workload-identity-federation/intake-mappings). Otherwise, jobs are not tagged with `ci.framework.name:system-tests`, and results are not pushed to Test Optimization even if `push_to_test_optimization` is `true` (both are best effort, and never fail the job). Ask in [#apm-shared-testing](https://dd.enterprise.slack.com/archives/C025TJ4RZ8X) to be added. ### Parametric runners and parallelism @@ -90,7 +90,7 @@ The following permissions are always required: | Permission | Reason | | ---------------- | ----------------------------------------------------------- | | `contents: read` | Checkout the repository | -| `id-token: write` | Required by downstream workflows to fetch Datadog credentials via dd-sts. GitHub validates this upfront, so it must be granted even if test optimization is disabled | +| `id-token: write` | Required by downstream workflows to fetch Datadog credentials via Datadog Workload Identity Federation. GitHub validates this upfront, so it must be granted even if test optimization is disabled | ## Secrets From 50713b4bef7f3f8e4b2e16d7447dcdd9cd5e35c8 Mon Sep 17 00:00:00 2001 From: datadog-bits <263423550+datadog-bits@users.noreply.github.com> Date: Mon, 23 Nov 2026 13:34:33 +0000 Subject: [PATCH 2/2] Bump WIF intake action to v1.1.0 and enable exchange retries Co-Authored-By: Claude Opus 5.5 (1M context) Co-authored-by: cbeauchesne <11915659+cbeauchesne@users.noreply.github.com> --- .github/actions/datadog_ci/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/datadog_ci/action.yml b/.github/actions/datadog_ci/action.yml index 7db86a817fd..0dfeb077712 100644 --- a/.github/actions/datadog_ci/action.yml +++ b/.github/actions/datadog_ci/action.yml @@ -38,10 +38,11 @@ runs: id: dd-wif if: github.event.pull_request.user.login != 'dependabot[bot]' continue-on-error: true - uses: DataDog/datadog-workload-identity-federation-github-action/intake@c9456387851248e0a5452f99085b16ad14fc3acb # v1.0.0 + uses: DataDog/datadog-workload-identity-federation-github-action/intake@c99aa70b13689969f606ae732c7f9eaaeb44cd70 # v1.1.0 with: org_uuid: 8dee7c38-00cb-11ea-a77b-8b5a08d3b091 site: ${{ inputs.datadog_site }} + exchange_retries: 5 # https://docs.datadoghq.com/tests/setup/junit_xml/?tab=linux - name: Push results