{"record":{"id":"093ea980461ba971","repo":"elastic/elasticsearch","slug":"invalid-transport-version-upper-bound-file","errorCode":null,"errorMessage":"Invalid transport version upper bound file [{}]: {}","messagePattern":"Invalid transport version upper bound file \\[(.+?)\\]: (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/transport/TransportVersionUpperBound.java","lineNumber":39,"sourceCode":"        String filename = file.getFileName().toString();\n        assert filename.endsWith(\".csv\");\n        int slashIndex = filename.lastIndexOf('/');\n        String branch = filename.substring(slashIndex == -1 ? 0 : (slashIndex + 1), filename.length() - 4);\n\n        String idsLine = null;\n        // Regardless of whether windows newlines exist (they could be added by git), we split on line feed.\n        // All we care about skipping lines with the comment character, so the remaining \\r won't matter\n        String[] lines = contents.split(\"\\n\");\n        for (String line : lines) {\n            line = line.strip();\n            if (line.startsWith(\"#\") == false) {\n                idsLine = line;\n                break;\n            }\n        }\n        String[] parts = idsLine.split(\",\");\n        if (parts.length != 2) {\n            throw new IllegalStateException(\"Invalid transport version upper bound file [\" + file + \"]: \" + contents);\n        }\n\n        return new TransportVersionUpperBound(branch, parts[0], TransportVersionId.fromString(parts[1]));\n    }\n}\n","sourceCodeStart":21,"sourceCodeEnd":45,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/transport/TransportVersionUpperBound.java#L21-L45","documentation":"IllegalStateException from TransportVersionUpperBound.fromString() when the first non-comment line of an upper-bound CSV does not split into exactly 2 comma-separated fields (definitionName, versionId). Comment lines starting with '#' are skipped, then the next line must have the shape '<name>,<id>'.","triggerScenarios":"An upper-bound CSV's content line has zero, one, or more than one comma - blank content, a single token, or a line with extra fields all trigger this.","commonSituations":"Hand-editing an upper-bound file and omitting the id or adding extra columns; a merge conflict marker left on the content line; trailing comma producing an empty third part; file accidentally emptied.","solutions":["Open the upper-bound file named in the message and verify its first non-comment line is exactly 'definitionName,versionId'.","Remove stray columns/commas; ensure the version id is present.","Restore the file from git history if unsure of the intended contents."],"exampleFix":"// before: 9.x.csv contains \"initial_25\"\n// after:  9.x.csv contains \"initial_25,1000000\"","handlingStrategy":"validation","validationCode":"String[] parts = idsLine.split(\",\");\nif (parts.length != 2 || parts[0].isBlank() || !parts[1].matches(\"\\\\d+\")) {\n    throw new IllegalStateException(\"Upper bound file must be 'definitionName,versionId': \" + contents);\n}","typeGuard":"static boolean isValidUpperBoundLine(String line) {\n    String[] p = line.split(\",\");\n    return p.length == 2 && !p[0].isBlank() && p[1].matches(\"\\\\d+\");\n}","tryCatchPattern":null,"preventionTips":["Never hand-edit upper-bound CSVs; use the generator tasks.","Lint upper-bound files in CI to enforce the two-column shape.","Restore suspect files from git history."],"tags":["transport-version","csv-parsing","data-integrity","build-tooling"],"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-12T08:17:17.861Z"}