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

npm ci run failing in docker #26

Closed
0mnius opened this issue Oct 25, 2020 · 8 comments · Fixed by #28
Closed

npm ci run failing in docker #26

0mnius opened this issue Oct 25, 2020 · 8 comments · Fixed by #28
Labels

Comments

@0mnius
Copy link

0mnius commented Oct 25, 2020

Hello,

The action is failing on npm ci run.

2020-10-25T11:19:06.1790805Z npm notice 
2020-10-25T11:19:06.1791266Z npm notice New patch version of npm available! 7.0.3 -> 7.0.5
2020-10-25T11:19:06.1791901Z npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.0.5>
2020-10-25T11:19:06.1792502Z npm notice Run `npm install -g [email protected]` to update!
2020-10-25T11:19:06.1792845Z npm notice 
2020-10-25T11:19:06.1799788Z npm ERR! The `npm ci` command can only install with an existing package-lock.json or
2020-10-25T11:19:06.1800615Z npm ERR! npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
2020-10-25T11:19:06.1801376Z npm ERR! later to generate a package-lock.json file, then try again.
2020-10-25T11:19:06.1884172Z npm ERR! A complete log of this run can be found in:
2020-10-25T11:19:06.1885100Z npm ERR!     /root/.npm/_logs/2020-10-25T11_19_06_180Z-debug.log
2020-10-25T11:19:06.3839692Z The command '/bin/sh -c npm ci --only=production' returned a non-zero code: 1
2020-10-25T11:19:06.3864834Z ##[warning]Docker build failed with exit code 1, back off 3.163 seconds before retry.

Anything i can do to fix it on my end?

TIA,
Eli

@gr2m
Copy link
Contributor

gr2m commented Oct 25, 2020

I don't think that this is a problem with with this action? What does your workflow file look like?

@0mnius
Copy link
Author

0mnius commented Oct 25, 2020

Hey Gregor,

Thanks for getting back so quickly.
The workflow is fairly straightforward:

name: '_style-wip-check'

on:
  - pull_request

jobs:
  style-wip-check:
    runs-on: ubuntu-latest
    if: ${{ ! startsWith(github.head_ref, 'changeset-release/') }}

    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    steps:
      - name: 'commit message check for WIPs'
        uses: wip/[email protected]

@shiwano
Copy link

shiwano commented Oct 26, 2020

We have the same problem.
Our workflow file is here.

name: WIP
on:
  pull_request:
    types: [ opened, synchronize, reopened, edited ]
jobs:
  wip:
    runs-on: ubuntu-latest
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    steps:
      - uses: wip/[email protected]

@bhekanik
Copy link

We're also experiencing the same problem

@gr2m
Copy link
Contributor

gr2m commented Oct 26, 2020

Okay thank you all for letting me know. Likely GitHub changed something, and it's time to upgrade the the action to the format. I'll look into it

@TGTGamer
Copy link

TGTGamer commented Nov 3, 2020

Additional logging data from my workflow:

workflow config

name: Pull Request Management
on:
  pull_request:
    types:
      - opened
      - edited
      - synchronize
jobs:
  # Automatically blocks WIP pull request based on the title
  wip:
    runs-on: ubuntu-latest
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    steps:
      - name: Get Configurations
        uses: Videndum/[email protected]
        with:
          settings: ${{ secrets.SETTINGS }}
          mode: 'environment'
          token: ${{ secrets.GITHUB_TOKEN }}
      # - name: Work in progress label
      #   uses: y-temp4/[email protected]
      #   if: ${{env.wip_label}} == true
      #   with:
      #     repo-token: ${{ secrets.GITHUB_TOKEN }}
      - name: Work in progress status
        uses: wip/[email protected]
        if: ${{env.wip_enabled}} == true

Console output (debug active)

25s
##[debug***Evaluating condition for step: 'Build wip/action@v1.0.0'
##[debug***Evaluating: success()
##[debug***Evaluating success:
##[debug***=> true
##[debug***Result: true
##[debug***Starting: Build wip/action@v1.0.0
##[group***Build container for action use: '/home/runner/work/_actions/wip/action/v1.0.0/Dockerfile'.
##[command***/usr/bin/docker build -t 1e5c35:86a5ee67b9944feca981eea4bbd44c9d -f "/home/runner/work/_actions/wip/action/v1.0.0/Dockerfile" "/home/runner/work/_actions/wip/action/v1.0.0"
Sending build context to Docker daemon  287.7kB

