-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build: Fix flaky checkstyle issue #7321
Conversation
cc: @nastra, @Fokko, @stevenzwu, @jackye1995 , @XN137 |
Oops. This was perfectly compiled locally. But failed in the CI build. |
baseline.gradle
Outdated
apply plugin: 'com.palantir.baseline-checkstyle' | ||
// com.palantir.baseline:gradle-baseline-java:4.42.0 (the last version supporting Java 8) pulls | ||
// in an old version of the checkstyle(9.1), which has this OutOfMemory bug https://github.com/checkstyle/checkstyle/issues/10934 | ||
// So, replace com.palantir.baseline-checkstyle plugin usage with gradle checkstyle plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, replace "com.palantir.baseline-checkstyle" with "checkstyle" 9.3 (the latest java 8 supported version) which contains a fix
@@ -124,10 +125,12 @@ private org.apache.avro.Schema fixupAvroSchemaConvertedFromIcebergSchema( | |||
LogicalTypes.timeMillis() | |||
.addToSchema( | |||
org.apache.avro.Schema.create(org.apache.avro.Schema.Type.INT)); | |||
field = new org.apache.avro.Schema.Field("time_field", fieldSchema); | |||
updatedField = new org.apache.avro.Schema.Field("time_field", fieldSchema); | |||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe init updatedField = field
at the beginning rather than having an else
PR is ready for review. |
Merged, let's see if this fixes it, thanks @ajantha-bhat for investigation, and @nastra for review |
#7024 didn't really fix the issue.
After analyzing the dependency tree found that
com.palantir.baseline-checkstyle
plugin will always use the checkstyle version fromcom.palantir.baseline:gradle-baseline-java:4.42.0
(which is 9.1) even though we override it with some other version (which is 9.3) using classpath.So, the solution is to override using the toolchain version of the
CheckstyleExtension
as supported fromcom.palantir.baseline-checkstyle
instead of classpath.https://github.com/palantir/gradle-baseline/blob/267dd19dad6dbcc9d9772437340b4abc72deda55/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineCheckstyle.java#L43-L45
gradle iceberg-api:dependencies
and confirmed it is using checkstyle 9.3 which has the fix of OOM issue which is causing build flakiness.fixes #7292