elastic/elasticsearch · critical · IllegalStateException
out-of-date released versions Following versions are not…
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.
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…
- Could not parse any versions
- Parsed versions latest version does not match the one…
- Cannot read java properties file.
- No read-only compatible version found.
AI-assisted analysis of elastic/elasticsearch@db6a809a66 (2026-08-12).
Data as JSON: /api/errors/338b02dd18a9f629.
Report an issue: GitHub.
Appendix: 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)