Repository navigation
Build release versions only in GitLab tag pipelines - #13068
Conversation
In GitLab, use the version of the tag the commit is checked out on only when CI_COMMIT_TAG names that tag. Other pipelines on the tagged commit, like the master one, build the next snapshot version instead. A master pipeline that started after the v1.68.0 tag was pushed computed 1.68.0 in deploy_to_maven_central and created a second Maven Central deployment. APMLP-1743 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
More details
The matching-tag check prevents GitLab branch pipelines on tagged commits from producing release versions while preserving behavior outside GitLab. The completed static review found no actionable regression, and no human PR discussion was present.
🤖 Bits Code Review · Commit 4ac5148
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
Address review: replace the lambda passed to toTracerVersion with an isReleaseTag(tag) function and keep its original signature. APMLP-1743 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
What Does This Do
Makes
TracerVersionPluginbuild a release version only in the GitLab pipeline of that tag.GITLAB_CIset), a build checked out on a tagvX.Y.Zkeeps the versionX.Y.Zonly whenCI_COMMIT_TAGisvX.Y.Z.release/v*branch, builds the next snapshot version, as if there were later commits. For example, master buildsX.(Y+1).0-SNAPSHOTandrelease/vX.Y.xbuildsX.Y.(Z+1)-SNAPSHOT.Motivation
The v1.68.0 release ended up with two Maven Central deployments. Both pipelines ran on the tagged commit
36cefc7:buildjob ran before the tag was visible and built1.68.0-SNAPSHOT. Itsdeploy_to_maven_centraljob started at 08:22 UTC, re-resolved the version throughgit describe, got the exact tag, and computed1.68.0.publishToSonatype closeSonatypeStagingRepositorythen created deployment changing List<Span> for List<DDSpan> #1.The version only depended on
git describe, so any job checking out the tagged commit after the tag push built the release version, whatever pipeline it belonged to.Additional Notes
assertTracerVersionnow always removesGITLAB_CIandCI_COMMIT_TAGfrom the inherited environment, so the tests don't depend on the GitLab pipeline running them. There are new cases for a master pipeline, a release branch pipeline, and another tag's pipeline on a tagged commit. Run them with./gradlew :buildSrc:test -PrunBuildSrcTests --tests 'datadog.gradle.plugin.version.*'.-SNAPSHOTis appended even withuseSnapshot = false, so the option can't produce a release-looking version. Nothing sets that option today.Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: APMLP-1743
🤖 Generated with Claude Code