Skip to content

Conversation

@ajantha-bhat
Copy link
Member

@ajantha-bhat ajantha-bhat commented Mar 2, 2023

Too many times, I am facing one flaky error (also other people are facing it too). Unable to know the reason. Hence, enabling the --stacktrace, --info for future debugging.

* What went wrong:
Execution failed for task ':iceberg-spark:iceberg-spark-3.3_2.12:checkstyleMain'.
> A failure occurred while executing org.gradle.api.plugins.quality.internal.CheckstyleAction
   > An unexpected error occurred configuring and executing Checkstyle.
      > java.lang.Error: Error was thrown while processing /home/runner/work/iceberg/iceberg/spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/SparkScanBuilder.java

Failure details:
https://github.com/apache/iceberg/actions/workflows/java-ci.yml

https://github.com/apache/iceberg/actions/runs/4309428443
https://github.com/apache/iceberg/actions/runs/4310045826
https://github.com/apache/iceberg/actions/runs/4306392493/
and many more

@ajantha-bhat
Copy link
Member Author

ajantha-bhat commented Mar 2, 2023

cc: @Fokko, @nastra, @jackye1995, @XN137

distribution: zulu
java-version: 8
- run: ./gradlew -DallVersions build -x test -x javadoc -x integrationTest
- run: ./gradlew -DallVersions build -x test -x javadoc -x integrationTest --scan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesnt this require to agree to gradle's terms of service?
see https://docs.gradle.com/enterprise/gradle-plugin/#connecting_to_scans_gradle_com

imo if the sporadic errors always happen in checkstyle part, we may want to check if we can upgrade the respective plugin to fix the issue

Copy link
Contributor

@jackye1995 jackye1995 Mar 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesnt this require to agree to gradle's terms of service

good point, in that case we probably cannot enable it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think other projects like Nessie Agree to these terms of service. I have skimmed it and didn't find anything harmful.

Do you guys think we should not enable --scan and just enable --stacktrace --debug ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo if the sporadic errors always happen in checkstyle part, we may want to check if we can upgrade the respective plugin to fix the issue

we are using the latest version I assume as I didn't find any version pinning.
https://github.com/apache/iceberg/blob/master/baseline.gradle#L36

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are only using latest version of baseline which supported java 8:

iceberg/build.gradle

Lines 30 to 34 in 35692a3

classpath 'com.palantir.baseline:gradle-baseline-java:4.42.0'
// com.palantir.baseline:gradle-baseline-java:4.42.0 (the last version supporting Java 8) pulls
// in an old version of the errorprone, which doesn't work w/ Gradle 8, so bump errorpone as
// well.
classpath "net.ltgt.gradle:gradle-errorprone-plugin:3.0.1"

in there we can find the checkstyle version:
https://github.com/palantir/gradle-baseline/blob/4.42.0/versions.props#L17

but i think 9.3 would be the last version with java8 support:
https://checkstyle.org/releasenotes.html#Release_9.3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's more of a licensing issue, not sure if there is any other project under Apache Foundation using this feature, we can ping the infra team about this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True but the gradle-baseline-4.42.0 may not accept new patches :(

Also what is your opinion on

Do you guys think we should not enable --scan and just enable --stacktrace --debug ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to have the failure reason before raising the patch to the gradle-baseline. So, I believe we need to get stack trace/debug first.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before raising the patch to the gradle-baseline

i was trying to say there would probably be ways to bump the checkstyle version without needing to get a new gradle-baseline version

that being said, i agree we should try to get stacktrace first to see what exactly goes wrong occasionally

@ajantha-bhat ajantha-bhat changed the title Build: Enable --scan for java-ci Build: Enable debugging for java-ci Mar 2, 2023
@ajantha-bhat
Copy link
Member Author

@XN137 and @jackye1995: Thanks for the review. I have changed to --stacktrace, --debug to find out the problem in future.

@nastra
Copy link
Contributor

nastra commented Mar 2, 2023

Rather than merging this PR with debugging enabled, I'd rather vote for rerunning CI on this PR until we run into the issue, as otherwise this will be spamming logs. That being said, I'm leaning towards -1 on merging this. Also it might actually leak security information according to Gradle: Debug level logging will leak security sensitive information!

@ajantha-bhat
Copy link
Member Author

changed to --info now. I will rerun the PR until I face the problem

@ajantha-bhat ajantha-bhat marked this pull request as draft March 2, 2023 07:33
@ajantha-bhat ajantha-bhat reopened this Mar 2, 2023
@ajantha-bhat ajantha-bhat reopened this Mar 2, 2023
@ajantha-bhat ajantha-bhat reopened this Mar 2, 2023
@ajantha-bhat ajantha-bhat reopened this Mar 2, 2023
@ajantha-bhat ajantha-bhat reopened this Mar 2, 2023
@ajantha-bhat ajantha-bhat reopened this Mar 2, 2023
@ajantha-bhat ajantha-bhat reopened this Mar 2, 2023
@ajantha-bhat
Copy link
Member Author

no luck in reproducing yet!

@ajantha-bhat ajantha-bhat reopened this Mar 2, 2023
@ajantha-bhat ajantha-bhat reopened this Mar 2, 2023
@ajantha-bhat
Copy link
Member Author

Discovered a new flaky test 🤦
#6988

@ajantha-bhat
Copy link
Member Author

I rebased and pushed to this branch when the PR was closed. So, I can't reopen the PR. will open a new PR again to debug this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants