Skip to content

Commit a32d5ec

Browse files
ci: use pipe mode when calling riot run in run-test-suite [backport 2.0] (#6997)
Backport b406ab1 from #6941 to 2.0. This switches the output to use pipe mode (which, among other things, prints every line without wrapping) as a safety mechanism to prevents reoccurrences of secrets leaking into logs because they were unexpected wrapped by `riot`'s pretty output. `riot -v run` is the only place where we show environment variables. This also adds `scripts/run-test-suite` to the harness suite spec so that all tests get re-run if the script changes (since that is likely the desired scenario). # Testing ## Before ![image](https://github.com/DataDog/dd-trace-py/assets/136473744/5a2d49a2-656b-4ce1-b1dc-1fc999467136) ## After ![image](https://github.com/DataDog/dd-trace-py/assets/136473744/74e00f1f-192d-4e7a-99cd-cbfdb5203b01) Note that this is an immediate band-aid, not a long-term strategy. ## 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: Romain Komorn <[email protected]>
1 parent 7aee559 commit a32d5ec

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

scripts/run-test-suite

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if ! [[ -v CIRCLECI && $CIRCLE_BRANCH =~ [0-9]\.x ]]; then
2727
fi
2828

2929
for hash in $RIOT_HASHES; do
30-
if ! $DDTEST_CMD riot -v run --exitfirst --pass-env -s $hash $DDTRACE_FLAG $COVERAGE_FLAG; then
30+
if ! $DDTEST_CMD riot -P -v run --exitfirst --pass-env -s $hash $DDTRACE_FLAG $COVERAGE_FLAG; then
3131
if [[ -v CIRCLECI ]]; then
3232
circleci step halt
3333
fi

tests/.suitespec.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"$harness": [
99
"riotfile.py",
1010
"scripts/ddtest",
11+
"scripts/run-test-suite",
1112
"hatch.toml",
1213
"tests/conftest.py",
1314
"tests/__init__.py",

0 commit comments

Comments
 (0)