-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Describe the context
- Extension:
- BuildQualityChecks
- Environment: are you using Azure DevOps Services (cloud) or Azure DevOps/Team Foundation Server (on-prem)?
- Azure DevOps
- Server version: if you are running on-prem, specify the version of your Azure DevOps or Team Foundation Server
- Agent type: are you running on a Microsoft-hosted or self-hosted agent? (not sure, how can I find that?)
- Self hosted
- Agent version: if you are running a self-hosted agent, specify its version
- Pipeline type: are you using the task in a classic build, class release, or yaml pipeline?
- Yaml pipeline
Describe the problem and expected behavior
We are trying to gate our PRs with the BuildQualityChecks
- task: BuildQualityChecks@8
displayName: "Check Code Coverage Regression"
condition: always()
inputs:
checkCoverage: true
coverageFailOption: "build"
coverageType: "lines"
fallbackOnPRTargetBranch: false
baseBranchRef: "master"
allowCoverageVariance: true
coverageVariance: 0.25However, we are seeing a discrepency with the check
We basically see that in ADO output for the task, the totalLines does not match the CodeCoverage report on the build, the total lines is about ~13,000
Pipeline ID: 231094
Build ID: 121023094
Evaluating coverage data from 1 filtered code coverage data sets...
Total lines: 13776
Covered lines: 7004
Code Coverage (%): 50.842
Found baseline build with ID 120928460.
Successfully read code coverage data from build.
Evaluating coverage data from 1 filtered code coverage data sets...
Total lines: 13774
Covered lines: 7002
Code Coverage (%): 50.8349
[SUCCESS] Code coverage policy passed with 50.842% (7004/13776 lines).But in the Code Coverage tab it shows as ~31,000 lines total

We also see, that the baseline run id of 120928460, the baseline used ~31,000 lines as the total..
Evaluating coverage data from 1 filtered code coverage data sets...
Total lines: 31430
Covered lines: 14996
Code Coverage (%): 47.7124
[WARNING] Forcing a new baseline because variable BQC.ForceNewBaseline is set to true. All policies based on the previous build will passTask logs
Run your pipeline with the following variables:
- For BuildQualityChecks:
System.DebugandBQC.LogRawDataset totrue - For CreateWorkItem:
System.Debugset totrue - For PostBuildCleanup:
System.DebugandPBC.LogRawDataset totrue
Send the task log to PSGerExtSupport@microsoft.com and reference your GitHub issue.
Will do
Attention: The log file may contain sensitive data (e.g., server or organization names, project names, variable information). Please do not attach the log to your GitHub issue and or remove the information from the log file before attaching or sending.