From 65467bb6f6d8f048a451a8d755a071bf3e404aa9 Mon Sep 17 00:00:00 2001 From: Xavier Lamorlette Date: Mon, 24 Aug 2026 15:04:32 +0200 Subject: [PATCH 1/4] CI: remove useless and harmful environment 'dev' --- .github/workflows/dev.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 9394c52b..35c1dea5 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -48,8 +48,6 @@ jobs: runs-on: ${{ matrix.runner }} container: image: datadog/docker-library:dd-trace-cpp-ci-23768e9-${{matrix.docker-arch}} - environment: - name: dev permissions: contents: read packages: read @@ -138,8 +136,6 @@ jobs: defaults: run: shell: powershell - environment: - name: dev permissions: contents: read packages: read @@ -180,8 +176,6 @@ jobs: runs-on: ubuntu-22.04-arm container: image: datadog/docker-library:dd-trace-cpp-ci-23768e9-arm64 - environment: - name: dev permissions: contents: read packages: read From ad017986fa9c65c3ba3540f8b5accef3d2df240a Mon Sep 17 00:00:00 2001 From: Xavier Lamorlette Date: Mon, 24 Aug 2026 15:43:27 +0200 Subject: [PATCH 2/4] Detect get credentials errors --- .github/workflows/dev.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 35c1dea5..c7488e01 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -68,7 +68,8 @@ jobs: uses: ./.github/actions/dd-sts-credentials id: dd-sts-credentials if: success() || failure() - continue-on-error: true + # This fails on PRs. + continue-on-error: ${{ github.event_name == 'pull_request' }} - name: Upload test report to Datadog if: (success() || failure()) && steps.dd-sts-credentials.outcome == 'success' env: @@ -162,7 +163,8 @@ jobs: uses: ./.github/actions/dd-sts-credentials id: dd-sts-credentials if: success() || failure() - continue-on-error: true + # This fails on PRs. + continue-on-error: ${{ github.event_name == 'pull_request' }} - name: Upload test report to Datadog if: (success() || failure()) && steps.dd-sts-credentials.outcome == 'success' env: @@ -187,7 +189,8 @@ jobs: uses: ./.github/actions/dd-sts-credentials id: dd-sts-credentials if: success() - continue-on-error: true + # This fails on PRs. + continue-on-error: ${{ github.event_name == 'pull_request' }} - name: Upload code coverage report to Datadog if: success() && steps.dd-sts-credentials.outcome == 'success' # See https://github.com/DataDog/coverage-upload-github-action/releases From 35a31ff5efd42580fc5ae433807d5f4002aad2fb Mon Sep 17 00:00:00 2001 From: Xavier Lamorlette Date: Mon, 24 Aug 2026 16:37:08 +0200 Subject: [PATCH 3/4] Disable 'Get Datadog credentials' on PRs --- .github/workflows/dev.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index c7488e01..bd7190a7 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -65,11 +65,9 @@ jobs: env: ASAN_OPTIONS: alloc_dealloc_mismatch=0 - name: Get Datadog credentials + if: (success() || failure()) && github.event_name != 'pull_request' uses: ./.github/actions/dd-sts-credentials id: dd-sts-credentials - if: success() || failure() - # This fails on PRs. - continue-on-error: ${{ github.event_name == 'pull_request' }} - name: Upload test report to Datadog if: (success() || failure()) && steps.dd-sts-credentials.outcome == 'success' env: @@ -160,11 +158,9 @@ jobs: & 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Common7\\Tools\\Launch-VsDevShell.ps1' -arch ${{ matrix.arch }} .\build\test\tests.exe -r junit -o report.xml - name: Get Datadog credentials + if: (success() || failure()) && github.event_name != 'pull_request' uses: ./.github/actions/dd-sts-credentials id: dd-sts-credentials - if: success() || failure() - # This fails on PRs. - continue-on-error: ${{ github.event_name == 'pull_request' }} - name: Upload test report to Datadog if: (success() || failure()) && steps.dd-sts-credentials.outcome == 'success' env: @@ -186,14 +182,11 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - run: bin/test --coverage --verbose - name: Get Datadog credentials + if: success() && github.event_name != 'pull_request' uses: ./.github/actions/dd-sts-credentials id: dd-sts-credentials - if: success() - # This fails on PRs. - continue-on-error: ${{ github.event_name == 'pull_request' }} - name: Upload code coverage report to Datadog if: success() && steps.dd-sts-credentials.outcome == 'success' - # See https://github.com/DataDog/coverage-upload-github-action/releases uses: DataDog/coverage-upload-github-action@d9548b1c3c4ab639d5d3ab29a1508af188975f77 # v1.0.5 with: api_key: ${{ steps.dd-sts-credentials.outputs.api_key }} From c037313685cc98462087834246abab4042c8881a Mon Sep 17 00:00:00 2001 From: Xavier Lamorlette Date: Mon, 24 Aug 2026 16:44:48 +0200 Subject: [PATCH 4/4] Simplify '(success() || failure())' --- .github/workflows/dev.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index bd7190a7..50115cec 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -65,11 +65,11 @@ jobs: env: ASAN_OPTIONS: alloc_dealloc_mismatch=0 - name: Get Datadog credentials - if: (success() || failure()) && github.event_name != 'pull_request' + if: ${{ !cancelled() && github.event_name != 'pull_request' }} uses: ./.github/actions/dd-sts-credentials id: dd-sts-credentials - name: Upload test report to Datadog - if: (success() || failure()) && steps.dd-sts-credentials.outcome == 'success' + if: ${{ !cancelled() && steps.dd-sts-credentials.outcome == 'success' }} env: DD_API_KEY: ${{ steps.dd-sts-credentials.outputs.api_key }} run: | @@ -158,11 +158,11 @@ jobs: & 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Common7\\Tools\\Launch-VsDevShell.ps1' -arch ${{ matrix.arch }} .\build\test\tests.exe -r junit -o report.xml - name: Get Datadog credentials - if: (success() || failure()) && github.event_name != 'pull_request' + if: ${{ !cancelled() && github.event_name != 'pull_request' }} uses: ./.github/actions/dd-sts-credentials id: dd-sts-credentials - name: Upload test report to Datadog - if: (success() || failure()) && steps.dd-sts-credentials.outcome == 'success' + if: ${{ !cancelled() && steps.dd-sts-credentials.outcome == 'success' }} env: DD_API_KEY: ${{ steps.dd-sts-credentials.outputs.api_key }} run: |