Artifact Upload failure in Pipeline after Drupal 11 Upgrade

Created on 19 February 2025, 3 months ago

Problem/Motivation

During the Composer job, the following error occurred:

Uploading artifacts...
.: found 116362 matching artifact files and directories 
.git: excluded 1 files                             
.git/**/*: excluded 144 files                      
vendor/**/.git: excluded 1 files                   
vendor/**/.git/*: excluded 12 files                
ERROR: Uploading artifacts as "archive" to coordinator... 413 Request Entity Too Large  id=4405673 responseStatus=413 Request Entity Too Large status=413 token=glcbt-64
FATAL: too large       

I noticed this issue after upgrading from Drupal 10 to Drupal 11. Everything was working fine on Drupal 10.
GitLab Job Log

Steps to reproduce

Run the Composer job on a profile project for Drupal 11.

Remaining tasks

See issue 📌 Upgrade Droopler to Drupal 11.1 Active – You can test it there; a branch with the Drupal 11 update is available.
I found issue #3442120: D7 pipeline fails: Uploading artifacts as "archive" to coordinator... 413 Request Entity Too Large , where a similar problem was reported.

🐛 Bug report
Status

Active

Component

gitlab-ci

Created by

🇵🇱Poland damian.skiba

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • 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!

  • 🇪🇸Spain fjgarlin

    Assigning credit.

Production build 0.71.5 2024