Skip to content

Commit b959b59

Browse files
chore(ci): fix scheduled system tests (backport #7105 to 2.0) (#7111)
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. - [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. (cherry picked from commit b96f391) ## Checklist - [x] Change(s) are motivated and described in the PR description. - [x] Testing strategy is described if automated tests are not included in the PR. - [x] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## 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. Co-authored-by: Charles de Beauchesne <[email protected]>
1 parent c408eaa commit b959b59

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

.github/workflows/system-tests.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -51,103 +51,103 @@ jobs:
5151
python-version: '3.9'
5252

5353
- name: Checkout system tests
54-
if: needs.needs-run.outputs.outcome == 'success'
54+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
5555
uses: actions/checkout@v3
5656
with:
5757
repository: 'DataDog/system-tests'
5858

5959
- name: Checkout dd-trace-py
60-
if: needs.needs-run.outputs.outcome == 'success'
60+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
6161
uses: actions/checkout@v3
6262
with:
6363
path: 'binaries/dd-trace-py'
6464
fetch-depth: 0
6565

6666
- name: Build
67-
if: needs.needs-run.outputs.outcome == 'success'
67+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
6868
run: ./build.sh
6969

7070
- name: Run
71-
if: needs.needs-run.outputs.outcome == 'success'
71+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
7272
run: ./run.sh
7373

7474
- name: Run REMOTE_CONFIG_MOCKED_BACKEND_ASM_FEATURES
75-
if: needs.needs-run.outputs.outcome == 'success'
75+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
7676
run: ./run.sh REMOTE_CONFIG_MOCKED_BACKEND_ASM_FEATURES
7777

7878
- name: Run REMOTE_CONFIG_MOCKED_BACKEND_LIVE_DEBUGGING
79-
if: needs.needs-run.outputs.outcome == 'success'
79+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
8080
run: ./run.sh REMOTE_CONFIG_MOCKED_BACKEND_LIVE_DEBUGGING
8181

8282
- name: Run REMOTE_CONFIG_MOCKED_BACKEND_ASM_DD
83-
if: needs.needs-run.outputs.outcome == 'success'
83+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
8484
run: ./run.sh REMOTE_CONFIG_MOCKED_BACKEND_ASM_DD
8585

8686
- name: Run APPSEC_MISSING_RULES
87-
if: needs.needs-run.outputs.outcome == 'success'
87+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
8888
run: ./run.sh APPSEC_MISSING_RULES
8989

9090
- name: Run APPSEC_CUSTOM_RULES
91-
if: needs.needs-run.outputs.outcome == 'success'
91+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
9292
run: ./run.sh APPSEC_CUSTOM_RULES
9393

9494
- name: Run APPSEC_CORRUPTED_RULES
95-
if: needs.needs-run.outputs.outcome == 'success'
95+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
9696
run: ./run.sh APPSEC_CORRUPTED_RULES
9797

9898
- name: Run APPSEC_RULES_MONITORING_WITH_ERRORS
99-
if: needs.needs-run.outputs.outcome == 'success'
99+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
100100
run: ./run.sh APPSEC_RULES_MONITORING_WITH_ERRORS
101101

102102
- name: Run APPSEC_BLOCKING
103-
if: needs.needs-run.outputs.outcome == 'success'
103+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
104104
run: ./run.sh APPSEC_BLOCKING
105105

106106
- name: Run APPSEC_DISABLED
107-
if: needs.needs-run.outputs.outcome == 'success'
107+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
108108
run: ./run.sh APPSEC_DISABLED
109109

110110
- name: Run APPSEC_LOW_WAF_TIMEOUT
111-
if: needs.needs-run.outputs.outcome == 'success'
111+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
112112
run: ./run.sh APPSEC_LOW_WAF_TIMEOUT
113113

114114
- name: Run APPSEC_CUSTOM_OBFUSCATION
115-
if: needs.needs-run.outputs.outcome == 'success'
115+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
116116
run: ./run.sh APPSEC_CUSTOM_OBFUSCATION
117117

118118
- name: Run APPSEC_RATE_LIMITER
119-
if: needs.needs-run.outputs.outcome == 'success'
119+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
120120
run: ./run.sh APPSEC_RATE_LIMITER
121121

122122
- name: Run APPSEC_BLOCKING_FULL_DENYLIST
123-
if: needs.needs-run.outputs.outcome == 'success'
123+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
124124
run: ./run.sh APPSEC_BLOCKING_FULL_DENYLIST
125125

126126
- name: Run APPSEC_REQUEST_BLOCKING
127-
if: needs.needs-run.outputs.outcome == 'success'
127+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
128128
run: ./run.sh APPSEC_REQUEST_BLOCKING
129129

130130
- name: Run APPSEC_RUNTIME_ACTIVATION
131-
if: needs.needs-run.outputs.outcome == 'success'
131+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
132132
run: ./run.sh APPSEC_RUNTIME_ACTIVATION
133133

134134
- name: Run APPSEC_WAF_TELEMETRY
135-
if: needs.needs-run.outputs.outcome == 'success'
135+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
136136
run: ./run.sh APPSEC_WAF_TELEMETRY
137137

138138
- name: Run SAMPLING
139-
if: needs.needs-run.outputs.outcome == 'success'
139+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
140140
run: ./run.sh SAMPLING
141141

142142
# even on failures, we want to have artifact to be able to investigate
143143
# The compress step speed up a lot the upload artifact process
144144
- name: Compress artifact
145-
if: needs.needs-run.outputs.outcome == 'success'
145+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
146146
run: tar -czvf artifact.tar.gz $(ls | grep logs)
147147

148148
- name: Upload artifact
149149
uses: actions/upload-artifact@v3
150-
if: needs.needs-run.outputs.outcome == 'success'
150+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
151151
with:
152152
name: logs_${{ matrix.weblog-variant }}
153153
path: artifact.tar.gz
@@ -160,31 +160,31 @@ jobs:
160160
PYTHON_DDTRACE_PACKAGE: git+https://github.com/Datadog/dd-trace-py.git@${{ github.sha }}
161161
steps:
162162
- name: Checkout system tests
163-
if: needs.needs-run.outputs.outcome == 'success'
163+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
164164
uses: actions/checkout@v3
165165
with:
166166
repository: 'DataDog/system-tests'
167167

168168
- uses: actions/setup-python@v4
169-
if: needs.needs-run.outputs.outcome == 'success'
169+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
170170
with:
171171
python-version: '3.9'
172172

173173
- name: Build
174-
if: needs.needs-run.outputs.outcome == 'success'
174+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
175175
run: ./build.sh -i runner
176176

177177
- name: Run
178-
if: needs.needs-run.outputs.outcome == 'success'
178+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
179179
run: ./run.sh PARAMETRIC
180180

181181
- name: Compress artifact
182-
if: needs.needs-run.outputs.outcome == 'success'
182+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
183183
run: tar -czvf artifact.tar.gz $(ls | grep logs)
184184

185185
- name: Upload artifact
186186
uses: actions/upload-artifact@v3
187-
if: needs.needs-run.outputs.outcome == 'success'
187+
if: needs.needs-run.outputs.outcome == 'success' || github.event_name == 'schedule'
188188
with:
189189
name: logs_parametric
190190
path: artifact.tar.gz

0 commit comments

Comments
 (0)