diagnostics: switch log archive from zip to tar.gz (#14530)

* diagnostics: switch log archive from zip to tar.gz * Fall back to zip if tar.exe fails Some Windows SKUs may not have tar.exe available. Fall back to Compress-Archive (zip) when tar fails, so log collection still works in those environments. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update WTI to v0.2 for tar.gz archive support The new WTI release adds support for tar.gz log archives, matching the format change in collect-wsl-logs.ps1. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Ben Hillis committed Apr 28, 2026 at 09:06 UTC 6aa0b0d2858788431c2729f7479e298c06408b83
2 files changed +25 -5
.github/actions/triage/action.yml
+1 -1
@@ -41,6 +41,6 @@ runs:
41 $maybe_previous_body = @("--previous-issue-body", "previous_body.txt")
42 }
43
44 - curl.exe -L https://github.com/OneBlue/wti/releases/download/v0.1.12/wti.exe -o triage/wti.exe
44 + curl.exe -L https://github.com/OneBlue/wti/releases/download/v0.2/wti.exe -o triage/wti.exe
45
46 cd triage && .\wti.exe --issue $env:INPUT_ISSUE --config config.yml --github-token $env:INPUT_TOKEN --ignore-tags @maybe_comment @maybe_previous_body
\ No newline at end of file
diagnostics/collect-wsl-logs.ps1
+24 -4
@@ -373,8 +373,28 @@ if ($Dump)
373 }
374 }
375
376 -$logArchive = "$(Resolve-Path $folder).zip"
377 -Compress-Archive -Path $folder -DestinationPath $logArchive
378 -Remove-Item $folder -Recurse
376 +$logArchive = "$(Resolve-Path $folder).tar.gz"
377 +tar.exe -czf $logArchive $folder
378 +if ($LASTEXITCODE -eq 0)
379 +{
380 + Remove-Item $folder -Recurse
381 + Write-Host -ForegroundColor Green "Logs saved in: $logArchive. Please attach that file to the GitHub issue."
382 +}
383 +else
384 +{
385 + Remove-Item $logArchive -ErrorAction Ignore
386
380 -Write-Host -ForegroundColor Green "Logs saved in: $logArchive. Please attach that file to the GitHub issue."
387 + # Fall back to zip if tar fails (e.g. on SKUs that lack tar.exe)
388 + $logArchive = "$(Resolve-Path $folder).zip"
389 + try
390 + {
391 + Compress-Archive -Path $folder -DestinationPath $logArchive -Force
392 + Remove-Item $folder -Recurse
393 + Write-Host -ForegroundColor Green "Logs saved in: $logArchive. Please attach that file to the GitHub issue."
394 + }
395 + catch
396 + {
397 + Remove-Item $logArchive -ErrorAction Ignore
398 + Write-Host -ForegroundColor Red "Failed to compress logs. They are available in: $(Resolve-Path $folder)"
399 + }
400 +}