Skip to content

Commit 3f06f1d

Browse files
authored
Merge branch 'main' into oscarld/obfuscation-sql-parity-cleaned
2 parents 42b64b6 + d1eb663 commit 3f06f1d

249 files changed

Lines changed: 8357 additions & 16361 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: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ local-linux.Dockerfile @DataDog/libdatadog
6060
NOTICE @DataDog/libdatadog
6161
README.md @DataDog/libdatadog
6262
repository.datadog.yml @DataDog/apm-common-components-core
63-
ruby/ @DataDog/ruby-guild
6463
rustfmt.toml @DataDog/libdatadog-core
6564
scripts/check_cargo_metadata.sh @DataDog/libdatadog-core
6665
scripts/commits-since-release.sh @DataDog/libdatadog-core

.github/actions/clippy-annotation-reporter/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy-annotation-reporter"
3-
rust-version = "1.78.0"
3+
rust-version = "1.84.1"
44
edition = "2021"
55
version = "0.1.0"
66
description = "GitHub Action for reporting clippy annotation usage in PRs"

.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:

.github/workflows/coverage.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,11 @@ jobs:
5050
token: ${{ secrets.CODECOV_TOKEN }}
5151
files: lcov.info
5252
fail_ci_if_error: true
53+
- name: Upload coverage to Datadog
54+
if: always()
55+
continue-on-error: true
56+
uses: DataDog/coverage-upload-github-action@d2cf302a39c05e0ad22063360a2bf6ce0cc4906c # v1
57+
with:
58+
api_key: ${{ secrets.DATADOG_API_KEY }}
59+
files: lcov.info
60+
format: lcov

.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

.github/workflows/publish-ruby.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)