Skip to content

Commit 2b97a89

Browse files
committed
Merge branch 'main' into julio/rd-week-dynamic-pipeline
2 parents cb5bf5f + 0e8c2c6 commit 2b97a89

92 files changed

Lines changed: 4667 additions & 673 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
.gitlab-ci.yml @DataDog/apm-common-components-core
1515
.gitlab/benchmarks.yml @DataDog/apm-common-components-core
1616
.gitlab/fuzz.yml @DataDog/chaos-platform
17+
.gitmodules @DataDog/libdatadog
1718
benchmark/ @DataDog/apm-common-components-core
1819
bin_tests/ @DataDog/libdatadog-profiling
1920
build-common/ @DataDog/apm-common-components-core
@@ -44,6 +45,7 @@ libdd-data-pipeline*/ @DataDog/libdatadog-apm
4445
libdd-ddsketch*/ @DataDog/libdatadog-apm @DataDog/apm-common-components-core
4546
libdd-dogstatsd-client @DataDog/apm-common-components-core
4647
libdd-library-config*/ @DataDog/apm-sdk-capabilities
48+
libdd-libunwind*/ @DataDog/libdatadog-profiling
4749
libdd-log*/ @DataDog/apm-common-components-core
4850
libdd-profiling*/ @DataDog/libdatadog-profiling
4951
libdd-telemetry*/ @DataDog/apm-common-components-core

.github/actions/changed-crates/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ runs:
5858
echo "status=skipped" >> $GITHUB_OUTPUT
5959
exit 0
6060
fi
61-
6261
if RUST_LOG=debug ${{ github.action_path }}/../target/release/changed-crates $PR_BASE_REF; then
6362
echo "status=success" >> $GITHUB_OUTPUT
6463
else

.github/chainguard/self.read.members.sts.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ issuer: https://token.actions.githubusercontent.com
33
subject_pattern: "repo:DataDog/libdatadog.*"
44

55
claim_pattern:
6-
ref: "refs/heads/(main|release)"
7-
ref_protected: "true"
6+
ref: "refs/heads/(main|release|igor/.*|julio/.*)"
7+
# ref_protected: "true"
88

99
permissions:
1010
members: read

.github/chainguard/self.write.pr.sts.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ issuer: https://token.actions.githubusercontent.com
33
subject_pattern: "repo:DataDog/libdatadog.*"
44

55
claim_pattern:
6-
ref: "refs/heads/(main|release)"
7-
ref_protected: "true"
6+
ref: "refs/heads/(main|release|igor/.*|julio/.*)"
7+
# ref_protected: "true"
88
job_workflow_ref: DataDog/libdatadog/\.github/workflows/release-proposal-dispatch\.yml@.+
99

1010
permissions:
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3+
4+
<!-- Identity transform: copy everything as-is by default -->
5+
<xsl:template match="@*|node()">
6+
<xsl:copy>
7+
<xsl:apply-templates select="@*|node()"/>
8+
</xsl:copy>
9+
</xsl:template>
10+
11+
<!-- For testcase elements missing dd_tags[test.final_status] inside their properties block -->
12+
<xsl:template match="testcase[not(properties/property[@name='dd_tags[test.final_status]'])]">
13+
<xsl:copy>
14+
<xsl:apply-templates select="@*"/>
15+
<xsl:variable name="status">
16+
<xsl:choose>
17+
<xsl:when test="failure or error">fail</xsl:when>
18+
<xsl:when test="skipped">skip</xsl:when>
19+
<xsl:otherwise>pass</xsl:otherwise>
20+
</xsl:choose>
21+
</xsl:variable>
22+
<xsl:choose>
23+
<xsl:when test="properties">
24+
<!-- Inject into existing properties block, preserving child order -->
25+
<xsl:for-each select="node()">
26+
<xsl:choose>
27+
<xsl:when test="self::properties">
28+
<properties>
29+
<xsl:apply-templates select="@*|node()"/>
30+
<property name="dd_tags[test.final_status]" value="{$status}"/>
31+
</properties>
32+
</xsl:when>
33+
<xsl:otherwise>
34+
<xsl:apply-templates select="."/>
35+
</xsl:otherwise>
36+
</xsl:choose>
37+
</xsl:for-each>
38+
</xsl:when>
39+
<xsl:otherwise>
40+
<!-- No properties block: create one before other children -->
41+
<properties>
42+
<property name="dd_tags[test.final_status]" value="{$status}"/>
43+
</properties>
44+
<xsl:apply-templates select="node()"/>
45+
</xsl:otherwise>
46+
</xsl:choose>
47+
</xsl:copy>
48+
</xsl:template>
49+
50+
</xsl:stylesheet>

