ShahradR/action-taskcat

Github Taskcat action is failing with nodejs dependency issue.

Closed this issue · 5 comments

Hi @ShahradR , github taskcat action ShahradR/action-taskcat is failing with nodejs dependency error. This was working fine untill lastweek and started throwing issues from today. Please find the below failure logs.

Step 2/6 : RUN apk add --no-cache nodejs~=12 npm~=12 && rm -rf /var/cache/apk/*
---> Running in 806e412203fa
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
ERROR: unable to select packages:
nodejs-current-17.9.0-r0:
breaks: world[nodejs12]
satisfies: npm-8.1.3-r0[cmd:node]
npm-8.1.3-r0:
breaks: world[npm
12]
The command '/bin/sh -c apk add --no-cache nodejs~=12 npm~=12 && rm -rf /var/cache/apk/*' returned a non-zero code: 2
Warning: Docker build failed with exit code 2, back off 8.801 seconds before retry.
/usr/bin/docker build -t 2bcf09:4a4711ea98244f109ccac686acafef2b -f "/home/runner/work/_actions/ShahradR/action-taskcat/v2.0.0/Dockerfile" "/home/runner/work/_actions/ShahradR/action-taskcat/v2.0.0"
Sending build context to Docker daemon 1.107MB

Step 1/6 : FROM taskcat/taskcat:latest
---> e8b42812b7ca
Step 2/6 : RUN apk add --no-cache nodejs~=12 npm~=12 && rm -rf /var/cache/apk/*
---> Running in d5b3db10547c
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
ERROR: unable to select packages:
nodejs-current-17.9.0-r0:
breaks: world[nodejs12]
satisfies: npm-8.1.3-r0[cmd:node]
npm-8.1.3-r0:
breaks: world[npm
12]
The command '/bin/sh -c apk add --no-cache nodejs~=12 npm~=12 && rm -rf /var/cache/apk/*' returned a non-zero code: 2
Warning: Docker build failed with exit code 2, back off 2.588 seconds before retry.
/usr/bin/docker build -t 2bcf09:4a4711ea98244f109ccac686acafef2b -f "/home/runner/work/_actions/ShahradR/action-taskcat/v2.0.0/Dockerfile" "/home/runner/work/_actions/ShahradR/action-taskcat/v2.0.0"
Sending build context to Docker daemon 1.107MB

Step 1/6 : FROM taskcat/taskcat:latest
---> e8b42812b7ca
Step 2/6 : RUN apk add --no-cache nodejs~=12 npm~=12 && rm -rf /var/cache/apk/*
---> Running in 4169df0786f6
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
ERROR: unable to select packages:
nodejs-current-17.9.0-r0:
breaks: world[nodejs12]
satisfies: npm-8.1.3-r0[cmd:node]
npm-8.1.3-r0:
breaks: world[npm
12]
The command '/bin/sh -c apk add --no-cache nodejs~=12 npm~=12 && rm -rf /var/cache/apk/*' returned a non-zero code: 2
Error: Docker build failed with exit code 2

Hi @KiranReddy230!

Thank you so much for flagging this—it seems that this issue was caused by a change in the upstream container. I'll take a look and update this thread as soon as I have more information. Thank you!!

Thank you @ShahradR. Will wait for your update.

Hi @KiranReddy230

I just pushed an updated Dockerfile to the repository for both the v1 and v2 releases of the project, which should resolve your issue!

If you are referencing the GitHub Action using the latest or major version (@v1 or @v2), you should be able to re-run your job and hopefully it should work! If you're referencing a specific commit or tag, you'll need to update your GitHub workflow to reference the latest version—the diff below shows the update you would need to make if you're referencing a specific release.

I also opened aws-ia/taskcat#731 with the taskcat team, and they've already pushed a fix to update the base container!

Let me know if this resolves your issue, or if you have any other questions/comments/concerns, and thanks again for flagging this!

GitHub workflow update when referencing a specific commit

Update your workflow as shown below if you're referencing a specific commit. If you're only referencing the main branch or a major version (@v1 or @v2), no changes are required.

  - name: Run taskcat test run
-   uses: ShahradR/action-taskcat@v2.2.5
+   uses: ShahradR/action-taskcat@v2.2.6
    with:
      commands: test run
      update_taskcat: true
      update_cfn_lint: true

@ShahradR Thanks a lot for fixing this. I am able to run my github actions successfully now. Good to close this issue.
Regards.

That's awesome, glad to hear it's working again!! 🥳

I'll close the ticket, but if you run into any other issues, feel free to create a new one and we can take a look at it! And thanks again for reaching out and flagging this, really appreciated!!