Skip to content

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

Open
benhillis wants to merge 1 commit intomasterfrom
user/benhill/collect_logs_tar_gz
Open

diagnostics: switch log archive from zip to tar.gz#14530
benhillis wants to merge 1 commit intomasterfrom
user/benhill/collect_logs_tar_gz

Conversation

@benhillis
Copy link
Copy Markdown
Member

This change moves from using Compress-Archive to the inbox tar.exe. Compress-Archive can fail for very large files, so this approach will be more reliable.

This change also requires an update to WTI which I've published here: OneBlue/wti#5

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Switches WSL diagnostics log archival from Compress-Archive (.zip) to tar.exe (.tar.gz) to improve reliability for very large log sets.

Changes:

  • Generate .tar.gz archives via tar.exe -czf instead of Compress-Archive
  • Add success/failure branching based on native exit code, including cleanup of partial archives
  • Improve user-facing messaging when compression fails

tar.exe -czf $logArchive $folder
if ($LASTEXITCODE -eq 0)
{
Remove-Item $folder -Recurse
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: I think we should fall back to zip if tar fails (in case this is ran on SKU's that might not have tar.exe)

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.

3 participants