Bump SC Extension Task Versions to 1.45

Hello,
I’m coming at this from a little downstream, but I was wondering if there are any plans to update the extension task versions to 1.45 here:

We are experiencing some problems that I’m hopeful this version would solve per the release notes. We pick up the version specified in these extension task json files so having them updated is the only way we’ll get the newer version.

Apologies if this is the wrong place for this request!

Hello @pchampionpowerplan ,

Thanks for reaching out. Could you please explain what specific fix you are looking for in the release notes?

The versions of the tasks:

  • 1.41.0 for the prepare task
  • 1.44.0 for the analyze task
  • 1.16.0 for the publish task

were last bumped in this commit, 3 weeks ago. They were bumped just after the last change that impacted the SonarCloud tasks, so these task versions already reflect the latest code changes made to the SonarCloud extension. (with the exception of this commit which does not impact the SonarCloud extension, so I am excluding it)

If you share more about your environment, pipeline configuration, and what is going wrong I may be available to help you a bit further,

Hope this helps

Sure thing, I’ll give what I know.

We are using the SonarCloud extension for Azure Devops, below is our configuration:

- task: SonarCloudPrepare@1
  displayName: 'Prepare SonarCloud Analysis'
  inputs:
	SonarCloud: '$(sonarCloudServiceConnectionName)'
	organization: 'company'
	scannerMode: 'MSBuild'
	projectKey: 'Cloud.ourproject'
	projectName: 'Cloud.ourproject'
	projectVersion: '$(GitVersion.MajorMinorPatch)'
	extraProperties: |
	  sonar.exclusions=**/obj/**,**/*Test.csproj,**/Migrations/**
	  sonar.coverage.exclusions=**/Repositories/**/*Repository.cs,**/PerformanceRepositories/**/*Repository.cs,**/Dtos/**/*.cs,**/Migrations/**/*.sql,**/EfTypeConfiguration/**/*.cs,**/EntityConfigurations/**/*.cs
	  sonar.cs.opencover.reportsPaths=$(Build.SourcesDirectory)/**/coverage.opencover*.xml
	  sonar.cs.vstest.reportsPaths=$(Build.SourcesDirectory)/TestResults/UnitTests/*.trx
	  sonar.tsql.file.suffixes=sql,tsql
	  sonar.plsql.file.suffixes=pks,pkb
	  sonar.cpd.exclusions=**/EfTypeConfiguration/**/*.cs,**/company.Repository.ourniche/**/*,**/company.Service.ourniche/**/*,company.ourproject.Domain/**/*
- task: PublishTestResults@2
  displayName: 'Publish Unit Test Results'
  inputs:
	testResultsFormat: 'VSTest'
	testResultsFiles: '$(Build.SourcesDirectory)/TestResults/UnitTests/*.trx'
	mergeTestResults: true
	failTaskOnFailedTests: true
- script: |
	dotnet tool install --tool-path $(Build.SourcesDirectory)/TestResults/ReportGenerator dotnet-reportgenerator-globaltool --version 5.0.0
	$(Build.SourcesDirectory)/TestResults/ReportGenerator/reportgenerator "-reports:$(Build.SourcesDirectory)/**/coverage.opencover.xml" "-targetdir:$(Build.SourcesDirectory)/TestResults/CodeCoverage" "-reporttypes:HtmlInline_AzurePipelines_Dark;HtmlInline_AzurePipelines;Cobertura;SonarQube;"
  displayName: 'Create Code coverage report'
- task: PublishCodeCoverageResults@1
  displayName: 'Publish Code Coverage Results to Build Summary'
  inputs:
	codeCoverageTool: 'Cobertura'
	summaryFileLocation: '$(Build.SourcesDirectory)/**/Cobertura.xml'
	reportDirectory: '$(Build.SourcesDirectory)/TestResults/CodeCoverage'
- task: SonarCloudAnalyze@1
  displayName: 'Run SonarCloud analysis'
- task: SonarCloudPublish@1
  displayName: 'Publish SonarCloud Analysis Results on Build'
  inputs:
	pollingTimeoutSec: '300'

I did see the build go to 1.44 after the commit you pointed to, I thought there was an analyze 1.45 recently released from this page. VSTS-350 seemed like maybe it was possibly related to one of our issues, though truly was just hoping to rule out the easy “be on the latest version” before digging too deep.

Ultimately we are seeing two issues:

  1. Recently we’ve had sporadic builds fail code coverage despite it existing. Often times this would report as 0%. This happened again today
  2. There was a sudden dip in our overall coverage % on our master branch. We went from ~2k uncovered lines to ~11k, and we did not check in 9k lines of code. And as far as I can tell nothing from our configuration has changed either. Additionally, there have been a couple of random spikes back up to normal since the initial drop

Please let me know if any specific information is missing and I will work to provide it!

We may have narrowed it down to something else. Please ignore for now. Thank you for your time so far

1 Like