Fix Azure Devops Reporter : new change assumes Python 3.6+#7438
Conversation
|
Hrm... Perhaps we should include a testing queue that has a minimum version of python in the matrix so that people stop making this mistake? :-) |
We already do, it's Debian 9. This code path wasn't hit by non-remote-executor test paths. |
|
It has uploaders for all the various formats. Isn't the path just... "I ran XUnit"? Or am I misunderstanding the issue? |
by code path, I mean it has to not return on https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.Helix/Sdk/tools/azure-pipelines/reporter/formats/xunit.py#L26 and hit https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.Helix/Sdk/tools/azure-pipelines/reporter/formats/xunit.py#L27 to reproduce the bug. |
|
Oohhhh!. It's "fake" XUnit stuff isn't fake enough. It doesn't have the bad escaping in it. Could we add one? |
|
Wait, it doesn't have a fake XUnit file... Now I'm extra confused. It has JUnit and TRX. Maybe one of the "real" tests needs to include a newline? |
…ntioned changes introduce a python 3.6-ism. The fix is simply to access the RegEx's groups via the older method in all cases.
…rs in it like we do with JUnit and XUnit
|
@ChadNedzlek took some wrangling but I think I got it. I had to make a testResults.xml and include it like the JUnit/ TRX parts since a real failing xunit test in Arcade (as I opine it should) fails the work item and thus the job. |

It seems we don't test this codepath in default test runs, and the mentioned changes introduce a python 3.6-ism. The fix is simply to access the RegEx's groups via the older method in all cases.
To double check:
I'm validating this fix via both testing on python 3.5 in a Debian docker container (already done) and via applying my change on top of the commit that is the source of the failure via draft PR: #7437