{"record":{"id":"55616c1f8153c258","repo":"elastic/elasticsearch","slug":"out-of-date-released-versions-build-considers-vers","errorCode":null,"errorMessage":"out-of-date released versions\nBuild considers versions unreleased, but they are released according to an authoritative source: {}\nThe next versions probably needs to be added to Version.java (CURRENT doesn't count).","messagePattern":"out-of-date released versions\nBuild considers versions unreleased, but they are released according to an authoritative source: (.+?)\nThe next versions probably needs to be added to Version\\.java \\(CURRENT doesn't count\\)\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"critical","filePath":"build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BwcVersions.java","lineNumber":190,"sourceCode":"                        )\n                    );\n    }\n\n    public void compareToAuthoritative(List<Version> authoritativeReleasedVersions) {\n        Set<Version> notReallyReleased = new HashSet<>(getReleased());\n        notReallyReleased.removeAll(authoritativeReleasedVersions);\n        if (notReallyReleased.isEmpty() == false) {\n            throw new IllegalStateException(\n                \"out-of-date released versions\"\n                    + \"\\nFollowing versions are not really released, but the build thinks they are: \"\n                    + notReallyReleased\n            );\n        }\n\n        Set<Version> incorrectlyConsideredUnreleased = new HashSet<>(authoritativeReleasedVersions);\n        incorrectlyConsideredUnreleased.retainAll(getUnreleased());\n        if (incorrectlyConsideredUnreleased.isEmpty() == false) {\n            throw new IllegalStateException(\n                \"out-of-date released versions\"\n                    + \"\\nBuild considers versions unreleased, \"\n                    + \"but they are released according to an authoritative source: \"\n                    + incorrectlyConsideredUnreleased\n                    + \"\\nThe next versions probably needs to be added to Version.java (CURRENT doesn't count).\"\n            );\n        }\n    }\n\n    public List<Version> getReleased() {\n        return versions.stream()\n            .filter(v -> v.getMajor() >= currentVersion.getMajor() - 1)\n            .filter(v -> unreleased.containsKey(v) == false)\n            .toList();\n    }\n\n    public List<Version> getReadOnlyIndexCompatible() {\n        // Lucene can read indices in version N-2","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BwcVersions.java#L172-L208","documentation":"Thrown by BwcVersions.compareToAuthoritative when the authoritative source considers versions released that the build still treats as unreleased. Per the project convention, when a version ships the next version must be added to Version.java; this error says that follow-up was missed.","triggerScenarios":"A version was published to Maven Central but Version.java (and the derived unreleased set) was never updated to add the successor version, so the build still lists a now-released version as unreleased.","commonSituations":"Release completed but the repository's Version.java was not updated; merge of the release branch omitted the version-metadata follow-up.","solutions":["Add the next unreleased version to Version.java as the message instructs (CURRENT does not count).","Mark the now-released version as released in build metadata.","Pull the latest from the release branch and re-run the version sanity check."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"Set<Version> wrong = new HashSet<>(authoritativeReleasedVersions);\nwrong.retainAll(getUnreleased());\nif (wrong.isEmpty() == false) {\n    throw new IllegalStateException(\"Add next version to Version.java: \" + wrong);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Immediately after a release, add the successor version to Version.java.","Run the version-sanity check in CI against authoritative Maven Central data.","Treat the release-merge as incomplete until the successor version lands."],"tags":["bwc","release-management","versioning","build-tools"],"backgroundTag":null,"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}