- Issue created by @damian.skiba
- 🇪🇸Spain fjgarlin
It might be because you are specifying a Drupal module in the repositories section to be downloaded via "git", see this: https://git.drupalcode.org/issue/droopler-3501307/-/blob/3501307-d11/com...
For the sake of testing, can you remove that block and try again? The module should still download as it is a Drupal project.
- 🇵🇱Poland patbsh
The issue is unfortunately not resolved, we still face the same exact problem. The said module is now removed from repositories in composer.json file as the issue was fixed. There is now a new package added in repositories instead (mably/slick) but removing it does not fix the problem and the artifact is still too large so the job fails.
example build log: https://git.drupalcode.org/issue/droopler-3520435/-/jobs/5037201
- 🇪🇸Spain fjgarlin
The issue is the same. Bringing nearly 1000 commits might take a lot of space on some repos. Do you need the full git history of a package when you only need a version of it?
Can you try syntax like this in your
composer.json
file?:"mably/slick": { "type": "package", "package": { "name": "mably/slick", "version": "1.8.2", "type": "drupal-library", "dist": { "url": "https://github.com/mably/slick/archive/refs/heads/topic/jquery4.zip", "type": "zip", } } }
- 🇵🇱Poland patbsh
I changed it and it did not help, but definitely reduced the artifact size.
However I managed to fix it locally by overriding the .composer-base:artifacts:exclude section, specifically by excluding node_modules directory from web/core:
composer: extends: .composer-base variables: DRUPAL_CORE: "11.1.0" artifacts: exclude: - '.git' - '.git/**/*' - '$_WEB_ROOT/**/.git' - '$_WEB_ROOT/**/.git/**/*' - 'vendor/**/.git' - 'vendor/**/.git/**/*' - '$_WEB_ROOT/core/node_modules/**/*' paths: - .
- 🇪🇸Spain fjgarlin
That's a great workaround, especially when the pipeline doesn't run certain jobs like "nightwatch", "cspell", "stylelint" which actually need those files. But if your pipeline don't need it then this is a good workaround.
But as mentioned, there are some steps that rely on the node_modules folder being present, so I'd say that this keeps on working as expected. We are happy to help debug the projects that have this issue. Most of the time is bringing full git history, and in this case, we could further reduce removing that folder from the artifacts. Thanks for sharing!