.github/workflows/coverage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
docker-images: true
2727
swap-storage: true
2828
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
29+
with:
30+
submodules: recursive
2931
- name: Install Rust
3032
run: rustup install nightly-2026-02-08 && rustup default nightly-2026-02-08
3133
- name: Install cargo-llvm-cov

.github/workflows/lint.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ jobs:
5757
steps:
5858
- name: Checkout sources
5959
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
60+
with:
61+
submodules: recursive
6062
- name: Run actionlint
6163
uses: devops-actions/actionlint@c6744a34774e4e1c1df0ff66bdb07ec7ee480ca0 # 0.1.9
6264
with:
@@ -71,6 +73,8 @@ jobs:
7173
steps:
7274
- name: Checkout sources
7375
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
76+
with:
77+
submodules: recursive
7478
- name: Install nightly-2026-02-08 toolchain and rustfmt
7579
run: rustup install nightly-2026-02-08 && rustup default nightly-2026-02-08 && rustup component add rustfmt
7680
- name: Cache [rust]
@@ -101,6 +105,8 @@ jobs:
101105
steps:
102106
- name: Checkout sources
103107
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
108+
with:
109+
submodules: recursive
104110
- name: Install ${{ matrix.rust_version }} toolchain and clippy
105111
run: rustup install ${{ matrix.rust_version }} && rustup default ${{ matrix.rust_version }} && rustup component add clippy
106112
- name: Cache [rust]

.github/workflows/miri.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ jobs:
5454
PROPTEST_CASES: 1
5555
steps:
5656
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
57+
with:
58+
submodules: recursive
5759
- name: Set up Rust
5860
run: |
5961
set -e

.github/workflows/pr-title-semver-check.yml

Lines changed: 29 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ permissions:
44
pull-requests: read
55
on:
66
pull_request:
7-
types: ['opened', 'edited', 'reopened', 'synchronize']
7+
types: ['opened', 'edited', 'reopened', 'synchronize', 'labeled', 'unlabeled']
88
branches-ignore:
99
- "v[0-9]+.[0-9]+.[0-9]+.[0-9]+"
1010
- release
@@ -15,6 +15,7 @@ env:
1515

