From 2a220ba1ff02fa263ed79221f1ce33f4fe0d3279 Mon Sep 17 00:00:00 2001 From: Charles de Beauchesne Date: Fri, 29 Sep 2023 17:02:42 +0200 Subject: [PATCH] chore(ci): rollback simplification made on #7053 (#7105) On system tests YAML file, #7053 tried to simplify the yaml file by moving an `if` from each step to jobs. The issue is that if system-tests are note needed, jobs never starts, and those jobs are mandatory. Rollbacking this change, and moving the new condition (the initial purpose was fixing the nightly jobs) on each step. ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) - [x] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. - [x] This PR doesn't touch any of that. --- .github/workflows/system-tests.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/system-tests.yml b/.github/workflows/system-tests.yml index 507a156434..2b0258b05f 100644 --- a/.github/workflows/system-tests.yml +++ b/.github/workflows/system-tests.yml @@ -52,80 +52,103 @@ jobs: python-version: '3.9' - name: Checkout system tests + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' uses: actions/checkout@v3 with: repository: 'DataDog/system-tests' - name: Checkout dd-trace-py + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' uses: actions/checkout@v3 with: path: 'binaries/dd-trace-py' fetch-depth: 0 - name: Build + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./build.sh - name: Run + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh - name: Run REMOTE_CONFIG_MOCKED_BACKEND_ASM_FEATURES + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh REMOTE_CONFIG_MOCKED_BACKEND_ASM_FEATURES - name: Run REMOTE_CONFIG_MOCKED_BACKEND_LIVE_DEBUGGING + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh REMOTE_CONFIG_MOCKED_BACKEND_LIVE_DEBUGGING - name: Run REMOTE_CONFIG_MOCKED_BACKEND_ASM_DD + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh REMOTE_CONFIG_MOCKED_BACKEND_ASM_DD - name: Run APPSEC_MISSING_RULES + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh APPSEC_MISSING_RULES - name: Run APPSEC_CUSTOM_RULES + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh APPSEC_CUSTOM_RULES - name: Run APPSEC_CORRUPTED_RULES + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh APPSEC_CORRUPTED_RULES - name: Run APPSEC_RULES_MONITORING_WITH_ERRORS + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh APPSEC_RULES_MONITORING_WITH_ERRORS - name: Run APPSEC_BLOCKING + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh APPSEC_BLOCKING - name: Run APPSEC_DISABLED + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh APPSEC_DISABLED - name: Run APPSEC_LOW_WAF_TIMEOUT + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh APPSEC_LOW_WAF_TIMEOUT - name: Run APPSEC_CUSTOM_OBFUSCATION + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh APPSEC_CUSTOM_OBFUSCATION - name: Run APPSEC_RATE_LIMITER + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh APPSEC_RATE_LIMITER - name: Run APPSEC_BLOCKING_FULL_DENYLIST + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh APPSEC_BLOCKING_FULL_DENYLIST - name: Run APPSEC_REQUEST_BLOCKING + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh APPSEC_REQUEST_BLOCKING - name: Run APPSEC_RUNTIME_ACTIVATION + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh APPSEC_RUNTIME_ACTIVATION - name: Run APPSEC_WAF_TELEMETRY + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh APPSEC_WAF_TELEMETRY - name: Run SAMPLING + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh SAMPLING # even on failures, we want to have artifact to be able to investigate # The compress step speed up a lot the upload artifact process - name: Compress artifact + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: tar -czvf artifact.tar.gz $(ls | grep logs) - name: Upload artifact uses: actions/upload-artifact@v3 + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' with: name: logs_${{ matrix.weblog-variant }} path: artifact.tar.gz @@ -133,31 +156,36 @@ jobs: parametric: runs-on: ubuntu-latest needs: needs-run - if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' env: TEST_LIBRARY: python PYTHON_DDTRACE_PACKAGE: git+https://github.com/Datadog/dd-trace-py.git@${{ github.sha }} steps: - name: Checkout system tests + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' uses: actions/checkout@v3 with: repository: 'DataDog/system-tests' - uses: actions/setup-python@v4 + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' with: python-version: '3.9' - name: Build + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./build.sh -i runner - name: Run + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: ./run.sh PARAMETRIC - name: Compress artifact + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' run: tar -czvf artifact.tar.gz $(ls | grep logs) - name: Upload artifact uses: actions/upload-artifact@v3 + if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule' with: name: logs_parametric path: artifact.tar.gz