apache/iceberg · error · GradleException
Found unsupported Flink versions:
Error message
Found unsupported Flink versions:
What it means
settings.gradle validates the requested Flink versions against the knownFlinkVersions system property. Any requested version (from -DflinkVersions or the default) not present in the known list causes a GradleException listing the unsupported versions, so the build never configures modules for Flink versions Iceberg cannot build.
Solutions
- Use only versions listed in knownFlinkVersions (check gradle.properties for the supported set).
- Omit -DflinkVersions to use defaultFlinkVersions.
- If adding a new Flink version intentionally, add it to knownFlinkVersions and update the Flink module build logic and CI matrix.
- Fix typos in the version string (e.g. '1,18' vs '1.18').
Example fix
// before ./gradlew build -DflinkVersions=1.16 // after ./gradlew build -DflinkVersions=1.19,1.20
Defensive patterns
Strategy: validation
Validate before calling
KNOWN=$(grep knownFlinkVersions gradle.properties | cut -d= -f2); for v in $(echo $FLINK_VERSIONS | tr ',' ' '); do [[ ",$KNOWN," == *",$v,"* ]] || echo "Unsupported Flink: $v"; done
Prevention
- Read supported Flink versions from gradle.properties instead of hardcoding them in scripts.
- Omit -DflinkVersions unless you need to restrict the build.
- Update knownFlinkVersions and CI together when adding Flink support.
When it happens
Trigger: Running Gradle with -DflinkVersions=1.17 (or another retired/unreleased version) that is not in knownFlinkVersions; also triggered if knownFlinkVersions is misconfigured in gradle.properties.
Common situations: Building an older Iceberg branch with flags copied from a newer one (or vice versa); trying to add support for a brand-new Flink release before the build was updated; typos like 'flink-1.19' vs '1.19'.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Found unsupported Kafka versions:
- Found unsupported Scala version:
- Found unsupported Spark versions:
- Class does not implement DynamicRecordGeneratorSQL
- Class does not implement DynamicRecordGeneratorSQL
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/d86b476e8ea814f7.
Report an issue: GitHub.
Appendix: source
Thrown at settings.gradle:84
project(':bigquery').name = 'iceberg-bigquery'
project(':dell').name = 'iceberg-dell'
project(':snowflake').name = 'iceberg-snowflake'
project(':delta-lake').name = 'iceberg-delta-lake'
project(':open-api').name = 'iceberg-open-api'
project(':mr').name = 'iceberg-mr'
if (null != System.getProperty("allModules")) {
System.setProperty("flinkVersions", System.getProperty("knownFlinkVersions"))
System.setProperty("sparkVersions", System.getProperty("knownSparkVersions"))
System.setProperty("kafkaVersions", System.getProperty("knownKafkaVersions"))
}
List<String> knownFlinkVersions = System.getProperty("knownFlinkVersions").split(",")
String flinkVersionsString = System.getProperty("flinkVersions") != null ? System.getProperty("flinkVersions") : System.getProperty("defaultFlinkVersions")
List<String> flinkVersions = flinkVersionsString != null && !flinkVersionsString.isEmpty() ? flinkVersionsString.split(",") : []
if (!knownFlinkVersions.containsAll(flinkVersions)) {
throw new GradleException("Found unsupported Flink versions: " + (flinkVersions - knownFlinkVersions))
}
List<String> knownSparkVersions = System.getProperty("knownSparkVersions").split(",")
String sparkVersionsString = System.getProperty("sparkVersions") != null ? System.getProperty("sparkVersions") : System.getProperty("defaultSparkVersions")
List<String> sparkVersions = sparkVersionsString != null && !sparkVersionsString.isEmpty() ? sparkVersionsString.split(",") : []
if (!knownSparkVersions.containsAll(sparkVersions)) {
throw new GradleException("Found unsupported Spark versions: " + (sparkVersions - knownSparkVersions))
}
List<String> knownKafkaVersions = System.getProperty("knownKafkaVersions").split(",")
String kafkaVersionsString = System.getProperty("kafkaVersions") != null ? System.getProperty("kafkaVersions") : System.getProperty("defaultKafkaVersions")
List<String> kafkaVersions = kafkaVersionsString != null && !kafkaVersionsString.isEmpty() ? kafkaVersionsString.split(",") : []
if (!knownKafkaVersions.containsAll(kafkaVersions)) {
throw new GradleException("Found unsupported Kafka versions: " + (kafkaVersions - knownKafkaVersions))
}
View on GitHub (pinned to 86d9c8fc54)