luizm / action-sh-checker

A GitHub action that performs static analysis for shell scripts using shellcheck, shfmt and checkbashisms.
MIT License
132 stars 12 forks source link

Crash when running #31

Closed thibaultserti closed 3 years ago

thibaultserti commented 3 years ago

The action was working yesterday and now it just crashes when I launch it due to a tar error on shellcheck archive decompression. Version where bug occurs: 0.1.9 and 0.1.8

here is the log for the 0.1.9

2021-01-15T09:01:32.5574788Z Download action repository 'actions/checkout@v2'
2021-01-15T09:01:34.8836149Z Download action repository 'luizm/action-sh-checker@v0.1.9'
2021-01-15T09:01:35.2618010Z ##[group]Build container for action use: '/home/runner/work/_actions/luizm/action-sh-checker/v0.1.9/Dockerfile'.
2021-01-15T09:01:35.2684437Z ##[command]/usr/bin/docker build -t cc4956:83d57e2ebf9e4bf6ab3bc459742dddc1 -f "/home/runner/work/_actions/luizm/action-sh-checker/v0.1.9/Dockerfile" "/home/runner/work/_actions/luizm/action-sh-checker/v0.1.9"
2021-01-15T09:01:36.0550143Z Sending build context to Docker daemon  13.31kB
2021-01-15T09:01:36.0551520Z 
2021-01-15T09:01:36.0928197Z Step 1/9 : FROM alpine:latest
2021-01-15T09:01:37.3662899Z latest: Pulling from library/alpine
2021-01-15T09:01:37.4590932Z 596ba82af5aa: Pulling fs layer
2021-01-15T09:01:38.3852333Z 596ba82af5aa: Verifying Checksum
2021-01-15T09:01:38.3853575Z 596ba82af5aa: Download complete
2021-01-15T09:01:38.3854395Z 596ba82af5aa: Pull complete
2021-01-15T09:01:38.3855390Z Digest: sha256:d9a7354e3845ea8466bb00b22224d9116b183e594527fb5b6c3d30bc01a20378
2021-01-15T09:01:38.3856561Z Status: Downloaded newer image for alpine:latest
2021-01-15T09:01:38.3857178Z  ---> 7731472c3f2a
2021-01-15T09:01:38.3857743Z Step 2/9 : LABEL "name"="sh-checker"
2021-01-15T09:01:38.6490020Z  ---> Running in c597ef5a9dca
2021-01-15T09:01:39.0058997Z Removing intermediate container c597ef5a9dca
2021-01-15T09:01:39.0060526Z  ---> ed6f6c0861cc
2021-01-15T09:01:39.0061666Z Step 3/9 : LABEL "maintainer"="Luiz Muller <contact@luizm.dev>"
2021-01-15T09:01:39.0157071Z  ---> Running in 6cb2cee09f32
2021-01-15T09:01:40.0075570Z Removing intermediate container 6cb2cee09f32
2021-01-15T09:01:40.0096237Z  ---> 5e34441cacf6
2021-01-15T09:01:40.0097552Z Step 4/9 : ARG shfmt_version=3.0.1
2021-01-15T09:01:40.0167764Z  ---> Running in d70bc932c074
2021-01-15T09:01:41.0058980Z Removing intermediate container d70bc932c074
2021-01-15T09:01:41.0059812Z  ---> a93351daee89
2021-01-15T09:01:41.0078182Z Step 5/9 : ARG shellcheck_version=0.7.1
2021-01-15T09:01:41.0212359Z  ---> Running in 615635bb195f
2021-01-15T09:01:42.0074446Z Removing intermediate container 615635bb195f
2021-01-15T09:01:42.0075079Z  ---> 86756b2260fa
2021-01-15T09:01:42.0077229Z Step 6/9 : RUN apk add --no-cache bash jq curl checkbashisms     && apk add --no-cache --virtual .build-deps tar     && wget "https://github.com/mvdan/sh/releases/download/v${shfmt_version}/shfmt_v${shfmt_version}_linux_amd64" -O /usr/local/bin/shfmt     && chmod +x /usr/local/bin/shfmt     && wget "https://github.com/koalaman/shellcheck/releases/download/v${shellcheck_version}/shellcheck-v${shellcheck_version}.linux.x86_64.tar.xz"  -O- | tar xJ -C /usr/local/bin/ --strip-components=1 --wildcards '*/shellcheck'     && chmod +x /usr/local/bin/shellcheck     && apk del --no-cache .build-deps     && rm -rf /tmp/*
2021-01-15T09:01:42.0159977Z  ---> Running in c864728a9863
2021-01-15T09:01:42.3612743Z fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
2021-01-15T09:01:42.4592768Z fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
2021-01-15T09:01:42.6221109Z (1/14) Installing ncurses-terminfo-base (6.2_p20210109-r0)
2021-01-15T09:01:42.6441281Z (2/14) Installing ncurses-libs (6.2_p20210109-r0)
2021-01-15T09:01:42.6800338Z (3/14) Installing readline (8.1.0-r0)
2021-01-15T09:01:42.6886482Z (4/14) Installing bash (5.1.0-r0)
2021-01-15T09:01:42.7104792Z Executing bash-5.1.0-r0.post-install
2021-01-15T09:01:42.7124002Z (5/14) Installing libbz2 (1.0.8-r1)
2021-01-15T09:01:42.7193844Z (6/14) Installing perl (5.32.0-r0)
2021-01-15T09:01:43.0107460Z (7/14) Installing checkbashisms (2.20.5-r0)
2021-01-15T09:01:43.0219669Z (8/14) Installing ca-certificates (20191127-r5)
2021-01-15T09:01:43.0380916Z (9/14) Installing brotli-libs (1.0.9-r3)
2021-01-15T09:01:43.0504962Z (10/14) Installing nghttp2-libs (1.42.0-r1)
2021-01-15T09:01:43.0579897Z (11/14) Installing libcurl (7.74.0-r0)
2021-01-15T09:01:43.0687268Z (12/14) Installing curl (7.74.0-r0)
2021-01-15T09:01:43.0781376Z (13/14) Installing oniguruma (6.9.6-r0)
2021-01-15T09:01:43.0888837Z (14/14) Installing jq (1.6-r1)
2021-01-15T09:01:43.1020263Z Executing busybox-1.32.1-r0.trigger
2021-01-15T09:01:43.1071236Z Executing ca-certificates-20191127-r5.trigger
2021-01-15T09:01:43.1428099Z OK: 49 MiB in 28 packages
2021-01-15T09:01:43.1809822Z fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
2021-01-15T09:01:43.4580573Z fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
2021-01-15T09:01:43.7412868Z (1/3) Installing libacl (2.2.53-r0)
2021-01-15T09:01:43.7641147Z (2/3) Installing tar (1.33-r1)
2021-01-15T09:01:43.7938468Z (3/3) Installing .build-deps (20210115.090143)
2021-01-15T09:01:43.7948537Z Executing busybox-1.32.1-r0.trigger
2021-01-15T09:01:43.7976527Z OK: 49 MiB in 31 packages
2021-01-15T09:01:43.8318649Z Connecting to github.com (140.82.112.4:443)
2021-01-15T09:01:43.8786477Z Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (52.217.83.140:443)
2021-01-15T09:01:43.9329799Z saving to '/usr/local/bin/shfmt'
2021-01-15T09:01:43.9794751Z shfmt                100% |********************************| 2944k  0:00:00 ETA
2021-01-15T09:01:43.9795327Z '/usr/local/bin/shfmt' saved
2021-01-15T09:01:43.9812968Z tar (grandchild): xz: Cannot exec: No such file or directory
2021-01-15T09:01:43.9813684Z tar (grandchild): Error is not recoverable: exiting now
2021-01-15T09:01:43.9825640Z Connecting to github.com (140.82.112.3:443)
2021-01-15T09:01:44.0432364Z Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (52.216.145.123:443)
2021-01-15T09:01:44.1080204Z writing to stdout
2021-01-15T09:01:44.1083668Z tar: Child died with signal 13
2021-01-15T09:01:44.1084424Z tar: Error is not recoverable: exiting now
2021-01-15T09:01:44.9416978Z The command '/bin/sh -c apk add --no-cache bash jq curl checkbashisms     && apk add --no-cache --virtual .build-deps tar     && wget "https://github.com/mvdan/sh/releases/download/v${shfmt_version}/shfmt_v${shfmt_version}_linux_amd64" -O /usr/local/bin/shfmt     && chmod +x /usr/local/bin/shfmt     && wget "https://github.com/koalaman/shellcheck/releases/download/v${shellcheck_version}/shellcheck-v${shellcheck_version}.linux.x86_64.tar.xz"  -O- | tar xJ -C /usr/local/bin/ --strip-components=1 --wildcards '*/shellcheck'     && chmod +x /usr/local/bin/shellcheck     && apk del --no-cache .build-deps     && rm -rf /tmp/*' returned a non-zero code: 2
2021-01-15T09:01:44.9433002Z 
2021-01-15T09:01:44.9455096Z ##[warning]Docker build failed with exit code 2, back off 3.493 seconds before retry.
thibaultserti commented 3 years ago

It apparently comes from the version of alpine which was bumped yesterday to 3.13. If you revert to 3.12.3, it fixes.

luizm commented 3 years ago

Thank you @thibaultserti .. I released the version v0.1.10