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 failed Sonarqube builds #7802

Closed
fzhao99 opened this issue Jun 12, 2024 · 2 comments · Fixed by #7853
Closed

Investigate failed Sonarqube builds #7802

fzhao99 opened this issue Jun 12, 2024 · 2 comments · Fixed by #7853
Assignees
Labels

Comments

@fzhao99
Copy link
Contributor

fzhao99 commented Jun 12, 2024

Description

Sonarcube seems to be intermittently failing to build in CI jobs. See examples here and here

Steps to reproduce

  1. Open a PR
  2. Sonar will try building but fail with the following error code
> Your project contains .java files, please provide compiled classes with sonar.java.binaries property, or exclude them from the analysis with sonar.exclusions property.

Kicking the job seems to fix it somehow, so wondering if it's just an issue on first creation?

Expected behavior

Sonar building on the first try when unrelated code is put up for review

@fzhao99
Copy link
Contributor Author

fzhao99 commented Jun 13, 2024

@shanice-skylight I seem to be able to repro this pretty consistently when I'm manually rerunning the sonar job, even after the first build succeeded. See this PR for an example

@shanice-skylight
Copy link
Collaborator

shanice-skylight commented Jun 26, 2024

Notes on why this error is triggered:

  • Compiled .class files are required for java projects with more than one java file. If not provided properly, analysis will fail with the message:

Your project contains .java files, please provide compiled classes with sonar.java.binaries property, or exclude them from the analysis with sonar.exclusions property.
Reference used

I added the sonar.java.binaries property, now I'm working through fixing a message that says Could not calculate hash for class, fixed the hash error by providing the full path to java classes

@shanice-skylight shanice-skylight linked a pull request Jun 26, 2024 that will close this issue
@shanice-skylight shanice-skylight linked a pull request Jun 27, 2024 that will close this issue
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 a pull request may close this issue.

2 participants