StackStorm / StackStorm/st2

Optimize pack virtual environment sizes

Open
#5,173 0 comments 0 reactions 1 assignee View on GitHub

@Kami is already working on this.

Since Mar 2, 2021.

feature
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

This is another of those long standing and known issues.

Right now, most pack virtual environments will be > 100 MB in size, because we don't use symlinks when creating virtual pack environment.

That's problematic if you have Docker image with a lot of packs or similar.

I believe the reason for using copy and not symlink behavior is because there were some issues with symlink behavior in some edge cases / configuration in the past (IIRC issue was related to a single distro so we may be able to get rid of that flag now).

We should try to evaluate again if we can use symlink or similar approach which doesn't require copying over Python libraries and site-packages.

Thread with some more context and details - https://forum.stackstorm.com/t/st2packs-bloated/1580/5?u=kami.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.