Step 1/12 : FROM node:slim
slim: Pulling from library/node
babf97a3f00a: Pulling fs layer
d81eb1809d95: Pulling fs layer
dbaab951a9fa: Pulling fs layer
cb915c1b28b9: Pulling fs layer
7c72cd70a544: Pulling fs layer
cb915c1b28b9: Waiting
7c72cd70a544: Waiting
d81eb1809d95: Verifying Checksum
d81eb1809d95: Download complete
babf97a3f00a: Verifying Checksum
babf97a3f00a: Download complete
cb915c1b28b9: Verifying Checksum
cb915c1b28b9: Download complete
7c72cd70a544: Verifying Checksum
7c72cd70a544: Download complete
dbaab951a9fa: Verifying Checksum
dbaab951a9fa: Download complete
babf97a3f00a: Pull complete
d81eb1809d95: Pull complete
dbaab951a9fa: Pull complete
cb915c1b28b9: Pull complete
7c72cd70a544: Pull complete
Digest: sha256:bf39db19ac53a635030d5db569cab912322147139fbf929c252359f3c50c4207
Status: Downloaded newer image for node:slim
 ---> 922b09b21278
Step 2/12 : LABEL "com.github.actions.name"="WIP"
 ---> Running in d8e547135231
Removing intermediate container d8e547135231
 ---> fcd39c3ac681
Step 3/12 : LABEL "com.github.actions.description"="Set WIP pull requests to pending"
 ---> Running in f211cfa35dfd
Removing intermediate container f211cfa35dfd
 ---> 34a3ecc95acc
Step 4/12 : LABEL "com.github.actions.icon"="edit"
 ---> Running in 5a646f2522ba
Removing intermediate container 5a646f2522ba
 ---> ce2e35ba2ac5
Step 5/12 : LABEL "com.github.actions.color"="orange"
 ---> Running in e00426dbd127
Removing intermediate container e00426dbd127
 ---> a7690d4b1123
Step 6/12 : LABEL "repository"="http://github.com/wip/action"
 ---> Running in 1760433dacf7
Removing intermediate container 1760433dacf7
 ---> 6032471542c8
Step 7/12 : LABEL "homepage"="http://github.com/wip/action"
 ---> Running in cfc149d35d51
Removing intermediate container cfc149d35d51
 ---> 82b3ca61adca
Step 8/12 : LABEL "maintainer"="Gregor Martynus (https://github.com/gr2m)"
 ---> Running in 7609663f5fdb
Removing intermediate container 7609663f5fdb
 ---> 2ba24a41fc80
Step 9/12 : COPY package*.json ./
 ---> c1d4ea8e8faa
Step 10/12 : RUN npm ci --only=production
 ---> Running in 89e8a01c803f
npm notice 
npm notice New patch version of npm available! 7.0.3 -> 7.0.7
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.0.7>
npm notice Run `npm install -g npm@7.0.7` to update!
npm notice 
npm ERR! The `npm ci` command can only install with an existing package-lock.json or
npm ERR! npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
npm ERR! later to generate a package-lock.json file, then try again.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-11-03T04_33_29_115Z-debug.log
The command '/bin/sh -c npm ci --only=production' returned a non-zero code: 1

##[warning***Docker build failed with exit code 1, back off 4.78 seconds before retry.
##[command***/usr/bin/docker build -t 1e5c35:86a5ee67b9944feca981eea4bbd44c9d -f "/home/runner/work/_actions/wip/action/v1.0.0/Dockerfile" "/home/runner/work/_actions/wip/action/v1.0.0"
Sending build context to Docker daemon  287.7kB

Step 1/12 : FROM node:slim
 ---> 922b09b21278
Step 2/12 : LABEL "com.github.actions.name"="WIP"
 ---> Using cache
 ---> fcd39c3ac681
Step 3/12 : LABEL "com.github.actions.description"="Set WIP pull requests to pending"
 ---> Using cache
 ---> 34a3ecc95acc
Step 4/12 : LABEL "com.github.actions.icon"="edit"
 ---> Using cache
 ---> ce2e35ba2ac5
