Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REGRESSION]: PublishCodeCoverageResults@2 not generating branch coverage information #19669

Open
4 of 7 tasks
david-vankampen opened this issue Mar 21, 2024 · 13 comments
Open
4 of 7 tasks
Labels
bug regression This used to work, but a change in the service/tasks broke it. triage

Comments

@david-vankampen
Copy link

New issue checklist

Task name

PublishCodeCoverageResults

Breaking task version

1.236.1

Last working task version

1.231.0

Regression Description

When combined with the BuildQualityChecks@7 downstream, previously one would be able to enforce both line coverage AND branch coverage. Now, it reports 0% branch coverage.

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Ubuntu 22.04

Relevant log output

[WARNING] Coverage data does not include the requested coverage of type 'branches'. Please ensure that your coverage tool is able to report this type of coverage data!
##[warning]Coverage data does not include the requested coverage of type 'branches'. Please ensure that your coverage tool is able to report this type of coverage data!
Total branches: 0
Covered branches: 0
Code Coverage (%): 0
[ERROR] The code coverage value (0%, 0 branches) is lower than the minimum value (70%)!
##[error]The code coverage value (0%, 0 branches) is lower than the minimum value (70%)!


### Full task logs with system.debug enabled

_No response_

### Repro steps

_No response_
@david-vankampen david-vankampen added bug regression This used to work, but a change in the service/tasks broke it. labels Mar 21, 2024
@david-vankampen david-vankampen changed the title [REGRESSION]: PublishCodeCoverageResultsV2 not generating branch coverage information [REGRESSION]: PublishCodeCoverageResults@2 not generating branch coverage information Mar 21, 2024
@billzhang3046
Copy link

We are seeing the same issue today after we moved to PublishCodeCoverageResults@2. In the task log, there was no branch results:

Publishing coverage summary data.
line- 124 of 124 covered.
Publishing file coverage data.

The v1 published both line and branch results:

Publishing coverage summary data to TFS server.
Lines- 124 of 124 covered.
Branches- 28 of 28 covered.
Modifying Cobertura Index file
Publishing code coverage files to TFS server.
Uploading 7 files

@marcosolina
Copy link

Hi guys do we have any update on this? We are having the same issue, thanks

@moikot
Copy link

moikot commented May 2, 2024

I'm getting the following warning in every build:

##[warning]New V2 version of task publishing code coverage results is available to all our customers now. We highly recommend to stop using the V1 version and migrate to V2 version (https://learn.microsoft.com/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2). For more details, see - https://devblogs.microsoft.com/devops/new-pccr-task.

But how I suppose to switch to the new version if it doesn't work properly?

@Nitesh1730
Copy link

I am also facing a similar issue, in @1 version we were able to see line, branch and method coverage. but in @2 version we are only getting line coverage. By when we can expect this available in @2 version?

@Lucas3oo
Copy link

Lucas3oo commented May 6, 2024

Same for me and also with V1 I cloud check which methods that have coverage and see the source code also.

@jeffyoung
Copy link
Contributor

What do we need to do to get this actually on the product backlog? I've already rolled back to v1 which implores you to upgrade to v2. If you've moved on to GitHub actions, fine. But at least address regressions.

@atahanceylan
Copy link

atahanceylan commented May 28, 2024

we are having the same issue. when I migrate v2, no branch coverage created. rolled back my changes until v2 version have a branch coverage.

@cmconti
Copy link

cmconti commented Jun 11, 2024

No branch coverage, no drill down to see the uncovered lines/branches (see #19939)

@iansalazar444
Copy link

Just wanted to jump on this to let everyone know - branch coverage is still not displayed for v2

@syre
Copy link

syre commented Aug 22, 2024

We are having the same issue, when in the "Code Coverage" tab drilldown into files does not work to see line/branch coverage.
However when downloading the "Code Coverage Report" from "artifacts", drilldown works just fine.

@ahsonkhan
Copy link
Member

What @syre described is our exact same experience for us on the Azure SDK for C++ CI pipelines (from this project).

@denravonska
Copy link

Can you at least roll back the deprecation warning until you've solved this?

@gioce90
Copy link

gioce90 commented Oct 28, 2024

There are any news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug regression This used to work, but a change in the service/tasks broke it. triage
Projects
None yet
Development

No branches or pull requests