Closed rochapablo closed 11 months ago
Any luck? Microsoft Purview is also facing the same issue.
Hi @shaileshsk94,
did you update from v8 of the task to v9? If so, could you please first try to go back to v8 and check if the issue occurs with this version as well? We haven't changed anything around the API calls, but it seems that the API does not return any coverage values anymore. I had at least one more internal report of this. I'm wondering if there was a change on the Azure DevOps side. I will include the AzDO Testing Tools team in our internal communication.
In the meantime, you can try to read the data manually by opening the following URL in your browser (please replace the placeholders):
https://dev.azure.com/{organization}/{project}/_apis/test/codecoverage?buildId=21448&flags=7
This is the API we use in BQC to read coverage values from Azure DevOps.
Hi @rochapablo,
I just realized that you are not a Microsoft employee (or at least I don't see an indicator here). Can you please check the same things I mentioned in my previous post?
Hi all,
the issue is caused by an accidentally introduced breaking change in the Azure DevOps backend that seems to have been deployed to rings zero (Microsoft internal) and one (South Brazil region). All other regions should not be affected by this. The product group has already created a fix and is preparing the deployment. I'll update the issue once I received confirmation that the issue has been resolved for everyone.
Thanks and sorry for all the inconvenience, René
Hi again,
according to our status page, the issue should now be fully mitigated and BQC should be able to read coverage data again. In addition, we are working on direct parsing of coverage data in our task. This would remove the dependency on the coverage APIs and allow more features like diff coverage, coverage evaluation on assembly/package, class, or method level, etc.
I'm closing this issue now. If you still experience the error, please comment on the closed issue or open a new one.
Hello @ReneSchumacher,
I tried version 9 and 8 but still with the same issue. I also tried to enable the "Treat 0/0 elements as 100%" option, but it takes about 10 minutes to complete with the following log.
...
Waiting for code coverage data...
Waiting for code coverage data...
Waiting for code coverage data...
[WARNING] Unable to get code coverage data within the maximum wait time.
##[warning]Unable to get code coverage data within the maximum wait time.
Total lines: 0
Covered lines: 0
Code Coverage (%): 100
Required Code Coverage (%): 34
[SUCCESS] Code coverage policy passed with 100% (0/0 lines).
Oh! I'm working from South of Brazil.
Hi @rochapablo,
this is a different issue. While the original issue was caused by a bug in the Azure DevOps API, this behavior shows that BQC simply didn't receive coverage data from the API even after retrying for ten minutes. Are you sure that your pipeline properly publishes coverage data? You can check the build summary page after the pipeline has finished. It must show a coverage value on the top right below the test pass rate:
If there is no value there, BQC won't be able to evaluate coverage as well.
Hello @ReneSchumacher,
Yes, the coverage it's been published:
2023-07-21T19:15:19.1774065Z ##[section]Starting: Publish Code Coverage
2023-07-21T19:15:19.1887941Z ==============================================================================
2023-07-21T19:15:19.1888077Z Task : Publish code coverage results v2
2023-07-21T19:15:19.1888151Z Description : Publish any of the code coverage results from a build
2023-07-21T19:15:19.1888264Z Version : 2.225.0
2023-07-21T19:15:19.1888323Z Author : Microsoft Corporation
2023-07-21T19:15:19.1888391Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/test/publish-code-coverage-results
2023-07-21T19:15:19.1888516Z ==============================================================================
2023-07-21T19:15:19.4601789Z Found 1 result(s) matching pattern: D:\a\1\s/coverlet/reports/Cobertura.xml
2023-07-21T19:15:19.4606454Z D:\a\1\s\coverlet\reports\Cobertura.xml
2023-07-21T19:15:19.4666265Z [command]"D:\a\_tasks\PublishCodeCoverageResults_2a7ebc54-c13e-490e-81a5-d7561ab7cd97\2.225.0\node_modules\coveragepublisher\CoveragePublisher\CoveragePublisher.Console.exe" D:\a\1\s\coverlet\reports\Cobertura.xml --reportDirectory D:\a\_temp\3e64f6cc-b672-4746-8a04-03f122ef032a --sourceDirectory D:\a\1\s/coverlet/reports
2023-07-21T19:15:22.3828809Z 2023-07-21T19:15:22: Loading report 'D:\a\1\s\coverlet\reports\Cobertura.xml' 1/1 in memory
2023-07-21T19:15:22.5349487Z 2023-07-21T19:15:22: Preprocessing report
2023-07-21T19:15:22.5407795Z 2023-07-21T19:15:22: Initiating parser for Cobertura
2023-07-21T19:15:22.5509122Z 2023-07-21T19:15:22: Current Assembly: ***
2023-07-21T19:15:22.6817013Z 2023-07-21T19:15:22: Finished parsing 'D:\a\1\s\coverlet\reports\Cobertura.xml' 1/1
2023-07-21T19:15:22.6818246Z 2023-07-21T19:15:22: Parsing of 1 files completed
2023-07-21T19:15:22.6818836Z 2023-07-21T19:15:22: Starting merging result 1
2023-07-21T19:15:22.6825062Z 2023-07-21T19:15:22: Finished merging result 1
2023-07-21T19:15:22.7200990Z 2023-07-21T19:15:22: Initializing report builders for report types: HtmlInline_AzurePipelines
2023-07-21T19:15:22.7260238Z 2023-07-21T19:15:22: Analyzing 218 classes
2023-07-21T19:15:22.7269052Z 2023-07-21T19:15:22: Creating report 1/218
...
2023-07-21T19:15:23.2769105Z 2023-07-21T19:15:23: Writing report file '***.22.html'
2023-07-21T19:15:23.2790668Z 2023-07-21T19:15:23: Creating summary
2023-07-21T19:15:23.2829152Z 2023-07-21T19:15:23: Writing report file 'D:\a\_temp\3e64f6cc-b672-4746-8a04-03f122ef032a\index.html'
2023-07-21T19:15:23.3571303Z Publishing file coverage data.
2023-07-21T19:15:24.3634431Z Publishing code coverage HTML report.
2023-07-21T19:15:24.3753280Z Uploading 221 files.
2023-07-21T19:15:29.3879254Z Total file: 221 ---- Processed file: 14 (6%).
2023-07-21T19:15:39.4019457Z Total file: 221 ---- Processed file: 46 (20%).
2023-07-21T19:15:50.3970174Z Total file: 221 ---- Processed file: 56 (25%).
2023-07-21T19:15:59.4379457Z Total file: 221 ---- Processed file: 79 (35%).
2023-07-21T19:16:09.4500764Z Total file: 221 ---- Processed file: 114 (51%).
2023-07-21T19:16:19.4798154Z Total file: 221 ---- Processed file: 152 (68%).
2023-07-21T19:16:29.4958758Z Total file: 221 ---- Processed file: 177 (80%).
2023-07-21T19:16:39.5054442Z Total file: 221 ---- Processed file: 198 (89%).
2023-07-21T19:16:44.5132788Z File upload succeed.
2023-07-21T19:16:44.6882975Z Published 'D:\a\_temp\3e64f6cc-b672-4746-8a04-03f122ef032a' as artifact 'Code Coverage Report_21750'.
2023-07-21T19:16:44.7200455Z ##[section]Finishing: Publish Code Coverage
And no, there's no value on the top right below the test pass rate. There was no change on my pipelines, it just stop working.
Hmm, this is strange. If the summary page does not show values, it seems like the coverage file was not processed by the coverage job in Azure DevOps. Does your Cobertura file have coverage values? And/or does the HTML report (you can download it from the artifacts) show coverage? If so, I guess you need to contact the Azure DevOps support (through the report an issue button in the user settings menu in the top right of Azure DevOps).
Internally, coverage has started working again (confirmed by several of our internal teams using BQC). So, I guess this shouldn't be a general service problem. But since South Brazil is a different deployment ring, there might be something different going on.
@ReneSchumacher, I changed the Publish code coverage results
to version 1 and it's working now.
Hm, interesting. I'll forward this to the Azure Devops teams, since I don't know if this is caused by the task itself or the Azure DevOps backend. Thanks for letting me know!
Describe the context
Describe the problem and expected behavior Tell us what you wanted to achieve and what unexpected behavior actually happened. Add any concrete error messages you see in your pipeline. Add any additional information or screenshots that describe your problem in more detail.
Yesterday it was running fine, but today it's getting the following error
Invalid null or undefined result
.Task logs Run your pipeline with the following variables:
System.Debug
andBQC.LogRawData
set totrue
System.Debug
set totrue
System.Debug
andPBC.LogRawData
set totrue
Send the task log to PSGerExtSupport@microsoft.com and reference your GitHub issue.
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.