{"record":{"id":"338b02dd18a9f629","repo":"elastic/elasticsearch","slug":"out-of-date-released-versions-following-versions-a","errorCode":null,"errorMessage":"out-of-date released versions\nFollowing versions are not really released, but the build thinks they are: {}","messagePattern":"out-of-date released versions\nFollowing versions are not really released, but the build thinks they are: (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"critical","filePath":"build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BwcVersions.java","lineNumber":180,"sourceCode":"            .isPresent()\n                ? Optional.empty()\n                : getReleased().stream()\n                    .filter(v -> v.getMajor() == currentVersion.getMajor() - 1)\n                    .min(Comparator.reverseOrder())\n                    .map(\n                        version -> new UnreleasedVersionInfo(\n                            version,\n                            String.format(\"%d.%d\", version.getMajor(), version.getMinor()),\n                            \":distribution:bwc:major1\"\n                        )\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    }","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BwcVersions.java#L162-L198","documentation":"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.","triggerScenarios":"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.","commonSituations":"Premature version bump in build metadata; release pipeline partially completed; metadata updated on a branch ahead of the actual release.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"Set<Version> notReallyReleased = new HashSet<>(getReleased());\nnotReallyReleased.removeAll(authoritativeReleasedVersions);\nif (notReallyReleased.isEmpty() == false) {\n    throw new IllegalStateException(\"out-of-date released versions: \" + notReallyReleased);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"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"}