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

Clearing composer cache creates a lot of work downstream #78

Open
simesy opened this issue Aug 27, 2019 · 2 comments
Open

Clearing composer cache creates a lot of work downstream #78

simesy opened this issue Aug 27, 2019 · 2 comments

Comments

@simesy
Copy link
Contributor

simesy commented Aug 27, 2019

We clear the composer cache when we build the CLI container, but this is a lost opportunity. Most of the packages we use are fixed since our versions don't change often, so leaving the composer cache in place means subsequent builds downstream could speed up a lot by not needing to download all the sources - and we have a lot of sources. I propose we leave the composer cache in place here.

Something to be aware of is the main impact is on PaaS currently, but improvements in the way SaaS works may more and more require composer install, in order to follow mainstream best practices.

An alternative approach is to use gitlab CI cache, which might look like this (internal ref GOVCMS-3110).

cache:
  key: "$CI_PROJECT_PATH_SLUG"
  paths:
    - /home/.composer/cache
@simesy simesy changed the title Clearing composer cache duplicates work downstream Clearing composer cache creates a lot of work downstream Aug 27, 2019
@simesy
Copy link
Contributor Author

simesy commented Aug 27, 2019

I looked at approaching this in paas scaffold, but it's mostly the first composer install we want to avoid, as after that we mostly COPY /app

@simesy
Copy link
Contributor Author

simesy commented Aug 28, 2019

Composer cache is 81M. So adding a layer in docker with 81MB is not great, although it would only be in Dockerfile.cli.
The alternative currently is downloading 230 packages in every gitlab job. Sometimes twice.

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

No branches or pull requests

1 participant