Lullabot / drainpipe

GNU General Public License v3.0
33 stars 14 forks source link

Builds broken on github, fails at drupal:composer:production step #722

Open tess-ten7 opened 4 days ago

tess-ten7 commented 4 days ago

Starting this week, multiple sites no longer build on Github. The failure occurs when we call ddev task build, which in turn, calls drupal:composer:production. This step fails with the following consistent signature:

[drupal:composer:production] Gathering patches for dependencies. This might take a minute.
[drupal:composer:production]   - Installing drupal/core (10.3.2): Extracting archive
[drupal:composer:production]   0/80 [>---------------------------]   0%
[drupal:composer:production]  10/80 [===>------------------------]  12%
[drupal:composer:production]  20/80 [=======>--------------------]  25%
[drupal:composer:production]  30/80 [==========>-----------------]  37%
[drupal:composer:production]  40/80 [==============>-------------]  50%
[drupal:composer:production]  50/80 [=================>----------]  62%
[drupal:composer:production]  60/80 [=====================>------]  75%Deleting web/modules/contrib/stage_file_proxy - deleted
[drupal:composer:production] 
[drupal:composer:production]  70/80 [========================>---]  87%
[drupal:composer:production] In Application.php line 423:
[drupal:composer:production]                                                         
[drupal:composer:production]   Class "Composer\Console\GithubActionError" not found  
[drupal:composer:production]                                                         
[drupal:composer:production] 
[drupal:composer:production] install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]
[drupal:composer:production] 

Our build task is fairly simple:

  build:prod:
    desc: "Builds the project for production"
    deps:
      - drupal:composer:production
      - assets:prod

If we edit the workflow file and replace this:

      - name: Build Project
        env:
          directory: /tmp/release
        run: |
          ddev composer install
          ddev task build
          ddev task snapshot:directory directory=/tmp/release

with

      - name: Build Project
        env:
          directory: /tmp/release
        run: |
          ddev composer install --no-dev --optimize-autoloader
          ddev task assets:prod
          ddev task snapshot:directory directory=/tmp/release

the build completes without issue or other changes to the repository. This is curious, because we lifted that composer command whole cloth from vendor/lullabot/drainpipe/tasks/drupal.yml which in the repository(s) was:

  composer:production:
    desc: Install composer dependencies without devDependencies
    cmds:
      - composer install --no-dev --optimize-autoloader
    sources:
      - composer.json
      - composer.lock
    generates:
      - ./vendor/composer/installed.json
      - ./vendor/autoload.php
    status:
      - >
        test -f ./vendor/composer/installed.json && grep -q '"dev": false' ./vendor/composer/installed.json
justafish commented 14 hours ago

@tess-ten7 if the step is changed to this does it fail?

      - name: Build Project
        env:
          directory: /tmp/release
        run: |
          ddev composer install
          ddev composer install --no-dev --optimize-autoloader
          ddev task assets:prod
          ddev task snapshot:directory directory=/tmp/release