elastic/elasticsearch · error · RuntimeException
Missing upper bound {} for release version {}
Error message
Missing upper bound {} for release version {} What it means
RuntimeException from GenerateInitialTransportVersionTask.run() when both the initial_<version> definition and the base upper bound for the current stack version are absent from git base. The task bootstraps transport versions for a new release branch and expects an existing upper bound to anchor the new ids.
Source
Thrown at build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/transport/GenerateInitialTransportVersionTask.java:48
public abstract Property<String> getStackVersion();
@Input
abstract Property<Version> getCurrentVersion();
@TaskAction
public void run() throws IOException {
Version stackVersion = Version.fromString(getStackVersion().get());
String upperBoundName = getUpperBoundName(stackVersion);
TransportVersionResourcesService resources = getResourceService().get();
TransportVersionUpperBound baseUpperBound = resources.getUpperBoundFromGitBase(upperBoundName);
String initialDefinitionName = "initial_" + stackVersion;
TransportVersionDefinition existingDefinition = resources.getUnreferableDefinitionFromGitBase(initialDefinitionName);
// This task runs on main and release branches. In release branches we will generate the exact same
// upper bound result because we always look at the base branch (ie upstream/main).
if (existingDefinition == null) {
if (baseUpperBound == null) {
throw new RuntimeException("Missing upper bound " + upperBoundName + " for release version " + stackVersion);
}
// minors increment by 1000 to create a unique base, patches increment by 1 as other patches do
int increment = stackVersion.getRevision() == 0 ? 1000 : 1;
var id = TransportVersionId.fromInt(baseUpperBound.definitionId().complete() + increment);
var definition = new TransportVersionDefinition(initialDefinitionName, List.of(id), false);
resources.writeDefinition(definition);
var newUpperBound = new TransportVersionUpperBound(upperBoundName, initialDefinitionName, id);
resources.writeUpperBound(newUpperBound);
Version currentVersion = getCurrentVersion().get();
String currentUpperBoundName = getUpperBoundName(currentVersion);
if (stackVersion.getRevision() == 0) {
// a minor creates a new base, which the current branch must also point at
resources.writeUpperBound(new TransportVersionUpperBound(currentUpperBoundName, initialDefinitionName, id));
} else if (currentUpperBoundName.equals(upperBoundName) == false) {
// A patch adds an id to an existing base. If the current branch's upper bound still points into that
// same base, that patch id is now the latest id for the base, which the current branch cannot adopt:View on GitHub (pinned to db6a809a66)
Solutions
- Confirm the upper-bound file for the target branch name exists on the base branch (upstream/main).
- Run on a branch that is up to date with the base so getUpperBoundFromGitBase can find the file.
- If bootstrapping a brand-new release line, create the seed upper-bound file first per the documented workflow.
Defensive patterns
Strategy: validation
Validate before calling
String upperBoundName = getUpperBoundName(stackVersion);
TransportVersionUpperBound baseUpperBound = resources.getUpperBoundFromGitBase(upperBoundName);
if (baseUpperBound == null) {
throw new IllegalStateException("No upper bound '" + upperBoundName + "' on base branch. Run on main / sync resources first.");
} Prevention
- Ensure the seed upper-bound file exists on main before branching.
- Run the initial-version task from a branch up to date with upstream.
- Keep the transport-resources directory synced before release tasks.
When it happens
Trigger: Running the initial-version task for a stack version whose upper-bound CSV (named after getUpperBoundName(stackVersion)) does not exist in the upstream/base git revision of the transport-resources directory.
Common situations: Creating a new minor/major release without first establishing its upper-bound file on main; pointing the task at the wrong base branch; the resources submodule/directory is out of sync with upstream.
Related errors
- Missing upper bound {} for stack version {}
- Transport version generation cannot run on release branches
- git command failed with exit code {} command: {} output: {}
- Invalid increment {}, must be a positive integer
- Invalid increment {}, must be no larger than 1000
AI-assisted analysis of elastic/elasticsearch@db6a809a66 (2026-08-12).
Data as JSON: /api/errors/9564c86df7e248db.
Report an issue: GitHub.