BioDynaMo / biodynamo

BioDynaMo is a high-performance and modular, agent-based simulation platform.
Apache License 2.0
95 stars 46 forks source link

Error during SonarScanner execution #375

Open imorlxs opened 3 months ago

imorlxs commented 3 months ago

Describe the bug Sonar Source Analysis fails.

To Reproduce Steps to reproduce the behavior:

  1. Make a fork of BioDynamo on a non-admin account (like mine)
  2. Make some commits and do a PR
  3. Wait until the error shows
  4. See error

Expected behavior Sonar Source Analysis working correctly.

Error message 10:14:55.617 DEBUG: Upload report 10:14:55.619 DEBUG: --> POST https://sonarcloud.io/api/ce/submit?organization=biodynamo&projectKey=BioDynaMo_biodynamo&projectName=BioDynaMo&characteristic=pullRequest%3D374 (263565-byte body) 10:14:56.084 DEBUG: <-- 404 https://sonarcloud.io/api/ce/submit?organization=biodynamo&projectKey=BioDynaMo_biodynamo&projectName=BioDynaMo&characteristic=pullRequest%3D374 (464ms, unknown-length body) 10:14:56.101 INFO: ------------------------------------------------------------------------ 10:14:56.102 INFO: EXECUTION FAILURE 10:14:56.102 INFO: ------------------------------------------------------------------------ 10:14:56.102 INFO: Total time: 2:52.936s 10:14:56.145 INFO: Final Memory: 37M/140M 10:14:56.145 INFO: ------------------------------------------------------------------------ 10:14:56.145 ERROR: Error during SonarScanner execution Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator to check the permissions of the user the token belongs to 10:14:56.147 DEBUG: Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$286/0x00000008012f5630@557286ad during JVM shutdown

TobiasDuswald commented 3 months ago

I'm not sure if we can fix that. It might be that these Tokens are not accessible to forks. So far the project has been driven by a core development team and branches have typically been aded to the repo rather than a fork. If you have a simple fix we're happy to implement it though, other than that, feel free to add branches to the repository.

TobiasDuswald commented 3 months ago

Added you to the dev team, so you should be able to add branches to the repository. I don't think the permissions will allow it for you, but in case they would, do not directly push to master -- always use PRs.

imorlxs commented 3 months ago

Thank you. Unfortunately, I don't have a simple fix for this issue at the moment. I'll proceed by adding branches directly to the repository as suggested. Should I close this issue?

TobiasDuswald commented 2 months ago

Let's keep it open for now; maybe I find time this or next month to take a look; I'm a bit busy at the moment. Thank you for bringing it up @imorlxs ! 👏