Skip to content
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

Investigate CI incorrectly passing code with compilation errors #6685

Closed
mbaxter opened this issue Mar 5, 2024 · 3 comments
Closed

Investigate CI incorrectly passing code with compilation errors #6685

mbaxter opened this issue Mar 5, 2024 · 3 comments
Assignees
Labels
dev experience The build system, things that enable easier development etc. testing

Comments

@mbaxter
Copy link
Contributor

mbaxter commented Mar 5, 2024

Description

For context, see the PR comment here. In summary, CI has been passing, a change is pushed up, and it starts failing on some unrelated code. The failing code was pushed in a previous PR, and there is a sequence of passing CI checks before it finally fails here due to the MethodInputParametersMustBeFinal errorprone check.

I tried running the failing gradle task locally at the git commit where it finally failed in CI. When running locally, the task passed without failure. It looks like the -WError flag should always be applied (see build.gradle) so not sure why this is passing locally.

We should investigate this CI flakiness and make sure that we're actually enforcing all of the rules in CI consistently.

@non-fungible-nelson
Copy link
Contributor

@macfarla for visibility

@non-fungible-nelson non-fungible-nelson added the dev experience The build system, things that enable easier development etc. label Mar 12, 2024
@usmansaleem
Copy link
Member

@non-fungible-nelson I've picked up this issue. This resulted in taking out Besu's custom errorprone into its own repo. Also, the class involved, looks like our errorprone check is not always able to pick it, so I've make a small refactoring in it. Will create a PR to cover this and other bits that are uncovered due to upgrading the errorprone. See #6692 as well.

@usmansaleem
Copy link
Member

While investing this issue, the Besu's custom errorprone checks which were part of Besu codebase and were built and applied in each build task, has been moved to its own repository and now are referenced as an external dependency.

The -Werror by gradle does pass to compiler and to each submodule which results in errorprone warnings to be treated as errors during compilation. The most likely cause errorprone fails to apply to various gradle submodules when attempting to build locally is due to caching and incremental compilation "feature" of submodules. The recent changes in GH CI specially around building and running tests results in building various individual modules which causes errorprone checks to be correct applied during pre-compilation phase. As a result of this, errorprone suggestions has been applied in various submodules so that in future, GH actions should pick any errorprone violations.

Closing this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev experience The build system, things that enable easier development etc. testing
Projects
None yet
Development

No branches or pull requests

3 participants