Skip to content

Helix reporter: add portable JSON output - #16774

Merged
wfurt merged 2 commits into
mainfrom
wfurt/reporter
May 4, 2026
Merged

wfurt merged 2 commits into
mainfrom
wfurt/reporter

Conversation

@wfurt

@wfurt wfurt commented May 1, 2026

Copy link
Copy Markdown
Member

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.

wfurt added 2 commits April 30, 2026 22:11
- 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.
@wfurt

wfurt commented May 1, 2026

Copy link
Copy Markdown
Member Author

contributes to #16775

@wfurt
wfurt requested a review from mmitche May 4, 2026 17:34

@mmitche mmitche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@wfurt

wfurt commented May 4, 2026

Copy link
Copy Markdown
Member Author

There is more reading about Pickle here: https://docs.python.org/3/library/pickle.html
According to copilot, the HelixSDK includes everything in report/* so we should see the combat classes available.

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.

@wfurt
wfurt merged commit a770322 into main May 4, 2026
13 checks passed
@wfurt
wfurt deleted the wfurt/reporter branch May 4, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants