Skip to content

fix(release): detect in-proposal dependency major bumps#2200

Merged
iunanua merged 1 commit into
mainfrom
igor/versioning/proposal-fix-major-bumps-sha
Jul 7, 2026
Merged

fix(release): detect in-proposal dependency major bumps#2200
iunanua merged 1 commit into
mainfrom
igor/versioning/proposal-fix-major-bumps-sha

Conversation

@iunanua

@iunanua iunanua commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What

The release-proposal major-bump audit now runs against the proposal branch HEAD (the released ref plus this run's version bumps) instead of the pre-bump release ref, so a crate whose direct libdd-* dependency is bumped to a new major within the same proposal is correctly escalated to a major bump.

Why

In run 28800859299 (PR #2199), libdd-trace-protobuf was bumped 3.0.2 → 4.0.0 and step 1 rewrote libdd-trace-normalization's dependency requirement to 4.0.0 on the proposal branch — but libdd-trace-normalization only got a minor bump.

The audit worktree was checked out at release_head_sha (the released ref before step-1 bumps), where libdd-trace-normalization still required protobuf ^3 — same as its prev_tag — so no major diff was detected. Already-merged majors (e.g. libdd-common ^4 → ^5) worked because that change was already present at the released ref; only in-proposal majors were missed.

How

Check the audit worktree out at git rev-parse HEAD (proposal branch tip) rather than release_head_sha.

Reference In-proposal dep majors Already-merged majors Main-only changes (hotfix risk)
github.sha ❌ spurious
release_head_sha (pre-bump) ❌ ← this bug ✅ excluded
proposal HEAD ✅ excluded

Proposal HEAD includes cargo-release's dependency-requirement rewrites from the previous step (so in-proposal majors propagate) while still being built from the released ref (so main-only changes absent from a hotfix/older-ref release don't trigger spurious bumps — preserving the guarantee from the earlier review of #2195). Pending no-commit crates now also propagate in-proposal dependency majors, not just already-merged ones.

Testing

YAML validated. Behavior verified by tracing the failing run's logs against the new reference; the full workflow requires the CI runner + org tokens and was not run locally.

🤖 Generated with Claude Code

The major-bump audit ran against release_head_sha (the released ref before this
run's version bumps), so a crate whose direct dependency was bumped to a new
major within the same proposal was not escalated: e.g. libdd-trace-protobuf 3->4
left libdd-trace-normalization at a minor bump. Audit against the proposal
branch HEAD instead (the released ref plus the previous step's bumps), which
includes cargo-release's dependency-requirement rewrites so in-proposal majors
propagate. It is still built from the released ref, so main-only changes absent
from a hotfix/older-ref release do not trigger spurious bumps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 74.42% (-0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 91b4246 | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.88 MB 7.88 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 85.91 MB 85.91 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 97.11 MB 97.11 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.61 MB 10.61 MB 0% (0 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 25.46 MB 25.46 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 88.44 KB 88.44 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 184.61 MB 184.59 MB -0% (-16.00 KB) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 946.34 MB 946.34 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 8.32 MB 8.32 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 88.44 KB 88.44 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 24.62 MB 24.62 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 49.04 MB 49.04 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 22.06 MB 22.06 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 89.82 KB 89.82 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 188.62 MB 188.62 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 935.31 MB 935.31 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 6.43 MB 6.43 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 89.82 KB 89.82 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 26.43 MB 26.43 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 46.65 MB 46.65 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 76.59 MB 76.59 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.78 MB 8.78 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 92.11 MB 92.11 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.69 MB 10.69 MB 0% (0 B) 👌

@iunanua iunanua marked this pull request as ready for review July 7, 2026 07:30
@iunanua iunanua requested a review from a team as a code owner July 7, 2026 07:30
@iunanua iunanua merged commit 20cc8c0 into main Jul 7, 2026
60 checks passed
@iunanua iunanua deleted the igor/versioning/proposal-fix-major-bumps-sha branch July 7, 2026 07:30

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 91b42466a9

ℹ️ 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".

Comment on lines +656 to +658
PROPOSAL_SHA=$(git rev-parse HEAD)

git worktree add --detach "$MAJOR_BUMPS_WT" "$RELEASE_SHA"
git worktree add --detach "$MAJOR_BUMPS_WT" "$PROPOSAL_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 Re-run major-bump audit after forced major bumps

When the selected crates contain a dependency chain such as A -> B -> C, this one-time snapshot is taken before the loop below applies any forced major bumps. If A's in-proposal major makes B major in this step, cargo release version -p B rewrites C's B requirement as well (cargo-release documents that it updates dependent crates in the workspace when changing versions), but C was already audited against B's pre-major manifest and can remain pending or patch/minor with major_bumps: []. The audit needs to iterate to a fixed point, or otherwise re-check downstream crates after each forced major bump, so chained in-proposal majors do not leave downstream manifests changed without the corresponding major release.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants