Skip to content

Commit f798a28

Browse files
ci: use prebuilt wheels in system-tests (#14447)
## Overview Optimizes the system tests CI workflow by building wheels once and reusing them across jobs instead of checking out and building from source multiple times. ## Motivation The current system tests workflow checks out the dd-trace-py repository and builds from source in each job, leading to: - Redundant build time across multiple jobs - Increased CI resource usage - Longer overall workflow execution time - Build dependencies required in system-tests This change centralizes wheel building in a dedicated job and distributes the pre-built wheels to consuming jobs, eliminating the need for build dependencies in system test runners. ## Changes - Created a new build-wheels job that calls the existing build_python_3.yml reusable workflow - Replaced "Checkout dd-trace-py" steps with "Download wheels to binaries directory" in both system-tests-build-weblog and parametric jobs - Added job dependencies to ensure wheels are built before being consumed ## Testing Strategy Only ci changes. Tested by running the system tests workflow to completion. ## Risks - Low risk: If wheel building fails, all dependent jobs will fail fast rather than building individually - Mitigation: The reusable workflow build_python_3.yml is already proven and used in other workflows ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - 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) --------- Co-authored-by: Charles de Beauchesne <charles.de.beauchesne@gmail.com>
1 parent 23ec7b4 commit f798a28

File tree

2 files changed

+23
-18
lines changed

2 files changed

+23
-18
lines changed

.github/workflows/system-tests.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@ on:
1111
- cron: '00 04 * * 2-6'
1212

1313
jobs:
14+
build-wheels:
15+
uses: ./.github/workflows/build_python_3.yml
16+
with:
17+
cibw_build: 'cp311-manylinux_x86_64 cp312-manylinux_x86_64 cp313-manylinux_x86_64'
18+
1419
system-tests-build-weblog:
20+
needs:
21+
- build-wheels
1522
runs-on: ubuntu-latest
1623
strategy:
1724
matrix:
@@ -40,17 +47,14 @@ jobs:
4047
persist-credentials: false
4148
repository: 'DataDog/system-tests'
4249
# Automatically managed, use scripts/update-system-tests-version to update
43-
ref: 'fef0bc7c0ba5f74babbb1ac3419291dbd4b65e5e'
50+
ref: 'd23bd68a15bca6d6c748edbeb1ed3fe3eed7ced1'
4451

45-
- name: Checkout dd-trace-py
46-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
52+
- name: Download wheels to binaries directory
53+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
4754
with:
48-
persist-credentials: false
49-
path: 'binaries/dd-trace-py'
50-
fetch-depth: 0
51-
# NB this ref is necessary to keep the checkout out of detached HEAD state, which setuptools_scm requires for
52-
# proper version guessing
53-
ref: ${{ github.event.pull_request.head.sha || github.sha }}
55+
pattern: wheels-*
56+
path: binaries/
57+
merge-multiple: true
5458

5559
- name: Build
5660
run: ./build.sh -i weblog
@@ -90,7 +94,7 @@ jobs:
9094
persist-credentials: false
9195
repository: 'DataDog/system-tests'
9296
# Automatically managed, use scripts/update-system-tests-version to update
93-
ref: 'fef0bc7c0ba5f74babbb1ac3419291dbd4b65e5e'
97+
ref: 'd23bd68a15bca6d6c748edbeb1ed3fe3eed7ced1'
9498

9599
- name: Build runner
96100
uses: ./.github/actions/install_runner
@@ -260,6 +264,8 @@ jobs:
260264

261265

262266
parametric:
267+
needs:
268+
- build-wheels
263269
runs-on: ubuntu-latest
264270
env:
265271
TEST_LIBRARY: python
@@ -273,14 +279,13 @@ jobs:
273279
persist-credentials: false
274280
repository: 'DataDog/system-tests'
275281
# Automatically managed, use scripts/update-system-tests-version to update
276-
ref: 'fef0bc7c0ba5f74babbb1ac3419291dbd4b65e5e'
277-
- name: Checkout dd-trace-py
278-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
282+
ref: 'd23bd68a15bca6d6c748edbeb1ed3fe3eed7ced1'
283+
- name: Download wheels to binaries directory
284+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
279285
with:
280-
persist-credentials: false
281-
path: 'binaries/dd-trace-py'
282-
fetch-depth: 0
283-
ref: ${{ github.event.pull_request.head.sha || github.sha }}
286+
pattern: wheels-*
287+
path: binaries/
288+
merge-multiple: true
284289

285290
- name: Build runner
286291
id: build_runner

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ variables:
1414
DD_VPA_TEMPLATE: "vpa-template-cpu-p70-10percent-2x-oom-min-cap"
1515
# CI_DEBUG_SERVICES: "true"
1616
# Automatically managed, use scripts/update-system-tests-version to update
17-
SYSTEM_TESTS_REF: "fef0bc7c0ba5f74babbb1ac3419291dbd4b65e5e"
17+
SYSTEM_TESTS_REF: "d23bd68a15bca6d6c748edbeb1ed3fe3eed7ced1"
1818

1919
default:
2020
interruptible: true

0 commit comments

Comments
 (0)