|
| 1 | +name: Update FFE fixtures |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: "0 0 * * 0" # Every Sunday at midnight UTC |
| 6 | + workflow_dispatch: |
| 7 | + inputs: |
| 8 | + fixture_ref: |
| 9 | + description: Branch, tag, or commit from DataDog/ffe-system-test-data |
| 10 | + required: true |
| 11 | + default: main |
| 12 | + type: string |
| 13 | + |
| 14 | +concurrency: |
| 15 | + group: update-ffe-fixtures |
| 16 | + cancel-in-progress: false |
| 17 | + |
| 18 | +jobs: |
| 19 | + update_ffe_fixtures: |
| 20 | + runs-on: ubuntu-latest |
| 21 | + permissions: |
| 22 | + id-token: write |
| 23 | + |
| 24 | + steps: |
| 25 | + - name: Get dd-octo-sts token |
| 26 | + uses: DataDog/dd-octo-sts-action@96a25462dbcb10ebf0bfd6e2ccc917d2ab235b9a # v1.0.4 |
| 27 | + id: octo-sts |
| 28 | + with: |
| 29 | + scope: DataDog/dd-trace-dotnet |
| 30 | + policy: self.update_ffe_fixtures.create-pr |
| 31 | + |
| 32 | + - name: Checkout |
| 33 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 34 | + with: |
| 35 | + persist-credentials: false |
| 36 | + |
| 37 | + - name: Update fixture snapshot |
| 38 | + id: fixtures |
| 39 | + env: |
| 40 | + FFE_FIXTURE_REF: ${{ inputs.fixture_ref || 'main' }} |
| 41 | + run: ./tracer/build.sh UpdateFfeFixtures --FfeFixtureRef "$FFE_FIXTURE_REF" |
| 42 | + |
| 43 | + - name: Create Pull Request |
| 44 | + if: steps.fixtures.outputs.changed == 'true' |
| 45 | + uses: ./.github/actions/create-signed-pull-request |
| 46 | + with: |
| 47 | + token: ${{ steps.octo-sts.outputs.token }} |
| 48 | + branch: bot/ffe-fixtures-update |
| 49 | + commit-message: "test(ffe): update canonical fixtures" |
| 50 | + base: master |
| 51 | + title: "test(ffe): update canonical fixtures" |
| 52 | + draft: true |
| 53 | + labels: "area:tests,feature_flags" |
| 54 | + body: | |
| 55 | + ## Summary of changes |
| 56 | +
|
| 57 | + Updates the FFE tests to commit ${{ steps.fixtures.outputs.source_commit }}. |
| 58 | +
|
| 59 | + ## Reason for change |
| 60 | +
|
| 61 | + Keep dd-trace-dotnet synchronized with the canonical FFE evaluator fixtures. New fixtures may intentionally make unit tests fail when they expose evaluator bugs that must be addressed before this update is merged. |
| 62 | +
|
| 63 | + Canonical source: https://github.com/DataDog/ffe-system-test-data |
| 64 | + Source commit: ${{ steps.fixtures.outputs.source_commit }} |
| 65 | +
|
| 66 | + ## Implementation details |
| 67 | +
|
| 68 | + - Refresh the checked-in FFE fixture snapshot from the canonical repository. |
| 69 | + - Load ${{ steps.fixtures.outputs.fixture_count }} canonical JSON fixture cases. |
| 70 | +
|
| 71 | + ## Test coverage |
| 72 | +
|
| 73 | + The existing FFE unit tests run against the refreshed canonical fixtures. |
| 74 | +
|
| 75 | + ## Other details |
| 76 | +
|
| 77 | + Address evaluator failures in this update PR before merging it. |
0 commit comments