From ad326feac3849d4224e81c21140ba7e74863b174 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 14 Aug 2026 22:15:25 +0000 Subject: [PATCH 1/4] chore: Track the latest v3 contract test release instead of a pinned alpha Co-Authored-By: jbailey@launchdarkly.com --- .github/actions/contract-tests/action.yml | 33 +++++++++-------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/.github/actions/contract-tests/action.yml b/.github/actions/contract-tests/action.yml index a529c0998..23cf82632 100644 --- a/.github/actions/contract-tests/action.yml +++ b/.github/actions/contract-tests/action.yml @@ -12,7 +12,7 @@ inputs: required: false default: '' run_fdv2_tests: - description: 'Whether to run contract tests from the v3.0.0-alpha.6 tag' + description: 'Whether to run contract tests from the latest v3 release' required: false default: 'false' @@ -43,7 +43,9 @@ runs: - name: Suppression Path shell: bash - run: echo "SUPPRESSION_FILE=$(dirname ./${{ inputs.service_project_file }})/test-supressions.txt" >> $GITHUB_ENV + run: | + echo "SUPPRESSION_FILE=$(dirname ./${{ inputs.service_project_file }})/test-supressions.txt" >> $GITHUB_ENV + echo "SUPPRESSION_FILE_FDV2=$(dirname ./${{ inputs.service_project_file }})/test-supressions-fdv2.txt" >> $GITHUB_ENV - name: Run Contract Tests uses: launchdarkly/gh-actions/actions/contract-tests@contract-tests-v1.0.2 @@ -52,31 +54,22 @@ runs: extra_params: '-status-timeout=360 -skip-from=${{ env.SUPPRESSION_FILE }}' token: ${{ inputs.token }} - - name: Setup Go - if: inputs.run_fdv2_tests == 'true' - uses: actions/setup-go@v5 - with: - go-version: '1.21' - - name: Launch Contract Tests FDv2 Flavor if: inputs.run_fdv2_tests == 'true' id: launch-contract-tests-fdv2 shell: bash run: dotnet ${{ inputs.service_dll_file }} > test-service.log 2>&1 & disown - - name: Clone and run contract tests from v3.0.0-alpha.6 tag + - name: Run Contract Tests FDv2 Flavor if: inputs.run_fdv2_tests == 'true' - shell: bash - run: | - mkdir -p /tmp/sdk-test-harness - git clone https://github.com/launchdarkly/sdk-test-harness.git /tmp/sdk-test-harness - cp $(dirname ./${{ inputs.service_project_file }})/test-supressions-fdv2.txt /tmp/sdk-test-harness/testharness-suppressions-fdv2.txt - cd /tmp/sdk-test-harness - git checkout v3.0.0-alpha.6 - go build -o test-harness . - ./test-harness -url http://localhost:8000 -debug -status-timeout=360 --skip-from=testharness-suppressions-fdv2.txt --stop-service-at-end - env: - GITHUB_TOKEN: ${{ inputs.token }} + uses: launchdarkly/gh-actions/actions/contract-tests@contract-tests-v1 + with: + test_service_port: 8000 + version: 'v3' + debug_logging: 'true' + enable_persistence_tests: 'false' + extra_params: '-status-timeout=360 -skip-from=${{ env.SUPPRESSION_FILE_FDV2 }}' + token: ${{ inputs.token }} - name: Upload test service log on failure if: failure() && inputs.run_fdv2_tests == 'true' From 0d1f562665d4cfa8a3bd7dc14e9dc5038062b4c4 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 14 Aug 2026 22:29:51 +0000 Subject: [PATCH 2/4] chore: Wait for the contract test service port before relaunching Co-Authored-By: jbailey@launchdarkly.com --- .github/actions/contract-tests/action.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/actions/contract-tests/action.yml b/.github/actions/contract-tests/action.yml index 23cf82632..c2ced54dc 100644 --- a/.github/actions/contract-tests/action.yml +++ b/.github/actions/contract-tests/action.yml @@ -58,7 +58,14 @@ runs: if: inputs.run_fdv2_tests == 'true' id: launch-contract-tests-fdv2 shell: bash - run: dotnet ${{ inputs.service_dll_file }} > test-service.log 2>&1 & disown + run: | + # The previous run shuts the service down; wait for the port to be released. + for _ in $(seq 1 30); do + curl -sf -o /dev/null http://localhost:8000 || break + sleep 1 + done + sleep 2 + dotnet ${{ inputs.service_dll_file }} > test-service.log 2>&1 & disown - name: Run Contract Tests FDv2 Flavor if: inputs.run_fdv2_tests == 'true' From 454a32ec4e78225be211a44ae9d61790827de794 Mon Sep 17 00:00:00 2001 From: jsonbailey Date: Wed, 30 Sep 2026 16:49:15 -0500 Subject: [PATCH 3/4] chore: Run both contract test flavors against one service The FDv1 run held the service open only until it finished, so the FDv2 run had to start a second one and wait for the port. Keeping the service up removes both the relaunch and the wait, and matches the other server SDKs. Also enables persistence tests, which the other server SDKs already run. --- .github/actions/contract-tests/action.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/actions/contract-tests/action.yml b/.github/actions/contract-tests/action.yml index c2ced54dc..96e082ae8 100644 --- a/.github/actions/contract-tests/action.yml +++ b/.github/actions/contract-tests/action.yml @@ -48,25 +48,15 @@ runs: echo "SUPPRESSION_FILE_FDV2=$(dirname ./${{ inputs.service_project_file }})/test-supressions-fdv2.txt" >> $GITHUB_ENV - name: Run Contract Tests - uses: launchdarkly/gh-actions/actions/contract-tests@contract-tests-v1.0.2 + uses: launchdarkly/gh-actions/actions/contract-tests@contract-tests-v1 with: test_service_port: 8000 + enable_persistence_tests: 'true' + # Leave the service up for the FDv2 run that follows. + stop_service: ${{ inputs.run_fdv2_tests == 'true' && 'false' || 'true' }} extra_params: '-status-timeout=360 -skip-from=${{ env.SUPPRESSION_FILE }}' token: ${{ inputs.token }} - - name: Launch Contract Tests FDv2 Flavor - if: inputs.run_fdv2_tests == 'true' - id: launch-contract-tests-fdv2 - shell: bash - run: | - # The previous run shuts the service down; wait for the port to be released. - for _ in $(seq 1 30); do - curl -sf -o /dev/null http://localhost:8000 || break - sleep 1 - done - sleep 2 - dotnet ${{ inputs.service_dll_file }} > test-service.log 2>&1 & disown - - name: Run Contract Tests FDv2 Flavor if: inputs.run_fdv2_tests == 'true' uses: launchdarkly/gh-actions/actions/contract-tests@contract-tests-v1 @@ -74,7 +64,7 @@ runs: test_service_port: 8000 version: 'v3' debug_logging: 'true' - enable_persistence_tests: 'false' + enable_persistence_tests: 'true' extra_params: '-status-timeout=360 -skip-from=${{ env.SUPPRESSION_FILE_FDV2 }}' token: ${{ inputs.token }} From d7a90e60c1ac7d7515d3e901d893a92eb49790d2 Mon Sep 17 00:00:00 2001 From: jsonbailey Date: Fri, 2 Oct 2026 08:41:05 -0500 Subject: [PATCH 4/4] chore: Keep persistence tests off for the contract test service The harness runs that suite only when the test service declares one of the persistent-data-store capabilities, which this service does not. Persistent store behavior is covered by PersistentDataStoreBaseTests in each store package instead. --- .github/actions/contract-tests/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/contract-tests/action.yml b/.github/actions/contract-tests/action.yml index 96e082ae8..17eaf4026 100644 --- a/.github/actions/contract-tests/action.yml +++ b/.github/actions/contract-tests/action.yml @@ -51,7 +51,7 @@ runs: uses: launchdarkly/gh-actions/actions/contract-tests@contract-tests-v1 with: test_service_port: 8000 - enable_persistence_tests: 'true' + enable_persistence_tests: 'false' # Leave the service up for the FDv2 run that follows. stop_service: ${{ inputs.run_fdv2_tests == 'true' && 'false' || 'true' }} extra_params: '-status-timeout=360 -skip-from=${{ env.SUPPRESSION_FILE }}' @@ -64,7 +64,7 @@ runs: test_service_port: 8000 version: 'v3' debug_logging: 'true' - enable_persistence_tests: 'true' + enable_persistence_tests: 'false' extra_params: '-status-timeout=360 -skip-from=${{ env.SUPPRESSION_FILE_FDV2 }}' token: ${{ inputs.token }}