Skip to content

[eas-cli] clean up build inspect temp directory#3981

Open
szdziedzic wants to merge 3 commits into
mainfrom
szdziedzic-codex/cleanup-build-inspect-temp-dir
Open

[eas-cli] clean up build inspect temp directory#3981
szdziedzic wants to merge 3 commits into
mainfrom
szdziedzic-codex/cleanup-build-inspect-temp-dir

Conversation

@szdziedzic

@szdziedzic szdziedzic commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Why

eas build:inspect disables local-build-plugin cleanup so the CLI can copy the inspectable build output into the requested output directory. Once tmpWorkingdir/build has been copied, the parent temp working directory no longer needs to stick around. Leaving it behind wastes disk space, especially after failed inspect runs.

How

  • Remove the command-owned temp working directory after copyToOutputDirAsync succeeds.
  • Preserve the temp working directory if copying the inspect output fails, so the only inspectable state is not deleted.
  • Warn and continue if the final temp cleanup itself fails.
  • Add regression coverage for failed builds and copy failures, plus a changelog entry.

Test Plan

  • corepack yarn typecheck
  • corepack yarn --cwd packages/eas-cli test src/commands/build/__tests__/inspect.test.ts --runInBand
  • corepack yarn fmt:check
  • corepack yarn lint-changelog

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.40%. Comparing base (081e1a9) to head (9190422).

Files with missing lines Patch % Lines
packages/eas-cli/src/commands/build/inspect.ts 66.67% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3981      +/-   ##
==========================================
+ Coverage   59.33%   59.40%   +0.08%     
==========================================
  Files         936      936              
  Lines       41172    41178       +6     
  Branches     8671     8671              
==========================================
+ Hits        24424    24457      +33     
+ Misses      16654    16627      -27     
  Partials       94       94              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@szdziedzic szdziedzic requested review from Copilot and tsapeta July 7, 2026 11:45

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@szdziedzic szdziedzic marked this pull request as ready for review July 7, 2026 11:45
@szdziedzic szdziedzic requested a review from douglowder July 7, 2026 11:45
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder
packages/eas-cli/src/commands/build/** @sjchmiela

Generated by CodeMention

Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead.

@szdziedzic szdziedzic requested a review from sjchmiela July 7, 2026 11:47
@szdziedzic szdziedzic changed the title Clean up build inspect temp directory [eas-cli] clean up build inspect temp directory Jul 7, 2026
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