1616
jobs:
1717
detect-changes:
18+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-pr-title-semver-check') }}
1819
runs-on: ubuntu-latest
1920
outputs:
2021
changed_crates: ${{ steps.detect.outputs.crates }}
@@ -78,7 +79,7 @@ jobs:
7879
7980
semver-check:
8081
needs: detect-changes
81-
if: needs.detect-changes.outputs.has_rust_changes == 'true'
82+
if: ${{ needs.detect-changes.outputs.has_rust_changes == 'true' && !contains(github.event.pull_request.labels.*.name, 'skip-pr-title-semver-check') }}
8283
runs-on: ubuntu-latest
8384
outputs:
8485
result_json: ${{ steps.semver.outputs.result_json }}
@@ -156,7 +157,7 @@ jobs:
156157
157158
validate:
158159
needs: [detect-changes, semver-check]
159-
if: needs.detect-changes.outputs.has_rust_changes == 'true'
160+
if: ${{ needs.detect-changes.outputs.has_rust_changes == 'true' && !contains(github.event.pull_request.labels.*.name, 'skip-pr-title-semver-check') }}
160161
runs-on: ubuntu-latest
161162
steps:
162163
- name: Validate PR title against semver changes
@@ -206,52 +207,30 @@ jobs:
206207
echo ""
207208
208209
VALIDATION_FAILED="false"
210+
FAILURE_REASONS=()
209211
210-
# Validation rules
212+
# Rule: ci/docs/style/test/build cannot change the public API
211213
case "$TYPE" in
212-
fix)
213-
if [[ "$SEMVER_LEVEL" == "major" ]] && [[ -z "$IS_BREAKING_CHANGE" ]]; then
214+
ci|docs|style|test|build)
215+
if [[ "$SEMVER_LEVEL" == "major" ]] || [[ "$SEMVER_LEVEL" == "minor" ]]; then
216+
VALIDATION_FAILED="true"
217+
FAILURE_REASONS+=("'$TYPE' cannot have major or minor API changes. Use a different PR type, or avoid public API changes.")
218+
fi
219+
;;
220+
feat|fix|refactor|chore|perf|revert)
221+
# These can be any semver level (subject to breaking change rules below)
222+
;;
223+
*)
214224
VALIDATION_FAILED="true"
215-
elif [[ "$SEMVER_LEVEL" == "minor" ]] || [[ "$SEMVER_LEVEL" == "none" ]]; then
216-
VALIDATION_FAILED="true"
217-
fi
218-
;;
219-
220-
feat)
221-
if [[ "$SEMVER_LEVEL" == "major" ]] && [[ -z "$IS_BREAKING_CHANGE" ]]; then
222-
VALIDATION_FAILED="true"
223-
elif [[ "$SEMVER_LEVEL" == "patch" ]] || [[ "$SEMVER_LEVEL" == "none" ]]; then
224-
VALIDATION_FAILED="true"
225-
fi
226-
;;
227-
228-
chore|ci|docs|style|test|build|perf)
229-
# Breaking change marker shouldn't be there.
230-
if [[ -n "$IS_BREAKING_CHANGE" ]]; then
231-
VALIDATION_FAILED="true"
232-
fi
233-
234-
# These should not change public API
235-
if [[ "$SEMVER_LEVEL" == "major" ]] || [[ "$SEMVER_LEVEL" == "minor" ]]; then
236-
VALIDATION_FAILED="true"
237-
fi
238-
;;
239-
240-
refactor)
241-
if [[ "$SEMVER_LEVEL" == "major" ]] && [[ -z "$IS_BREAKING_CHANGE" ]]; then
242-
VALIDATION_FAILED="true"
243-
fi
244-
;;
245-
246-
revert)
247-
# Revert commits are allowed to have any semver level
248-
;;
225+
FAILURE_REASONS+=("Unknown PR type: '$TYPE'. Valid types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert")
226+
;;
227+
esac
249228
250-
*)
251-
echo "$TYPE not handled";
229+
# Rule: major API changes must have a breaking change marker
230+
if [[ "$SEMVER_LEVEL" == "major" ]] && [[ -z "$IS_BREAKING_CHANGE" ]]; then
252231
VALIDATION_FAILED="true"
253-
;;
254-
esac
232+
FAILURE_REASONS+=("Major API changes require a breaking change marker. Add '!' to PR title (e.g. 'feat!:' or 'feat(scope)!:') or add 'BREAKING CHANGE:' footer in PR body.")
233+
fi
255234
256235
if [[ "$VALIDATION_FAILED" == "true" ]]; then
257236
echo ""
@@ -267,69 +246,21 @@ jobs:
267246
echo "--------------------------------------------"
268247
echo "WHAT WAS DETECTED:"
269248
echo "--------------------------------------------"
270-
# Show details for each crate
271249
echo "$SEMVER_RESULT_JSON" | jq -r '.crates[] | "Crate: \(.name)\n Level: \(.level)\n Reason: \(.reason)\n Details:\n\(.details | split("\n") | map(" " + .) | join("\n"))\n"'
272250
echo ""
273251
echo "--------------------------------------------"
274252
echo "WHY THIS FAILED:"
275253
echo "--------------------------------------------"
276-
case "$TYPE" in
277-
fix)
278-
if [[ "$SEMVER_LEVEL" == "major" ]] && [[ -z "$IS_BREAKING_CHANGE" ]]; then
279-
echo "'fix' with major changes requires breaking change marker."
280-
echo "Add '!' to PR title (fix!:) or add 'BREAKING CHANGE:' footer in PR body."
281-
elif [[ "$SEMVER_LEVEL" == "minor" ]]; then
282-
echo "'fix' cannot have minor-level changes (new public API)."
283-
echo "Use 'feat' type instead, or remove the new public API additions."
284-
elif [[ "$SEMVER_LEVEL" == "none" ]]; then
285-
echo "'fix' requires changes to published crates."
286-
echo "Use 'chore' or 'ci' for non-published changes."
287-
fi
288-
;;
289-
feat)
290-
if [[ "$SEMVER_LEVEL" == "major" ]] && [[ -z "$IS_BREAKING_CHANGE" ]]; then
291-
echo "'feat' with major changes requires breaking change marker."
292-
echo "Add '!' to PR title (feat!:) or add 'BREAKING CHANGE:' footer in PR body."
293-
elif [[ "$SEMVER_LEVEL" == "patch" ]]; then
294-
echo "'feat' requires minor-level changes (new public API)."
295-
echo "Use 'fix' for bug fixes, or ensure new items are marked 'pub'."
296-
elif [[ "$SEMVER_LEVEL" == "none" ]]; then
297-
echo "'feat' requires changes to published crates."
298-
echo "Use 'chore' for non-published changes."
299-
fi
300-
;;
301-
chore|ci|docs|style|test|build|perf)
302-
if [[ -n "$IS_BREAKING_CHANGE" ]]; then
303-
echo "'$TYPE' cannot have breaking change marker."
304-
echo "Remove '!' from title or use 'feat!', 'fix!', or 'refactor!' instead."
305-
elif [[ "$SEMVER_LEVEL" == "major" ]]; then
306-
echo "'$TYPE' cannot have major-level changes (breaking API)."
307-
echo "Use 'refactor!' or 'feat!' for intentional breaking changes."
308-
elif [[ "$SEMVER_LEVEL" == "minor" ]]; then
309-
echo "'$TYPE' cannot have minor-level changes (new public API)."
310-
echo "Use 'feat' for new features, or mark new items as pub(crate)."
311-
fi
312-
;;
313-
refactor)
314-
if [[ "$SEMVER_LEVEL" == "major" ]] && [[ -z "$IS_BREAKING_CHANGE" ]]; then
315-
echo "'refactor' with major changes requires breaking change marker."
316-
echo "Add '!' to PR title (refactor!:) or add 'BREAKING CHANGE:' footer in PR body."
317-
fi
318-
;;
319-
*)
320-
echo "Unknown PR type: '$TYPE'"
321-
echo "Valid types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert"
322-
;;
323-
esac
254+
for reason in "${FAILURE_REASONS[@]}"; do
255+
echo "- $reason"
256+
done
324257
echo ""
325258
echo "--------------------------------------------"
326259
echo "VALID COMBINATIONS:"
327260
echo "--------------------------------------------"
328-
echo " fix -> patch, or major (with '!')"
329-
echo " feat -> minor, or major (with '!')"
330-
echo " refactor -> patch, minor, or major (with '!')"
331-
echo " chore/ci/docs/style/test/build/perf -> patch or none only"
332-
echo " revert -> any level"
261+
echo " ci/docs/style/test/build -> patch or none only (no public API changes)"
262+
echo " all other types -> any level allowed"
263+
echo " major changes -> must have '!' or 'BREAKING CHANGE:' footer"
333264
echo ""
334265
exit 1
335266
else

0 commit comments

Comments
 (0)