elastic/elasticsearch · critical · IllegalStateException
out-of-date released versions Following versions are not rea
Error message
out-of-date released versions
Following versions are not really released, but the build thinks they are: {} What it means
Thrown by BwcVersions.compareToAuthoritative when the build's released-version set contains versions that the authoritative source (Maven Central) does NOT consider released. In other words, the build is optimistically marking as released something that has not actually shipped.
Source
Thrown at build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BwcVersions.java:180
.isPresent()
? Optional.empty()
: getReleased().stream()
.filter(v -> v.getMajor() == currentVersion.getMajor() - 1)
.min(Comparator.reverseOrder())
.map(
version -> new UnreleasedVersionInfo(
version,
String.format("%d.%d", version.getMajor(), version.getMinor()),
":distribution:bwc:major1"
)
);
}
public void compareToAuthoritative(List<Version> authoritativeReleasedVersions) {
Set<Version> notReallyReleased = new HashSet<>(getReleased());
notReallyReleased.removeAll(authoritativeReleasedVersions);
if (notReallyReleased.isEmpty() == false) {
throw new IllegalStateException(
"out-of-date released versions"
+ "\nFollowing versions are not really released, but the build thinks they are: "
+ notReallyReleased
);
}
Set<Version> incorrectlyConsideredUnreleased = new HashSet<>(authoritativeReleasedVersions);
incorrectlyConsideredUnreleased.retainAll(getUnreleased());
if (incorrectlyConsideredUnreleased.isEmpty() == false) {
throw new IllegalStateException(
"out-of-date released versions"
+ "\nBuild considers versions unreleased, "
+ "but they are released according to an authoritative source: "
+ incorrectlyConsideredUnreleased
+ "\nThe next versions probably needs to be added to Version.java (CURRENT doesn't count)."
);
}
}View on GitHub (pinned to db6a809a66)
Solutions
- Move the offending version back to the unreleased set in build metadata until it actually ships.
- Re-run against an updated authoritative source (refresh Maven Central metadata).
- Coordinate the metadata change with the actual release publication.
Defensive patterns
Strategy: validation
Validate before calling
Set<Version> notReallyReleased = new HashSet<>(getReleased());
notReallyReleased.removeAll(authoritativeReleasedVersions);
if (notReallyReleased.isEmpty() == false) {
throw new IllegalStateException("out-of-date released versions: " + notReallyReleased);
} Prevention
- Only move a version to the released set after Maven Central confirms publication.
- Run compareToAuthoritative in CI against fresh authoritative metadata.
- Coordinate metadata updates with the release pipeline.
When it happens
Trigger: A version was added to the released set in build metadata before it was actually published to Maven Central; compareToAuthoritative runs during the version sanity check and finds the discrepancy.
Common situations: Premature version bump in build metadata; release pipeline partially completed; metadata updated on a branch ahead of the actual release.
Related errors
- out-of-date released versions Build considers versions unrel
- Could not parse any versions
- Parsed versions latest version does not match the one config
- Ran out of versions to go to for {}
- System property 'bwc.throttle.maxParallelUsages' must be >=
AI-assisted analysis of elastic/elasticsearch@db6a809a66 (2026-08-12).
Data as JSON: /api/errors/338b02dd18a9f629.
Report an issue: GitHub.