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

Fixing out of memory using pack builder create on pack 0.30.0 #1887

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

jjbustamante
Copy link
Member

@jjbustamante jjbustamante commented Sep 5, 2023

Summary

This PR replaces the uses of io.ReadAll() when processing a tarball file for io.Copy and avoid trying to load a huge file in memory

Output

Before

Running pack builder create with a buildpack containing a 4GB file on a host machine with limited memory (2GB) throws

Creating builder with the following buildpacks:
-> samples/[email protected]
-> samples/[email protected]
-> samples/[email protected]
-> [email protected]
-> samples/[email protected]
-> samples/[email protected]
-> samples/[email protected]
Killed

Status code: 137

After

The builder was created successfully

Documentation

  • Should this change be documented?
    • Yes, see #___
    • No

Related

Resolves #1886

@github-actions github-actions bot added the type/enhancement Issue that requests a new feature or improvement. label Sep 5, 2023
@github-actions github-actions bot added this to the 0.31.0 milestone Sep 5, 2023
@jjbustamante jjbustamante modified the milestones: 0.31.0, 0.30.1 Sep 5, 2023
@jjbustamante jjbustamante force-pushed the bugfix/jjbustamante/issue-1886 branch from f5b9076 to 241739e Compare September 6, 2023 14:33
@github-actions github-actions bot modified the milestones: 0.30.1, 0.31.0 Sep 6, 2023
@jjbustamante jjbustamante modified the milestones: 0.31.0, 0.30.1 Sep 6, 2023
@jjbustamante jjbustamante force-pushed the bugfix/jjbustamante/issue-1886 branch from 241739e to 6e6d2a4 Compare September 6, 2023 16:52
@github-actions github-actions bot modified the milestones: 0.30.1, 0.31.0 Sep 6, 2023
@jjbustamante jjbustamante marked this pull request as ready for review September 6, 2023 17:01
@jjbustamante jjbustamante requested review from a team as code owners September 6, 2023 17:01
@jjbustamante jjbustamante modified the milestones: 0.31.0, 0.30.1 Sep 6, 2023
@jkutner jkutner enabled auto-merge September 6, 2023 17:10
@github-actions github-actions bot modified the milestones: 0.30.1, 0.31.0 Sep 6, 2023
@jjbustamante jjbustamante modified the milestones: 0.31.0, 0.30.1 Sep 6, 2023
@jjbustamante jjbustamante force-pushed the bugfix/jjbustamante/issue-1886 branch from d929148 to a7e8c52 Compare September 6, 2023 20:14
@github-actions github-actions bot modified the milestones: 0.30.1, 0.31.0 Sep 6, 2023
@jjbustamante jjbustamante modified the milestones: 0.31.0, 0.30.1 Sep 6, 2023
Signed-off-by: Juan Bustamante <[email protected]>
@jjbustamante jjbustamante force-pushed the bugfix/jjbustamante/issue-1886 branch from a7e8c52 to 5566436 Compare September 7, 2023 14:30
@github-actions github-actions bot modified the milestones: 0.30.1, 0.31.0 Sep 7, 2023
@jjbustamante jjbustamante modified the milestones: 0.31.0, 0.30.1 Sep 7, 2023
@jkutner jkutner merged commit ad32136 into main Sep 7, 2023
@jkutner jkutner deleted the bugfix/jjbustamante/issue-1886 branch September 7, 2023 14:58
@jjbustamante jjbustamante added type/bug Issue that reports an unexpected behaviour. and removed type/enhancement Issue that requests a new feature or improvement. labels Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Issue that reports an unexpected behaviour.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"pack builder create" runs out of memory when using pack 0.30
2 participants