Repository navigation
Helix reporter: add portable JSON output - #16774
Conversation
- Add _helix_compat.py: dependency-free shim providing TestResult, TestResultAttachment, AzureDevOpsReportingParameters and a JsonReporter that writes a schema-versioned JSON results file ($HELIX_WORKITEM_ROOT/__test_report_v2.json). - All reporter modules try 'from helix.public import ...' first and fall back to the bundled shim if helix-scripts is not installed on the machine. This unblocks Helix client implementations (e.g. AOT) that do not ship the helix-scripts venv. - run.py: when helix-scripts is available, the legacy pickle file is written exactly as before (byte-identical for existing consumers). The new JSON file is written unconditionally alongside, providing a language-neutral wire format consumable from non-Python clients. - No change to AzurePipelines.MonoQueue.targets or the reporter argv contract; existing builds and machines see no behavioral difference.
|
contributes to #16775 |
mmitche
left a comment
There was a problem hiding this comment.
I think this looks pretty reasonable with good fallbacks. I'm not super familiar with the pickle file though:
My main question would be about rollout. I think this puts the onus on repos taking a Helix update in order to get a working set of tests as the helix scripts become unavailable on the agent. Do you have a rollout plan? What about downlevel support?
|
There is more reading about Pickle here: https://docs.python.org/3/library/pickle.html My plan is to test "main" from Helix & runtime with this and dotnet/dotnet-buildtools-prereqs-docker#1647 e.g. verify that we can submit results from containers without Helix-scripts. And verify new Helix client to make sure everything works as expected. I think we will want to flow this to servicing eventually but I would try to get confidence about completeness first. I think we are still far from retiring the Python Helix completely but this will give us good testing ground. |
The current format use Python's Pickle that is not portable. The reported also depends on helix scripts that may or may not be present any more. This change preserves the existing Pickle serialization when possible but it makes it optional. It adds portable JSON serialaizaion that can be consume by anyone in any language.