Step 5/12 : LABEL "com.github.actions.color"="orange"
 ---> Using cache
 ---> a7690d4b1123
Step 6/12 : LABEL "repository"="http://github.com/wip/action"
 ---> Using cache
 ---> 6032471542c8
Step 7/12 : LABEL "homepage"="http://github.com/wip/action"
 ---> Using cache
 ---> 82b3ca61adca
Step 8/12 : LABEL "maintainer"="Gregor Martynus (https://github.com/gr2m)"
 ---> Using cache
 ---> 2ba24a41fc80
Step 9/12 : COPY package*.json ./
 ---> Using cache
 ---> c1d4ea8e8faa
Step 10/12 : RUN npm ci --only=production
 ---> Running in 1c5c0cb20960
npm notice 
npm notice New patch version of npm available! 7.0.3 -> 7.0.7
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.0.7>
npm notice Run `npm install -g npm@7.0.7` to update!
npm notice 
npm ERR! The `npm ci` command can only install with an existing package-lock.json or
npm ERR! npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
npm ERR! later to generate a package-lock.json file, then try again.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-11-03T04_33_35_273Z-debug.log
The command '/bin/sh -c npm ci --only=production' returned a non-zero code: 1

##[warning***Docker build failed with exit code 1, back off 1.935 seconds before retry.
##[command***/usr/bin/docker build -t 1e5c35:86a5ee67b9944feca981eea4bbd44c9d -f "/home/runner/work/_actions/wip/action/v1.0.0/Dockerfile" "/home/runner/work/_actions/wip/action/v1.0.0"
Sending build context to Docker daemon  287.7kB

Step 1/12 : FROM node:slim
 ---> 922b09b21278
Step 2/12 : LABEL "com.github.actions.name"="WIP"
 ---> Using cache
 ---> fcd39c3ac681
Step 3/12 : LABEL "com.github.actions.description"="Set WIP pull requests to pending"
 ---> Using cache
 ---> 34a3ecc95acc
Step 4/12 : LABEL "com.github.actions.icon"="edit"
 ---> Using cache
 ---> ce2e35ba2ac5
Step 5/12 : LABEL "com.github.actions.color"="orange"
 ---> Using cache
 ---> a7690d4b1123
Step 6/12 : LABEL "repository"="http://github.com/wip/action"
 ---> Using cache
 ---> 6032471542c8
Step 7/12 : LABEL "homepage"="http://github.com/wip/action"
 ---> Using cache
 ---> 82b3ca61adca
Step 8/12 : LABEL "maintainer"="Gregor Martynus (https://github.com/gr2m)"
 ---> Using cache
 ---> 2ba24a41fc80
Step 9/12 : COPY package*.json ./
 ---> Using cache
 ---> c1d4ea8e8faa
Step 10/12 : RUN npm ci --only=production
 ---> Running in 606f4069ffb5
npm notice 
npm notice New patch version of npm available! 7.0.3 -> 7.0.7
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.0.7>
npm notice Run `npm install -g npm@7.0.7` to update!
npm notice 
npm ERR! The `npm ci` command can only install with an existing package-lock.json or
npm ERR! npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
npm ERR! later to generate a package-lock.json file, then try again.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-11-03T04_33_38_560Z-debug.log
The command '/bin/sh -c npm ci --only=production' returned a non-zero code: 1

##[endgroup***
##[error***Docker build failed with exit code 1
##[debug***System.InvalidOperationException: Docker build failed with exit code 1
##[debug***   at GitHub.Runner.Worker.ActionManager.BuildActionContainerAsync(IExecutionContext executionContext, Object data)
##[debug***   at GitHub.Runner.Worker.JobExtensionRunner.RunAsync()
##[debug***   at GitHub.Runner.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken)
##[debug***Finishing: Build wip/action@v1.0.0

This is a priority for me and my team as it's fully broken our workflows - resulting in us actually skipping / removing this action for the time being

@github-actions
Copy link

github-actions bot commented Nov 3, 2020

🎉 This issue has been resolved in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@gr2m
Copy link
Contributor

gr2m commented Nov 3, 2020

releases are now automated and are continuously pushed to the v1 branch. So you can do

- uses wip/action@v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants