elastic/elasticsearch · error · RuntimeException
Could not find base id: {}
Error message
Could not find base id: {} What it means
RuntimeException from resetUpperBound() in GenerateTransportVersionDefinitionTask - identical invariant to error 309 but in the concrete task's private resetUpperBound helper. idsByBase.get(upperBound.definitionId().base()) returns null, meaning the base id referenced by the upper bound has no corresponding definitions.
Source
Thrown at build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/transport/GenerateTransportVersionDefinitionTask.java:164
}
private void resetAllUpperBounds(TransportVersionResourcesService resources, Map<Integer, List<IdAndDefinition>> idsByBase)
throws IOException {
for (String upperBoundName : resources.getChangedUpperBoundNames()) {
TransportVersionUpperBound upstreamUpperBound = resources.getUpperBoundFromGitBase(upperBoundName);
resetUpperBound(resources, upstreamUpperBound, idsByBase, null);
}
}
private void resetUpperBound(
TransportVersionResourcesService resources,
TransportVersionUpperBound upperBound,
Map<Integer, List<IdAndDefinition>> idsByBase,
String ignoreDefinitionName
) throws IOException {
List<IdAndDefinition> idsForUpperBound = idsByBase.get(upperBound.definitionId().base());
if (idsForUpperBound == null) {
throw new RuntimeException("Could not find base id: " + upperBound.definitionId().base());
}
IdAndDefinition resetValue = idsForUpperBound.getLast();
if (resetValue.definition().name().equals(ignoreDefinitionName)) {
// there must be another definition in this base since the ignored definition is new
assert idsForUpperBound.size() >= 2;
resetValue = idsForUpperBound.get(idsForUpperBound.size() - 2);
}
var resetUpperBound = new TransportVersionUpperBound(upperBound.name(), resetValue.definition().name(), resetValue.id());
resources.writeUpperBound(resetUpperBound);
}
private void removeUnusedNamedDefinitions(
TransportVersionResourcesService resources,
Set<String> referencedNames,
Set<String> changedDefinitions
) throws IOException {
for (String definitionName : changedDefinitions) {
if (referencedNames.contains(definitionName) == false) {View on GitHub (pinned to db6a809a66)
Solutions
- Open the upper-bound file named in the failure and note its definitionId().base().
- Ensure a definition file exists that produces that base in idsByBase, or correct the upper-bound file.
- Restore consistency from a known-good git revision of the transport-resources directory.
Defensive patterns
Strategy: validation
Validate before calling
List<IdAndDefinition> idsForUpperBound = idsByBase.get(upperBound.definitionId().base());
if (idsForUpperBound == null) {
throw new IllegalStateException("Upper bound '" + upperBound.name() + "' references unknown base " + upperBound.definitionId().base() + "; available: " + idsByBase.keySet());
} Prevention
- Keep definition and upper-bound files consistent in the same commit.
- Avoid manual edits to the transport-resources directory.
- Re-run generation from a clean, synced checkout.
When it happens
Trigger: During the reset-all-upper-bounds pass, an upper bound's base does not appear as a key in idsByBase (built from current definitions), so there is no fallback definition to reset the bound to.
Common situations: Manually edited or partially-merged transport-version resources; a definition was removed but its upper-bound file still references the old base; concurrent modification of the resources directory.
Related errors
- Could not find base id: {}
- Failed to parse id {} in {}
- Invalid transport version data file [{}]: {}
- Invalid transport version upper bound file [{}]: {}
- Invalid increment {}, must be a positive integer
AI-assisted analysis of elastic/elasticsearch@db6a809a66 (2026-08-12).
Data as JSON: /api/errors/5ec9beed1049cbec.
Report an issue: GitHub.