ci: upload system-tests results to Test Optimization and add tracer-release nightly#3660
ci: upload system-tests results to Test Optimization and add tracer-release nightly#3660
Conversation
Run the official system-tests reusable workflow daily at 4 AM GMT using dev mode against the latest commit on the default branch. Co-authored-by: Cursor <cursoragent@cursor.com>
|
✨ Fix all issues with BitsAI or with Cursor
|
Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3660 +/- ##
=======================================
Coverage 62.21% 62.21%
=======================================
Files 141 141
Lines 13387 13387
Branches 1753 1753
=======================================
Hits 8329 8329
Misses 4260 4260
Partials 798 798 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Add after_script to .system_tests base job to upload JUnit results to Datadog Test Optimization using the existing upload script - Add tracer-release scenario group to configure_system_tests on schedule and master runs - Remove separate GitHub Actions nightly workflow Made-with: Cursor
The silent wrapper's grep returns exit code 1 when no summary lines are found, causing the after_script to fail. Use the non-silent version with || true to prevent after_script failures. Made-with: Cursor
Replace the generic upload-junit-to-datadog.sh with a custom after_script that: - Uses --service system-tests (not dd-trace-php-tests) - References logs directly from system-tests/logs*/ - Uses the datadog-ci standalone binary (no npm needed) - Uses Python for JSON/zip (guaranteed available in the image) - Provides explicit error messages instead of silent exit 0 Made-with: Cursor
Benchmarks [ tracer ]Benchmark execution time: 2026-03-12 18:55:43 Comparing candidate commit 85c13ba in PR branch Found 2 performance improvements and 0 performance regressions! Performance is the same for 190 metrics, 2 unstable metrics. scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache
scenario:TraceSerializationBench/benchSerializeTrace-opcache
|
9a812c9 to
578e0b6
Compare
|
For this to work two things need to be done: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a65519dc59
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b44c4ab3eb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
.gitlab/generate-package.php
Outdated
|
|
||
| # Fetch API key from Vault | ||
| echo "Fetching API key from Vault..." | ||
| VAULT_JSON=$(/tmp/vault kv get --format=json "kv/k8s/gitlab-runner/dd-trace-php/datadoghq-api-key" 2>&1) |
There was a problem hiding this comment.
Keep Vault stderr out of parsed JSON
Capturing Vault output with 2>&1 mixes diagnostics into the JSON payload, so any warning emitted on stderr (for example token/lease notices) makes the subsequent JSON parse fail and leaves DATADOG_API_KEY unset. In that case the JUnit upload step runs without valid credentials and results are dropped, even though the secret fetch itself may have succeeded; read only stdout for JSON and handle stderr separately.
Useful? React with 👍 / 👎.
.gitlab/generate-package.php
Outdated
| after_script: | ||
| - | | ||
| set +e | ||
| echo "=== Uploading system-tests JUnit results to Test Optimization ===" | ||
|
|
||
| # Check that there are JUnit files to upload | ||
| ls system-tests/logs*/reportJunit.xml >/dev/null 2>&1 | ||
| if [ $? -ne 0 ]; then echo "No JUnit XML files found, skipping upload"; exit 0; fi | ||
|
|
||
| # Download datadog-ci standalone binary | ||
| echo "Downloading datadog-ci..." | ||
| curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" -o /tmp/datadog-ci | ||
| if [ $? -ne 0 ]; then echo "Failed to download datadog-ci"; exit 0; fi | ||
| chmod +x /tmp/datadog-ci | ||
|
|
||
| # Download and extract Vault CLI | ||
| echo "Downloading Vault..." | ||
| VAULT_VERSION="1.20.0" | ||
| curl -L --fail "https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip" -o /tmp/vault.zip | ||
| if [ $? -ne 0 ]; then echo "Failed to download Vault"; exit 0; fi | ||
| python3 -c "import zipfile; zipfile.ZipFile('/tmp/vault.zip').extractall('/tmp/')" | ||
| chmod +x /tmp/vault | ||
|
|
||
| # Fetch API key from Vault | ||
| echo "Fetching API key from Vault..." | ||
| VAULT_JSON=$(/tmp/vault kv get --format=json "kv/k8s/gitlab-runner/dd-trace-php/datadoghq-api-key" 2>&1) | ||
| if [ $? -ne 0 ]; then echo "Failed to fetch API key from Vault: $VAULT_JSON"; exit 0; fi | ||
| export DATADOG_API_KEY=$(echo "$VAULT_JSON" | python3 -c "import sys,json; print(json.loads(sys.stdin.read())['data']['data']['key'])") | ||
| export DATADOG_SITE="datadoghq.com" | ||
|
|
||
| # Upload JUnit results | ||
| echo "Uploading JUnit results..." | ||
| /tmp/datadog-ci junit upload \ | ||
| system-tests/logs*/reportJunit.xml \ | ||
| --service system-tests \ | ||
| --env ci \ | ||
| --verbose \ | ||
| --xpath-tag "test.codeowners=/testcase/properties/property[@name='test.codeowners']" | ||
| echo "=== Upload complete ===" |
There was a problem hiding this comment.
We have a script that basically do all of this in .gitlab/upload-junit-to-datadog.sh
There was a problem hiding this comment.
You may need to tweak it a bit to add the xpath-tag thing tho
Description
Two changes to the system-tests CI integration:
Upload all system-tests results to Test Optimization — adds an
after_scriptto the.system_testsbase job that copies JUnit XML files and uploads them via the existingsilent-upload-junit-to-datadog.shscript.Add
tracer-releasenightly — create a new system-tests workflow that uses the official system-tests reusable workflow to run the tracer-release scenario group on master.This is meant to replace the system-tests-dashboard nightly.
Reviewer checklist