-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
Task: PublishCodeCoverageResultsbugregressionThis used to work, but a change in the service/tasks broke it.This used to work, but a change in the service/tasks broke it.triage
Description
New issue checklist
- I searched for existing GitHub issues
- I read pipeline troubleshooting guide
- I checked how to collect logs
Task name
PublishCodeCoverageResults
Breaking task version
2.235.0
Last working task version
1.228.0
Regression Description
When the code coverage results are missing (no files)
and the config option is set to failIfCoverageEmpty: false
the task does throws an error.
This worked perfectly in V1.xx
The manual clearly states that this should only happen when failIfCoverageEmpty : true
https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2?view=azure-pipelines
#failIfCoverageEmpty: false # boolean. Fail if code coverage results are missing. Default: false.
Environment type (Please select at least one enviroment where you face this issue)
- Self-Hosted
- Microsoft Hosted
- VMSS Pool
- Container
Azure DevOps Server type
Azure DevOps Server (Please specify exact version in the textbox below)
Azure DevOps Server Version (if applicable)
Azure DevOps Server 2022.2
Operation system
Windows
Relevant log output
#[warning]No code coverage results were found to publish.
##[warning]Can't find loc string for key: NoInputFiles
##[error]NoInputFilesFull task logs with system.debug enabled
UNSUCCESSFUL RUN
##[debug]statOnly: 'false' ##[debug]findPath: 'D:\buildagent1\_work\_temp' ##[debug]findOptions.allowBrokenSymbolicLinks: 'false' ##[debug]findOptions.followSpecifiedSymbolicLink: 'false' ##[debug]findOptions.followSymbolicLinks: 'false' ##[debug]findOptions.skipMissingFiles: 'undefined' ##[debug] D:\buildagent1\_work\_temp (directory) ##[debug] D:\buildagent1\_work\_temp\.taskkey (file) ##[debug] D:\buildagent1\_work\_temp\188d28dc-9beb-44aa-a0cf-f9ba7ac60b07.ps1 (file) ##[debug] D:\buildagent1\_work\_temp\5b549756-d9cb-4d34-acd8-df1e8b455b74.ps1 (file) ##[debug] D:\buildagent1\_work\_temp\82307873-7bd2-4395-9617-a4dc8af828d3.ps1 (file) ##[debug] D:\buildagent1\_work\_temp\a5e77a59-6ca4-4870-b184-934f45161d2e.ps1 (file) ##[debug] D:\buildagent1\_work\_temp\b08c28c2-09ce-4f8e-9423-e11f149b2705.ps1 (file) ##[debug] D:\buildagent1\_work\_temp\ebe22e6c-bbbd-4654-a16b-e66796a9181c.ps1 (file) ##[debug]8 results ##[debug]found 8 paths ##[debug]applying include pattern ##[debug]0 matches ##[debug]0 final results Found 0 result(s) matching pattern: D:\buildagent1\_work\_temp/**/coverage.cobertura.xml ##[warning]No code coverage results were found to publish. ##[debug]Processed: ##vso[task.issue type=warning;]No code coverage results were found to publish. ##[debug]Agent.Version=3.238.0 ##[debug]Agent.TempDirectory=D:\buildagent1\_work\_temp ##[warning]Can't find loc string for key: NoInputFiles ##[debug]Processed: ##vso[task.issue type=warning;]Can't find loc string for key: NoInputFiles ##[debug]task result: Failed ##[error]NoInputFiles ##[debug]Processed: ##vso[task.issue type=error;]NoInputFiles ##[debug]Processed: ##vso[task.complete result=Failed;]NoInputFiles Finishing: PublishCodeCoverageResults
SUCCESSFUL RUN
##[debug]matchOptions.nonull: 'false' ##[debug]matchOptions.matchBase: 'false' ##[debug]matchOptions.nocomment: 'false' ##[debug]matchOptions.nonegate: 'false' ##[debug]matchOptions.flipNegate: 'false' ##[debug]pattern: 'D:\buildagent1\_work\_temp/**/coverage.cobertura.xml' ##[debug]findPath: 'D:\buildagent1\_work\_temp' ##[debug]statOnly: 'false' ##[debug]findPath: 'D:\buildagent1\_work\_temp' ##[debug]findOptions.allowBrokenSymbolicLinks: 'false' ##[debug]findOptions.followSpecifiedSymbolicLink: 'false' ##[debug]findOptions.followSymbolicLinks: 'false' ##[debug]findOptions.skipMissingFiles: 'undefined' ##[debug] D:\buildagent1\_work\_temp (directory) ##[debug] D:\buildagent1\_work\_temp\.taskkey (file) ##[debug] D:\buildagent1\_work\_temp\3111a174-5644-4ef5-9041-36ef9ab5dff5.ps1 (file) ##[debug] D:\buildagent1\_work\_temp\41cfaa5e-aad8-44ae-b8f4-00e5b82e3ada.ps1 (file) ##[debug] D:\buildagent1\_work\_temp\47d8426d-3b8f-4186-b72b-498dd540007d.ps1 (file) ##[debug] D:\buildagent1\_work\_temp\8113e874-8303-4f71-9ed4-173be2e83502.ps1 (file) ##[debug] D:\buildagent1\_work\_temp\d80f0eb0-92b3-46c6-a752-4f78d4abf58a.ps1 (file) ##[debug] D:\buildagent1\_work\_temp\f3a17acb-810c-4fe2-8ea7-66b91a8dc4f1.ps1 (file) ##[debug]8 results ##[debug]found 8 paths ##[debug]applying include pattern ##[debug]0 matches ##[debug]0 final results ##[debug]Found 0 result(s) matching pattern: D:\buildagent1\_work\_temp/**/coverage.cobertura.xml ##[debug]Resolved summary file: undefined ##[warning]No code coverage results were found to publish. ##[debug]Processed: ##vso[task.issue type=warning;]No code coverage results were found to publish. Finishing: PublishCodeCoverageResults
Repro steps
trigger:
- master
pool:
vmImage: ubuntu-latest
steps:
- script: echo Do nothing!
- task: PublishCodeCoverageResults@2
inputs:
summaryFileLocation: $(Agent.TempDirectory)/**/coverage.cobertura.xmlMetadata
Metadata
Assignees
Labels
Task: PublishCodeCoverageResultsbugregressionThis used to work, but a change in the service/tasks broke it.This used to work, but a change in the service/tasks broke it.triage