Skip to content
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

[eas-cli] Raise threshold for "big tarball" warning #2878

Merged
merged 3 commits into from
Feb 5, 2025

Conversation

sjchmiela
Copy link
Contributor

Why

Adding .git directory to the tarball makes it bigger. Users notice this warning and want it to be actionable, but currently adding .git to .easignore does nothing.

How

For now, raise threshold for warning from 100 MiB to 150 MiB. In the next pull request I'm going to fix .git exclusion via .easignore.

Test Plan

CI should pass.

@sjchmiela sjchmiela requested a review from szdziedzic February 5, 2025 09:54
Copy link

github-actions bot commented Feb 5, 2025

Subscribed to pull request

File Patterns Mentions
**/* @szdziedzic, @khamilowicz, @radoslawkrzemien

Generated by CodeMention

Copy link

github-actions bot commented Feb 5, 2025

Size Change: +1.4 kB (0%)

Total Size: 53.4 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 53.4 MB +1.4 kB (0%)

compressed-size-action

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 10 lines in your changes missing coverage. Please review.

Project coverage is 52.41%. Comparing base (98344b8) to head (242f949).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/eas-cli/src/build/utils/repository.ts 40.00% 4 Missing and 2 partials ⚠️
packages/eas-cli/src/build/build.ts 0.00% 2 Missing ⚠️
...c/project/uploadAccountScopedProjectSourceAsync.ts 33.34% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2878      +/-   ##
==========================================
+ Coverage   52.41%   52.41%   +0.01%     
==========================================
  Files         588      588              
  Lines       23164    23169       +5     
  Branches     4853     4851       -2     
==========================================
+ Hits        12139    12142       +3     
- Misses      10049    10053       +4     
+ Partials      976      974       -2     

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

@sjchmiela sjchmiela added the no changelog PR that doesn't require a changelog entry label Feb 5, 2025
Comment on lines 44 to 45
if (projectTarball.size > 2 * 1024 * 1024 * 1024) {
throw new Error('Project archive is too big. Maximum allowed size is 2GB.');
Copy link
Member

Choose a reason for hiding this comment

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

do we want to move it as well to separate function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

const MAX_ALLOWED_PROJECT_TARBALL_SIZE =
2 /* GiB */ * 1024 /* MiB */ * 1024 /* KiB */ * 1024; /* B */
export function assertProjectTarballSizeDoesNotExceedLimit(size: number): void {
if (size <= MAX_ALLOWED_PROJECT_TARBALL_SIZE) {
return;
}
throw new Error(
`Project archive is too big. Maximum allowed size is ${formatBytes(
MAX_ALLOWED_PROJECT_TARBALL_SIZE
)}.`
);
}

@sjchmiela sjchmiela force-pushed the stanley/raise-big-tarball-size-threshold branch from 4968bc1 to 242f949 Compare February 5, 2025 10:28
Copy link

github-actions bot commented Feb 5, 2025

⏩ The changelog entry check has been skipped since the "no changelog" label is present.

@sjchmiela sjchmiela merged commit 1b40c1c into main Feb 5, 2025
10 checks passed
@sjchmiela sjchmiela deleted the stanley/raise-big-tarball-size-threshold branch February 5, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog PR that doesn't require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants