Give every promotion build of a chain the same version - #4
Merged
Merged
Conversation
The promotion builds of one release pipeline each computed their own version qualifier from the moment they happened to run. A chain walks through 33 Eclipse version streams one after the other and takes hours, so the same release was published as 3.1.12.v20260908-0412 in one stream and as 3.1.12.v20260908-0631 in the next. A new "Determine version" build now runs first in every promotion chain and determines the build instant once, as seconds since the epoch, published as its build number. All 132 individual promotion builds take a snapshot dependency on it and pass the instant to Gradle, which reconstructs the qualifier from it. The build itself knows nothing about how Buildship composes a version number. It checks out nothing. The VCS root is attached only so that TeamCity scopes dependency reuse to a revision: re-running a single failed promotion then picks up the instant its chain started with, rather than minting a new one and publishing that Eclipse version under a folder name of its own.
donat
force-pushed
the
donat/consistent-promotion-version
branch
from
September 11, 2026 07:28
3cf6837 to
6a44fce
Compare
donat
marked this pull request as ready for review
September 11, 2026 07:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to eclipse-buildship#1372.
The promotion builds of one release pipeline each computed their own version qualifier from the moment they happened to run. A chain walks through 33 Eclipse version streams one after the other and takes hours, so the same release was published as
3.1.12.v20260908-0412in one stream and as3.1.12.v20260908-0631in the next, under a different update site folder name each time.A new
Determine versionbuild now runs first in every promotion chain and determines the build instant once, as seconds since the epoch, published as its build number. All 132 individual promotion builds take a snapshot dependency on it and pass the instant on with-PbuildTimestamp, and Gradle reconstructs the qualifier from it. The build contributes the raw instant and nothing else, so thevprefix, the date layout, the minute granularity and the-s/-msuffixes all stay inbuild.gradlewhere they already were.The build checks out nothing (
CheckoutMode.MANUAL). The VCS root is attached only so that TeamCity scopes dependency reuse to a revision. Re-running a single failed promotion then picks up the instant its chain started with instead of minting a new one, which is the same defect resurfacing on the retry path. Without a VCS root any old successful build would count as suitable.The four aggregate trigger builds and
Tag revision and increment version numberare unchanged:tagandincrementVersionreadversion.txtand never touch the qualifier.Verification
mvn -f .teamcity/pom.xml teamcity-configs:generatesucceeds (needs Java 21, the 2026.2 plugin is compiled for it). Auditing the 200 generated build types:The five promotion build types without the parameter are the four aggregate triggers and
Determine versionitself, none of which runuploadUpdateSite.In every one of the 132 the parameter reference and the dependency name the same build type:
RootProjectIdis the placeholder the local generator substitutes for the project the settings belong to; on the server both sides resolve toTooling_Buildship_.... They are composed from the sameid.value, so they cannot drift apart. Worth knowing for anyone writing a%dep.%reference here:id!!.valuealready carries that prefix, and prependingDslContext.projectIdyourself yieldsRootProjectId_RootProjectId_....The generated script step is intact after Kotlin and TeamCity escaping, with
%%ssurviving as a literal%s:What local generation cannot prove is that TeamCity resolves the
%dep.%reference at run time. The first promotion chain to run confirms it: the Gradle step's command line shows the epoch instead of the parameter reference. If it were wrong the build fails at once, since the companion change rejects an empty or non-numeric-PbuildTimestamprather than falling back to the current time.