-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Use Helix ListFiles endpoint to work around dnceng#6072 #124199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The Helix work item Details API returns incorrect file URIs for files in subdirectories (path flattening) and rejects unicode characters in filenames. The separate ListFiles endpoint returns direct blob storage URIs that work for all filenames. Replace the previous workaround (reconstructing permalink URIs from FileName) with a call to ListFiles, which completely bypasses both the subdirectory and unicode bugs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates the CI analysis skill’s Helix artifact retrieval to avoid broken file URIs returned by the Helix work item Details endpoint (dnceng#6072), switching to the ListFiles endpoint to obtain direct blob storage links that preserve subdirectories and support unicode filenames.
Changes:
- Add
Get-HelixWorkItemFilesto call the Helix.../workitems/{name}/files(ListFiles) endpoint. - Replace
Filesfrom the Details response with ListFiles results (Name/Link→FileName/Uri). - Update the Helix artifacts reference doc to describe the new workaround and the unicode/subdirectory issues.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/skills/ci-analysis/scripts/Get-CIStatus.ps1 | Adds ListFiles retrieval and swaps the work item Files list to use blob URIs. |
| .github/skills/ci-analysis/references/helix-artifacts.md | Updates documentation to describe the ListFiles-based workaround and the underlying Helix bug behavior. |
Comments suppressed due to low confidence (1)
.github/skills/ci-analysis/scripts/Get-CIStatus.ps1:1383
Get-HelixWorkItemDetailsbuilds the Details URL using$WorkItemNamewithout URL-encoding, whileGet-HelixWorkItemFilescorrectly usesEscapeDataString. If a work item name contains characters that must be escaped (spaces,+,#, unicode, etc.), the Details request can fail or target the wrong resource. Encode the work item segment the same way as inGet-HelixWorkItemFiles(ideally compute once and reuse for both endpoints).
$url = "https://helix.dot.net/api/2019-06-17/jobs/$JobId/workitems/$WorkItemName"
- helix-artifacts.md: Change {id} to {workItemName} for consistency
- Get-CIStatus.ps1: URL-encode WorkItemName in Get-HelixWorkItemDetails
to match Get-HelixWorkItemFiles (unicode/special char safety)
|
Also opened AzDO PR #57709 to fix the server-side bug in dotnet-helix-service (dotnet/dnceng#6072). That fix passes |
Summary
Work around dotnet/dnceng#6072 in the CI analysis skill by using the Helix \ListFiles\ endpoint instead of file URIs from the \Details\ endpoint.
Problem
The Helix work item Details API (\GET .../workitems/{id}) has two bugs in its \Files[].Uri\ values:
The previous workaround reconstructed permalink URIs from the \FileName\ field, but this still routed through the broken /files/\ endpoint which rejects unicode.
Fix
Use the separate \ListFiles\ endpoint (\GET .../workitems/{id}/files) which returns direct blob storage URIs. These URIs:
Verified against PR #124125 CI artifacts: 53 files with unicode paths all return HTTP 200 via ListFiles blob URIs, vs broken/colliding URIs from the Details endpoint.