Skip to content

Commit c666faf

Browse files
authored
[LANGPLAT-883] Add PHP parallel benchmarks to benchmarks pipeline (#3793)
* feat(benchmarks): add PHP parallel benchmarks to benchmarks pipeline (LANGPLAT-883) * feat(benchmarks): add PHP parallel benchmarks via apm-sdks-benchmarks include Switch from a trigger job to a GitLab CI include, pulling the PHP Laravel Realworld parallel benchmark jobs directly into this pipeline. Adds two new stages: php-laravel-realworld-parallel and php-laravel-realworld-parallel-slo. * feat(benchmarks): include all 3 PHP parallel benchmarks + pass tracer artifacts (LANGPLAT-883) Extends the included apm-sdks-benchmarks PHP jobs from just Laravel to the full triplet (Laravel + Symfony + WordPress), and wires the locally- built tracer into each by: - Adding a `needs:` declaration to the 3 main benchmark jobs that pulls the `package extension` and `datadog-setup.php` artifacts from the parent dd-trace-php pipeline. - Exporting DD_TRACER_ARTIFACT_DIR=$CI_PROJECT_DIR/packages so the apm-sdks-benchmarks side (fetch-tracing-libs.sh + each framework's start-app.sh) installs the in-PR tracer build via `datadog-setup.php --file dd-library-php-*.tar.gz` instead of pulling the latest GitHub release. Standalone runs of the apm-sdks-benchmarks pipeline are unaffected — when the env var is unset, the existing GitHub-release path runs. * ci(benchmarks): point PHP includes at the apm-sdks-benchmarks PR branch (LANGPLAT-883) Temporary pin until DataDog/apm-sdks-benchmarks#115 merges to main: until then the 3 PHP yamls only exist on the leiyks/LANGPLAT-883-php-competitor- benchmarks branch, and the parallel-benchmark-template version on main doesn't honor DD_TRACER_ARTIFACT_DIR yet. Pointing both the include refs and APM_SDKS_BENCHMARKS_BRANCH at the PR branch lets us validate the end-to-end artifact-passing flow now; flip both back to 'main' once apm-sdks-benchmarks#115 lands. * ci(benchmarks): move PHP stages into the generated package list (LANGPLAT-883) The benchmarks.yml file is included into the child pipeline alongside package-gen.yml (generated by generate-package.php). GitLab merges those two files, and when both declare a top-level "stages:" block the last one wins — our PR's stages: list was overriding package-gen's, breaking existing jobs like "package-oci: [linux, amd64]" that target the shared-pipeline stage. Fix: drop the stages: block from benchmarks.yml and append the 6 PHP stages to the single source of truth in generate-package.php. The child pipeline now exposes the union of every stage anyone declares. * ci(benchmarks): set APM_SDKS_BENCHMARKS_BRANCH at job level (LANGPLAT-883) The included .parallel-benchmark-template defines APM_SDKS_BENCHMARKS_BRANCH="main" in its own job-level variables block, which overrides top-level variables. Setting our PR-branch override at the top level was a no-op — the template's job-level default still won the merge, so the runtime clone targeted main (where tracing-libs/php/ fetch-tracing-libs.sh doesn't exist yet) and the job died with 'No such file or directory'. Move the override into each of the 3 PHP benchmark jobs' own variables blocks so it actually shadows the template default. Drop the top-level variable that wasn't doing anything. * ci: trigger fresh pipeline to pick up apm-sdks-benchmarks fix (feefde6) * ci: set APM_SDKS_BENCHMARKS_BRANCH globally so check-slo jobs see PR-branch threshold files * ci(benchmarks): override APM_SDKS_BENCHMARKS_BRANCH on check-slo-breaches jobs The .parallel-check-slo-breaches template (in apm-sdks-benchmarks) sets APM_SDKS_BENCHMARKS_BRANCH="main" at its OWN job level, beating our top-level override (same trap the benchmark jobs hit earlier). So the runtime clone of apm-sdks-benchmarks happened from main — where the PHP threshold yamls don't exist yet — and bp-runner exits with "FileNotFoundError: ...thresholds/php-laravel-realworld.yml". Add per-job APM_SDKS_BENCHMARKS_BRANCH overrides on the 3 *-check-slo-breaches jobs so they shadow the template default. Both overrides can be dropped once apm-sdks-benchmarks#115 merges to main. * ci: drop PR-branch refs/vars now that apm-sdks-benchmarks #115 has merged
1 parent bffd346 commit c666faf

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

.gitlab/benchmarks.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,39 @@ include:
33
file: 'images/templates/gitlab/check-slo-breaches.template.yml'
44
- project: 'DataDog/benchmarking-platform-tools'
55
file: 'images/templates/gitlab/notify-slo-breaches.template.yml'
6+
- project: 'DataDog/apm-reliability/apm-sdks-benchmarks'
7+
file: '.gitlab/ci-php-laravel-realworld-parallel.yml'
8+
- project: 'DataDog/apm-reliability/apm-sdks-benchmarks'
9+
file: '.gitlab/ci-php-symfony-realworld-parallel.yml'
10+
- project: 'DataDog/apm-reliability/apm-sdks-benchmarks'
11+
file: '.gitlab/ci-php-wordpress-parallel.yml'
12+
13+
linux-php-laravel-realworld-parallel:
14+
needs:
15+
- job: "package extension: [amd64, x86_64-unknown-linux-gnu]"
16+
artifacts: true
17+
- job: datadog-setup.php
18+
artifacts: true
19+
variables:
20+
DD_TRACER_ARTIFACT_DIR: "$CI_PROJECT_DIR/packages"
21+
22+
linux-php-symfony-realworld-parallel:
23+
needs:
24+
- job: "package extension: [amd64, x86_64-unknown-linux-gnu]"
25+
artifacts: true
26+
- job: datadog-setup.php
27+
artifacts: true
28+
variables:
29+
DD_TRACER_ARTIFACT_DIR: "$CI_PROJECT_DIR/packages"
30+
31+
linux-php-wordpress-parallel:
32+
needs:
33+
- job: "package extension: [amd64, x86_64-unknown-linux-gnu]"
34+
artifacts: true
35+
- job: datadog-setup.php
36+
artifacts: true
37+
variables:
38+
DD_TRACER_ARTIFACT_DIR: "$CI_PROJECT_DIR/packages"
639

740
variables:
841
BASE_CI_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:dd-trace-php-82-dev

.gitlab/generate-package.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@
8585
- notify
8686
- verify
8787
- shared-pipeline # OCI packaging
88+
- php-laravel-realworld-parallel
89+
- php-laravel-realworld-parallel-slo
90+
- php-symfony-realworld-parallel
91+
- php-symfony-realworld-parallel-slo
92+
- php-wordpress-parallel
93+
- php-wordpress-parallel-slo
8894
- pre-release
8995
- release
9096

0 commit comments

Comments
 (0)