Sonaqube scan action (Github) v4.0.0 failing - wget command not found

Failure due to this change: Comparing v3.0.0...v4.0.0 · SonarSource/sonarqube-scan-action · GitHub

Details: Sonar scan action fails to run on Github self-hosted runners which use this helm-chart actions-runner-controller/charts/gha-runner-scale-set at master · actions/actions-runner-controller · GitHub with image: Package actions-runner · GitHub

This image doesn’t have wget but because of the sonar scan action changes, there’s a failure. Since this dependency is added implicitly, there’s no way to fix other than adding wget package prior to using sonar scan action.

Proposed fix: curl is availble in self-hosted runner image? so you can check if wget is not available, then fail back to curl.

Hi @varunrocks6,
Thank you for reporting this issue: it helps us stabilize the v4 of the GitHub action.

As you correctly pointed out, wget is now missing. The previous version of the action was based on a Docker image that had all the dependencies baked into it.

When we moved from Docker to a composite action, we tested the behavior with all GitHub-hosted runners and didn’t encounter issues since those come with wget preinstalled and available in the path.

That is, unfortunately, not the case in your GitHub self-hosted runner.
We are exploring options, including the one that you suggest (using curl). We need to be careful since, with the introduction of v4, we now want to support all major Operating Systems, not just Linux, and different OS may have different tools available by default.

We have created a ticket in our tracking system, that you can use to track our progress on the issue.

If you are available to test, we can share a working solution with you before the final release. That would greatly help us to validate the fix before releasing the new version.

Waiting for the fix to be available, you can:

  • either stay on the previous major version: v3.0.0 is still fully functional
  • or install the wget and ensure it’s in the path, before running the action

Hope this helps address your issue,
Antonio

1 Like

Curl is on the ubuntu self hosted runners and also is installed on the Windows self hosted runner image. wget is on neither, so curl does seem like the correct solution to this problem. Right now we are having to install wget before we run the sonarqube action.

Hi @varunrocks6 and @georgekaz,
Good news! We have just released sonarqube-scan-action@v4.1.0, which should fix your issue.

We now fallback to curl when wget is not available.

You can read more about the new release of the action here.

Give it a try and let us know if that fixes your problem.

Best regards,
Antonio

2 Likes

Hi Antonio - Thank you for the quick turnaround, have removed the workaround of installing wget & confirm that the new version is working.

1 Like

Excellent, thanks Antonio

1 Like