{"record":{"id":"5cfed771ee8586b0","repo":"elastic/elasticsearch","slug":"missing-upper-bounds-files-for-branches-known","errorCode":null,"errorMessage":"Missing upper bounds files for branches {}, known branches are {}","messagePattern":"Missing upper bounds files for branches (.+?), known branches are (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/transport/GenerateTransportVersionDefinitionTask.java","lineNumber":140,"sourceCode":"        List<TransportVersionUpperBound> upstreamUpperBounds,\n        String targetDefinitionName\n    ) throws IOException {\n        Set<String> targetUpperBoundNames = new HashSet<>();\n        targetUpperBoundNames.add(getCurrentUpperBoundName().get());\n        if (getBackportBranches().isPresent()) {\n            targetUpperBoundNames.addAll(List.of(getBackportBranches().get().split(\",\")));\n        }\n\n        Set<String> missingBranches = new HashSet<>(targetUpperBoundNames);\n        List<String> knownUpperBoundNames = new ArrayList<>();\n        for (TransportVersionUpperBound upperBound : upstreamUpperBounds) {\n            knownUpperBoundNames.add(upperBound.name());\n            missingBranches.remove(upperBound.name());\n        }\n        if (missingBranches.isEmpty() == false) {\n            List<String> sortedMissing = missingBranches.stream().sorted().toList();\n            List<String> sortedKnown = knownUpperBoundNames.stream().sorted().toList();\n            throw new IllegalArgumentException(\n                \"Missing upper bounds files for branches \" + sortedMissing + \", known branches are \" + sortedKnown\n            );\n        }\n\n        return targetUpperBoundNames;\n    }\n\n    private void resetAllUpperBounds(TransportVersionResourcesService resources, Map<Integer, List<IdAndDefinition>> idsByBase)\n        throws IOException {\n        for (String upperBoundName : resources.getChangedUpperBoundNames()) {\n            TransportVersionUpperBound upstreamUpperBound = resources.getUpperBoundFromGitBase(upperBoundName);\n            resetUpperBound(resources, upstreamUpperBound, idsByBase, null);\n        }\n    }\n\n    private void resetUpperBound(\n        TransportVersionResourcesService resources,\n        TransportVersionUpperBound upperBound,","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/transport/GenerateTransportVersionDefinitionTask.java#L122-L158","documentation":"IllegalArgumentException from getTargetUpperBoundNames() when one or more requested target/backport branch names do not have corresponding upper-bound files in the upstream set. The message lists the missing branches and the known ones so the mismatch is obvious.","triggerScenarios":"The --backport-branches option (or the current branch) names branches whose upper-bound CSVs are not present among upstreamUpperBounds.","commonSituations":"Typo in a --backport-branches value (e.g. '9.1' vs '9.x'); referencing a branch whose upper-bound file was never created; the upstream resources dir is stale relative to the named branches.","solutions":["Compare the missing-branches list in the message against the known-branches list and correct typos.","Ensure each named branch has its upper-bound CSV committed upstream.","Update your local transport-resources directory from the base branch."],"exampleFix":"// before: --backport-branches=9.1,8.19  (9.1 unknown)\n// after:  --backport-branches=9.x,8.19","handlingStrategy":"validation","validationCode":"Set<String> known = upstreamUpperBounds.stream().map(TransportVersionUpperBound::name).collect(Collectors.toSet());\nList<String> unknown = targetUpperBoundNames.stream().filter(n -> !known.contains(n)).sorted().toList();\nif (!unknown.isEmpty()) {\n    throw new IllegalArgumentException(\"Unknown backport branches \" + unknown + \"; known: \" + new TreeSet<>(known));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Spell branch names exactly as their upper-bound file names.","Sync the resources directory so known-branches is current.","Validate --backport-branches against the upstream listing before running."],"tags":["transport-version","backport","validation","build-tooling","configuration"],"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-12T12:17:08.281Z"}