fix(ci): handle proc-macro crates during semver check - #2410
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 696f06e2cc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| elif ! $has_lib && ! $has_proc_macro; then | ||
| log_verbose "Skipping cargo-public-api: $crate has no library or proc-macro target" |
There was a problem hiding this comment.
Treat removal of a library target as a major change
If an existing published crate removes or converts its library target so the current metadata contains only a binary or another unrecognized target kind, this condition skips both comparison tools. The function then falls through from none to patch, even though the crate's entire former public library API was removed; the release workflow consumes that result for cargo release version and can produce an undersized version bump. Target selection needs to account for the baseline target kinds rather than only the current checkout.
Useful? React with 👍 / 👎.
| if gh api "repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}" \ | ||
| --jq '.labels[].name' | grep -qx 'skip-pr-title-semver-check'; then |
There was a problem hiding this comment.
Distinguish API errors from an absent skip label
When gh api fails because of a transient GitHub error, rate limiting, or an authentication problem, this pipeline has a nonzero status but is inside an if, so set -e does not terminate the step and execution enters the else branch. The workflow then reports skip=false even for a labeled PR and runs the checks that the label is meant to bypass, potentially leaving automated release PRs red. Capture and validate the API response separately so only a successful request without the label selects this branch.
Useful? React with 👍 / 👎.
|
✅ All CI checks and tests passed. 🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: e21eaf6 | Docs | View more details | Give us feedback! |
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
|
BenchmarksComparisonBenchmark execution time: 2026-08-25 15:18:13 Comparing candidate commit e21eaf6 in PR branch Found 0 performance improvements and 3 performance regressions! Performance is the same for 149 metrics, 0 unstable metrics.
|
What does this PR do?