Devops pipeline integration broken after enabling Al-generated fix

Hi everyone.

We’ve been using Sonar Cloud these last 4 years to review our Pull Requests.
We have a Devops pipeline, building and reviewing a MVC project.

Everything has been running without issue these last few years. However, last week, when I enabled Al-generated fix suggestions in the Organization settings, all builds have started failing with the error

System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 ().

Have already refreshed the access token multiple times. Enabling that was the only change done.

It breaks in the pipeline running:

  • task: SonarCloudPrepare@1
    condition: and(succeeded(), variables.useSonarCloud, eq(variables.isMasterOrTargetingMasterBranch, ‘True’))
    inputs:
    SonarCloud: ‘SonarCube’
    organization: ‘_____’
    scannerMode: ‘MSBuild’
    projectKey: ‘______BE.core’
    projectName: ‘BE.core’
    extraProperties: |
    sonar.exclusions=/Migrations/, /BisnodeClient.cs’
    sonar.cs.opencover.reportsPaths=$(Build.SourcesDirectory)/
    /coverage.opencover.xml
    sonar.cs.vstest.reportsPaths=$(Agent.TempDirectory)/*.trx

Disabling the AI tool again and refreshing the token again did not fix the issue.
Any help or tips would be appreciated.

Thank you.

Hi Joao,

Welcome to our community!

Would it be possible to share the full logs for the SonarCloudPrepare task in verbose mode?

You can enable the verbose mode by adding sonar.verbose=true to the extraProperties list.

Hi.
Thank you, and thank you for the quick response.

I set it. Full content is in the file uploaded.
SonarPrepareLog.txt (8.9 KB)

The only thing I could find a bit suspicious is “This task is deprecated. Please upgrade to the latest version. For more information, refer to SonarCloud extension for Azure DevOps & SonarCloud docs

Could I be using an obsolete version that is not compatible with the AI tool? (If so, disabling the AI tool should have fixed it)

Thank you

Hello @JoaoSyone ,

The version 1 of the SonarCloud tasks are obsolete and will soon be removed from the extension. As a first step, can you please upgrade to the version 3 of the tasks? You can refer to our documentation to get some help on upgrading.

Please let me know if the error pesists then!

3 Likes

Hi. It worked, thank you very much for the quick assistance :+1:

3 Likes