ci: add manual job to trigger dd-trace-py downstream pipeline#2131
ci: add manual job to trigger dd-trace-py downstream pipeline#2131faydef wants to merge 3 commits into
Conversation
Adds a `trigger_dd_trace_py` manual job that triggers the DataDog/apm-reliability/dd-trace-py pipeline on demand from the GitLab UI. The target branch is configurable via DD_TRACE_PY_BRANCH (defaults to fayssal/auto-update-libdatadog). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Always passes UPDATE_LIBDATADOG_VERSION="true" to the downstream dd-trace-py pipeline from the manual trigger_dd_trace_py job. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 538902fa15
ℹ️ 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".
| trigger_dd_trace_py: | ||
| variables: | ||
| LIBDATADOG_COMMIT_BRANCH: $CI_COMMIT_BRANCH | ||
| LIBDATADOG_COMMIT_SHA: $CI_COMMIT_SHA |
There was a problem hiding this comment.
Pass the SHA as the downstream target
When this manual bridge is launched from a feature or MR pipeline, this SHA is only passed as metadata: the referenced dd-trace-py branch's .gitlab/update-libdatadog.yml auto-runs solely on UPDATE_LIBDATADOG_VERSION and calls scripts/update-libdatadog.py --skip-python, while that script uses args.target_rev or resolve_latest_main_sha(). As a result the downstream job updates dd-trace-py to the latest libdatadog main commit, not the in-flight commit that triggered this job, so the benchmark can validate the wrong revision unless the downstream job is also wired to consume this SHA as its --target-rev.
Useful? React with 👍 / 👎.
The trigger_dd_trace_py job now runs on every push to main in addition to remaining manually triggerable on other branches. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
| UPDATE_LIBDATADOG_VERSION: "true" | ||
| rules: | ||
| # Run automatically on every push to the default branch. | ||
| - if: '$CI_COMMIT_BRANCH == "main"' |
There was a problem hiding this comment.
This doesn't actually run on every commit to the main branch, because the job on dd-trace-py is configured to skip every X commits, correct? If it is, maybe we should mention it here, to not scare people into thinking we'll be running the downstream pipeline and benchmarks of multiple tracers in the future on every commit to main 😰
There was a problem hiding this comment.
As is it would run on every commit but be no-op (on dd-trace-py's side) if less than x (default=5 but maybe I was being a bit too greedy here 😅 )
| - if: '$CI_COMMIT_BRANCH == "main"' | ||
| when: on_success | ||
| allow_failure: true | ||
| # Otherwise allow a maintainer to trigger it manually from the pipeline UI. |
There was a problem hiding this comment.
So this correspond to adding a label to the PR? Or what does "pipeline UI" refers to here?
There was a problem hiding this comment.
The UI here refers to Gitlab, the mechanism to trigger from a label will be added by Augusto later today!
What
Adds a manual GitLab CI job,
trigger_dd_trace_py, that triggers the downstreamDataDog/apm-reliability/dd-trace-pypipeline on demand from the GitLab pipeline UI..gitlab/dd-trace-py.ymldefining thetrigger_dd_trace_pyjob (when: manual,allow_failure: true,strategy: depend).DD_TRACE_PY_BRANCHpipeline variable (defaults tofayssal/auto-update-libdatadog), exposed as a UI element.UPDATE_LIBDATADOG_VERSION="true"downstream.Why
The aim is to have dd-trace-py auto-update the libdatadog version it uses (driven by
UPDATE_LIBDATADOG_VERSION) so we can run benchmarks against the in-flight libdatadog commit.Warning
This is experimental — the wiring and variables may change as we iterate.
Related
Matching dd-trace-py PR: DataDog/dd-trace-py#18660
🤖 Generated with Claude Code