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

Failed to extracting archive when use parallel jobs with ramsey/composer-install@v1 #161

Closed
alies-dev opened this issue Jul 16, 2021 · 5 comments

Comments

@alies-dev
Copy link

alies-dev commented Jul 16, 2021

name: Run tests and deploy

on:
  workflow_dispatch:
  push:
    paths:
      - '**.php'
      - '**.js'
      - '**.json'
      - '**.xml'
      - 'composer.*'
      - '.github/workflows/main.yml'

jobs:

  test_php:
    name: Run PHP tests
    runs-on: ubuntu-18.04

    steps:
      - uses: actions/checkout@v2
        with:
          ref: ${{ github.head_ref }}

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: 8.0
          extensions: bcmath, curl, dom, filter, gd, hash, intl, json, libxml, mbstring, openssl, pdo_mysql, pdo, redis, simpleXML
          coverage: none

      - name: Install composer dependencies
        uses: ramsey/composer-install@v1
        with:
          composer-options: "--prefer-dist --no-scripts"


  check_php_syntax:
    name: Check PHP syntax
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          ref: ${{ github.head_ref }}

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: 8.0
          extensions: bcmath, curl, dom, filter, gd, hash, intl, json, libxml, mbstring, openssl, pdo_mysql, pdo, redis, simpleXML
          tools: cs2pr
          coverage: none

      - name: Install composer dependencies
        uses: ramsey/composer-install@v1
        with:
          composer-options: "--prefer-dist --no-scripts"
Failed to extract square1/nova-metrics: (9) '/usr/bin/unzip' -qq '/home/runner/work/REPO-NAME/REPO-NAME/vendor/composer/tmp-887e5e92dba4429f8f1bb7ee187d3e61' -d '/home/runner/work/REPO-NAME/REPO-NAME/vendor/composer/344f5f96'

[/home/runner/work/REPO-NAME/REPO-NAME/vendor/composer/tmp-887e5e92dba4429f8f1bb7ee187d3e61]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /home/runner/work/REPO-NAME/REPO-NAME/vendor/composer/tmp-887e5e92dba4429f8f1bb7ee187d3e61 or
        /home/runner/work/REPO-NAME/REPO-NAME/vendor/composer/tmp-887e5e92dba4429f8f1bb7ee187d3e61.zip, and cannot find /home/runner/work/REPO-NAME/REPO-NAME/vendor/composer/tmp-887e5e92dba4429f8f1bb7ee187d3e61.ZIP, period.

    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class
    Install of square1/nova-metrics failed
Error: '/home/runner/work/REPO-NAME/REPO-NAME/vendor/composer/tmp-887e5e92dba4429f8f1bb7ee187d3e61' is not a zip archive.
@kevinpapst
Copy link

Happens here as well, over and over again.
I cannot give exact numbers, but I'd say at least one in 5 pushes lead to a failed job (I have multiple parallel actions running).
Each time a different composer package is presented as cause, it is completely random. When I hit "Re-run all jobs" it usually works, but sometimes it doesn't.
So yes, @lptn might be right with the assumption that it is somehow caused by parallel jobs.

@mixdf
Copy link

mixdf commented Aug 16, 2021

Happening more and more every day. Have to manually re-run the workflow, sometimes multiple times for it to successfully install composer dependencies.

@phpfour
Copy link

phpfour commented Aug 16, 2021

It happens so often that now I have to look for it every time a workflow run and wait to restart it when fails. It started with a fail every now & then, eventually now becoming a bottleneck in every workflow run 😞

@clxmstaab
Copy link

maybe its the same issue then #152

ramsey added a commit that referenced this issue Dec 23, 2021
This also adds the following features:

- Use `--prefer-stable` with lowest dependencies (#178)
- Allow use of a custom cache key (#167)
- Allow ability to ignore the cache

Fixes: #187, #161, #152, #79
ramsey added a commit that referenced this issue Dec 23, 2021
This also adds the following features:

- Use `--prefer-stable` with lowest dependencies (#178)
- Allow use of a custom cache key (#167)
- Allow ability to ignore the cache

Fixes: #187, #161, #152, #79
ramsey added a commit that referenced this issue Dec 23, 2021
This also adds the following features:

- Use `--prefer-stable` with lowest dependencies (#178)
- Allow use of a custom cache key (#167)
- Allow ability to ignore the cache

Fixes: #187, #161, #152, #79
@ramsey
Copy link
Owner

ramsey commented Dec 23, 2021

This is fixed in v2, please upgrade using ramsey/composer-install@v2 or ramsey/composer-install@2.0.0. Details are available on the release announcement and the README.

Thanks!

@ramsey ramsey closed this as completed Dec 23, 2021
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

Successfully merging a pull request may close this issue.

6 participants