Gradle sonar arm64 support

Hello,

I am using GitHub actions to run sonar scan on my java project on an arm64 architecture. This was working fine for us for a long time, but yesterday we started getting an error “Unsupported platform: linux-arm64” is not supported.

I am not sure how this occurred, it seems like maybe sonar removed support? No code changes took place on our end. It looks like some sensors work and maybe the kubernetes one fails. I’d appreciate your effort to help me understand and fix this issue.

> Task :sonarqube
Caching disabled for task ':sonarqube' because:
  Build cache is disabled
Task ':sonarqube' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
Task 'sonarqube' is deprecated. Use 'sonar' instead.
User cache: /home/runner/.sonar/cache
Default locale: "en_US", source code encoding: "UTF-8"
Load global settings
Load global settings (done) | time=330ms
Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
User cache: /home/runner/.sonar/cache
Loading required plugins
Load plugins index
Load plugins index (done) | time=219ms
Load/download plugins
Load/download plugins (done) | time=1064ms
Found an active CI vendor: 'Github Actions'
Load project settings for component key: 'x_Notification'
Load project settings for component key: 'x_Notification' (done) | time=204ms
Process project properties
Project key: x_Notification
Base dir: /runner/_work/notification/notification
Working dir: /runner/_work/notification/notification/build/sonar
Load project branches
Load project branches (done) | time=214ms
Check ALM binding of project 'x_Notification'
Detected project binding: BOUND
Check ALM binding of project 'x_Notification' (done) | time=196ms
Load project pull requests
Load project pull requests (done) | time=248ms
Load branch configuration
Github event: pull_request
Auto-configuring pull request 704
Load branch configuration (done) | time=1273ms
Load quality profiles
Load quality profiles (done) | time=259ms
Load active rules
Load active rules (done) | time=10047ms
Organization key: x
Pull request 704 for merge into releases/v0.1.451-hotfix from create-a-change
Importing 1 report(s). Turn your logs in debug mode in order to see the exhaustive list.
Sensor JaCoCo XML Report Importer [jacoco] (done) | time=168ms
Sensor IaC CloudFormation Sensor [iac]


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':sonarqube'.
> Unsupported platform: linux-arm64

* Try:
> Run with --stacktrace option to get the stack trace.
0 source files to be analyzed
0/0 source files have been analyzed

> Task :sonarqube FAILED
Sensor IaC CloudFormation Sensor [iac] (done) | time=17ms
Sensor IaC Kubernetes Sensor [iac]
:sonarqube (Thread[Execution worker for ':',5,main]) completed. Took 39.12 secs.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 48s

Execution optimizations have been disabled for 3 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
10 actionable tasks: 5 executed, 5 up-to-date
Some of the file system contents retained in the virtual file system are on file systems that Gradle doesn't support watching. The relevant state was discarded to ensure changes to these locations are properly detected. You can override this by explicitly enabling file system watching.
Error: Process completed with exit code 1.

Hi,

Welcome to the community!

Thanks for this report. We deployed a new version of the IAC sensor on the 17th, which tracks to your timing. I’ve flagged the language experts.

 
Ann

Hi again,

In the meantime, it may work to add an exclusion for your IaC files (e.g. Dockerfile).

 
HTH,
Ann

Hello Lea,

The issue is caused by Helm analysis, which is part of the Kubernetes analyzer. We’ve identified the root cause, and the issue will be fixed in the upcoming release. You can watch the status in this ticket.

Meanwhile, you can temporarily disable the Kubernetes analyzer by setting the property sonar.kubernetes.activate to false.

Best,

Peter

1 Like

Hi @lfairbanks_mcgh,

We have recently released a new version of sonar-iac analyzer with the problem fixed. The version 1.26.0.8471 is already available in SonarCloud. Feel free to re-enable Kubernetes analysis; the analyzer should no longer crash.

Best,

Peter

3 Likes