Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ variables:
DOWNSTREAM_BRANCH:
value: "main"
description: "downstream jobs are triggered on this branch"
DD_TRACE_PY_BRANCH:
value: "fayssal/auto-update-libdatadog"
description: "the dd-trace-py branch the manual trigger_dd_trace_py job runs on"

include:
- local: .gitlab/benchmarks.yml
- local: .gitlab/fuzz.yml
- local: .gitlab/dd-trace-py.yml

trigger_internal_build:
variables:
Expand Down
23 changes: 23 additions & 0 deletions .gitlab/dd-trace-py.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Manual trigger for the dd-trace-py downstream pipeline.
# This lets a maintainer test the current libdatadog commit against dd-trace-py
# on demand from the GitLab pipeline UI.

trigger_dd_trace_py:
variables:
LIBDATADOG_COMMIT_BRANCH: $CI_COMMIT_BRANCH
LIBDATADOG_COMMIT_SHA: $CI_COMMIT_SHA

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

LIBDATADOG_SHORT_COMMIT_SHA: ${CI_COMMIT_SHORT_SHA}
LIBDATADOG_COMMIT_TAG: $CI_COMMIT_TAG
UPDATE_LIBDATADOG_VERSION: "true"
rules:
# Run automatically on every push to the default branch.
- if: '$CI_COMMIT_BRANCH == "main"'
when: on_success
allow_failure: true
# Otherwise allow a maintainer to trigger it manually from the pipeline UI.
- when: manual
allow_failure: true
trigger:
project: DataDog/apm-reliability/dd-trace-py
strategy: depend
branch: $DD_TRACE_PY_BRANCH
Loading