[build-tools] - Fix tar extraction permission errors by not preserving archive file modes#3663
Closed
AbbanMustafa wants to merge 1 commit intomainfrom
Closed
[build-tools] - Fix tar extraction permission errors by not preserving archive file modes#3663AbbanMustafa wants to merge 1 commit intomainfrom
AbbanMustafa wants to merge 1 commit intomainfrom
Conversation
…g archive file modes
|
Subscribed to pull request
Generated by CodeMention |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3663 +/- ##
=======================================
Coverage 55.87% 55.87%
=======================================
Files 868 868
Lines 37545 37545
Branches 7835 7835
=======================================
Hits 20973 20973
Misses 16474 16474
Partials 98 98 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
⏩ The changelog entry check has been skipped since the "no changelog" label is present. |
Contributor
sjchmiela
added a commit
that referenced
this pull request
May 4, 2026
<!-- If this PR requires a changelog entry, add it by commenting the PR with the command `/changelog-entry [breaking-change|new-feature|bug-fix|chore] [message]`. --> <!-- You can skip the changelog check by labeling the PR with "no changelog". --> # Why Project archives created on one platform can be extracted on another platform with incompatible metadata or mode bits. In particular, Windows read-only directories can be represented as read-only POSIX directories in the tarball, which can make worker extraction fail when child files need to be created. Using `portable: true` consistently also strips owner/group metadata and avoids making Windows a special case. Supersedes the approach in #3489 and avoids changing worker extraction as proposed in #3663. # How Create project tarballs with `portable: true` on all platforms. # Test Plan - `yarn workspace eas-cli test src/build/utils/__tests__/repository.test.ts` - `yarn workspace eas-cli typecheck` - `yarn run -T oxfmt CHANGELOG.md packages/eas-cli/src/build/utils/repository.ts packages/eas-cli/src/build/utils/__tests__/repository.test.ts`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Why
We observe a trend of multiple builds failing during the PREPARE_PROJECT phase with errors like
These failures are intermittent, the same app succeeds on retry with a different worker. The root cause is that some user project archives contain files with restrictive permissions, and tar preserves those modes on extraction. When a directory is extracted with read-only permissions, tar can't write files into it during the same extraction pass.
How
--no-same-permissionsflag to tar extraction to apply the umask instead of preserving archive permission bits https://man7.org/linux/man-pages/man1/tar.1.html duringPREPARE_PROJECTphaseTest Plan