Skip to content

Surface failing crossgen2 comparison dlls in the Helix work item file list#129605

Merged
jtschuster merged 7 commits into
mainfrom
copilot/improve-crossgen2-diagnosability
Jul 2, 2026
Merged

Surface failing crossgen2 comparison dlls in the Helix work item file list#129605
jtschuster merged 7 commits into
mainfrom
copilot/improve-crossgen2-diagnosability

Conversation

Copilot AI commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

When the crossgen2 comparison test fails, the base/diff .ni.dll artifacts were copied to HELIX_DUMP_FOLDER, which is only surfaced when crash dumps exist — making the dlls hard to find from a failing test.

Changes (src/tests/Common/scripts/crossgen2_comparison.py)

  • Renamed copy_artifacts_to_dump_foldercopy_artifacts_to_upload_root and switched the destination from HELIX_DUMP_FOLDER to HELIX_WORKITEM_UPLOAD_ROOT, so artifacts land in the work item's always-visible Files list.
  • The function now returns the uploaded basenames (base_*.ni.dll, diff_*.ni.dll).
  • On a mismatch, the failing test's <output> is augmented to name the uploaded files, so the AzDO Tests-tab failure text points directly at what to download.
  • Preserved the path-traversal guard on the JSON-sourced assembly_name, per-file existence checks, and OSError handling (now returning [] so the message degrades gracefully).

The <message> text is unchanged; only <output> gains the file list.

Note for review

The diff .ni.dll already exists under HELIX_WORKITEM_UPLOAD_ROOT (written there as result_dir), so the diff_-prefixed copy is a small duplication. It's kept so base_/diff_ sit side-by-side with matching names for comparison — open to dropping it to save upload size.

Co-authored-by: jtschuster <36744439+jtschuster@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot June 19, 2026 03:32
Copilot AI changed the title [WIP] Improve diagnosability of Crossgen2 comparison job failures Improve diagnosability of Crossgen2 comparison job failures Jun 19, 2026
Copilot AI requested a review from jtschuster June 19, 2026 03:34
@github-actions github-actions Bot added the area-crossgen2-coreclr only use for closed issues label Jun 19, 2026
Copilot AI review requested due to automatic review settings June 19, 2026 16:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves diagnosability for Crossgen2 comparison failures in Helix by copying the produced native/ReadyToRun images for failing assemblies into HELIX_DUMP_FOLDER, ensuring the lab infrastructure reliably uploads the artifacts for offline investigation.

Changes:

  • Added a copy_artifacts_to_dump_folder helper that copies *.ni.dll outputs (when present) from both base and diff result directories into the Helix dump folder.
  • Invoked artifact copying from compare_results for mismatch/return-code failures and for “omitted from base/diff” failure modes (NativeOrReadyToRunImage only).
  • Made the behavior a no-op when HELIX_DUMP_FOLDER is unset and resilient to I/O errors (caught and logged).

Comment thread src/tests/Common/scripts/crossgen2_comparison.py Outdated
Comment thread src/tests/Common/scripts/crossgen2_comparison.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 19, 2026 16:59
@jtschuster jtschuster added area-ReadyToRun and removed area-crossgen2-coreclr only use for closed issues labels Jun 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread src/tests/Common/scripts/crossgen2_comparison.py Outdated
Comment thread src/tests/Common/scripts/crossgen2_comparison.py Outdated
Co-authored-by: jtschuster <36744439+jtschuster@users.noreply.github.com>
Co-authored-by: jtschuster <36744439+jtschuster@users.noreply.github.com>
Copilot AI changed the title Improve diagnosability of Crossgen2 comparison job failures Surface failing crossgen2 comparison dlls in the Helix work item file list Jun 29, 2026
@jtschuster

Copy link
Copy Markdown
Member

/azp run runtime-coreclr crossgen2 outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jtschuster
jtschuster marked this pull request as ready for review June 30, 2026 17:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread src/tests/Common/scripts/crossgen2_comparison.py
@jtschuster

Copy link
Copy Markdown
Member

/ba-g unrelated timeout

@jtschuster
jtschuster merged commit 606d901 into main Jul 2, 2026
129 of 133 checks passed
@jtschuster
jtschuster deleted the copilot/improve-crossgen2-diagnosability branch July 2, 2026 16:51
@github-project-automation github-project-automation Bot moved this to Done in AppModel Jul 2, 2026
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 3, 2026
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
… list (#129605)

When the crossgen2 comparison test fails, the base/diff `.ni.dll`
artifacts were copied to `HELIX_DUMP_FOLDER`, which is only surfaced
when crash dumps exist — making the dlls hard to find from a failing
test.

### Changes (`src/tests/Common/scripts/crossgen2_comparison.py`)
- Renamed `copy_artifacts_to_dump_folder` →
`copy_artifacts_to_upload_root` and switched the destination from
`HELIX_DUMP_FOLDER` to `HELIX_WORKITEM_UPLOAD_ROOT`, so artifacts land
in the work item's always-visible Files list.
- The function now returns the uploaded basenames (`base_*.ni.dll`,
`diff_*.ni.dll`).
- On a mismatch, the failing test's `<output>` is augmented to name the
uploaded files, so the AzDO Tests-tab failure text points directly at
what to download.
- Preserved the path-traversal guard on the JSON-sourced
`assembly_name`, per-file existence checks, and `OSError` handling (now
returning `[]` so the message degrades gracefully).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jtschuster <36744439+jtschuster@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[CoreCLR Infrastructure] Improve diagnosability of Crossgen2 comparison job failures

4 participants