reviewdog / reviewdog

🐶 Automated code review tool integrated with any code analysis tools regardless of programming language

Home Page:https://medium.com/@haya14busa/reviewdog-a-code-review-dog-who-keeps-your-codebase-healthy-d957c471938b#.8xctbaw5u

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Github action that installs review dog is failing

jsungg opened this issue · comments

The git hub action for downloading and running review dog on a repo is broken at the moment. Here are the logs we received from running the reviewdog github action:

2023-01-27T23:15:41.8004514Z Requested labels: ubuntu-latest
2023-01-27T23:15:41.8004559Z Job defined at: Cresicor/CresicorNext/.github/workflows/backend-pull-request-dev.yml@refs/pull/952/merge
2023-01-27T23:15:41.8004587Z Waiting for a runner to pick up this job...
2023-01-27T23:15:42.0438144Z Job is waiting for a hosted runner to come online.
2023-01-27T23:15:46.7136602Z Job is about to start running on the hosted runner: GitHub Actions 24 (hosted)
2023-01-27T23:15:49.5284646Z Current runner version: '2.301.1'
2023-01-27T23:15:49.5318439Z ##[group]Operating System
2023-01-27T23:15:49.5319026Z Ubuntu
2023-01-27T23:15:49.5319503Z 22.04.1
2023-01-27T23:15:49.5319832Z LTS
2023-01-27T23:15:49.5320121Z ##[endgroup]
2023-01-27T23:15:49.5320486Z ##[group]Runner Image
2023-01-27T23:15:49.5320903Z Image: ubuntu-22.04
2023-01-27T23:15:49.5321437Z Version: 20230122.1
2023-01-27T23:15:49.5321938Z Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230122.1/images/linux/Ubuntu2204-Readme.md
2023-01-27T23:15:49.5322695Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230122.1
2023-01-27T23:15:49.5323193Z ##[endgroup]
2023-01-27T23:15:49.5323519Z ##[group]Runner Image Provisioner
2023-01-27T23:15:49.5323940Z 2.0.98.1
2023-01-27T23:15:49.5324266Z ##[endgroup]
2023-01-27T23:15:49.5325383Z ##[group]GITHUB_TOKEN Permissions
2023-01-27T23:15:49.5326109Z Actions: write
2023-01-27T23:15:49.5326559Z Checks: write
2023-01-27T23:15:49.5327093Z Contents: write
2023-01-27T23:15:49.5327510Z Deployments: write
2023-01-27T23:15:49.5448081Z Discussions: write
2023-01-27T23:15:49.5448464Z Issues: write
2023-01-27T23:15:49.5448716Z Metadata: read
2023-01-27T23:15:49.5448973Z Packages: write
2023-01-27T23:15:49.5449227Z Pages: write
2023-01-27T23:15:49.5449616Z PullRequests: write
2023-01-27T23:15:49.5449903Z RepositoryProjects: write
2023-01-27T23:15:49.5450205Z SecurityEvents: write
2023-01-27T23:15:49.5450466Z Statuses: write
2023-01-27T23:15:49.5450733Z ##[endgroup]
2023-01-27T23:15:49.5457825Z Secret source: Actions
2023-01-27T23:15:49.5458291Z Prepare workflow directory
2023-01-27T23:15:49.6660389Z Prepare all required actions
2023-01-27T23:15:49.6884292Z Getting action download info
2023-01-27T23:15:49.9397307Z Download action repository 'actions/checkout@v3' (SHA:ac593985615ec2ede58e132d2e21d2b1cbd6127c)
2023-01-27T23:15:50.6120661Z Download action repository 'reviewdog/action-black@v2' (SHA:7b65863891a77f727fb8ad11b486c04db4aa07d4)
2023-01-27T23:15:51.0334636Z Download action repository 'reviewdog/action-flake8@v3' (SHA:b6435e67f0cfda225b9e0c9283cfb7ea7c551bdb)
2023-01-27T23:15:51.6644416Z Complete job name: Run Linters
2023-01-27T23:15:51.7475880Z ##[group]Build container for action use: '/home/runner/work/_actions/reviewdog/action-black/v2/Dockerfile'.
2023-01-27T23:15:51.7558656Z ##[command]/usr/bin/docker build -t 49859c:91772305f3e7482b91cfcbfd8112245c -f "/home/runner/work/_actions/reviewdog/action-black/v2/Dockerfile" "/home/runner/work/_actions/reviewdog/action-black/v2"
2023-01-27T23:15:51.9552495Z Sending build context to Docker daemon  41.98kB
2023-01-27T23:15:51.9553597Z 
2023-01-27T23:15:52.0467145Z Step 1/7 : FROM python:3
2023-01-27T23:15:53.0327725Z 3: Pulling from library/python
2023-01-27T23:15:53.2723375Z bbeef03cda1f: Already exists
2023-01-27T23:15:53.3330621Z f049f75f014e: Already exists
2023-01-27T23:15:53.3417375Z 56261d0e6b05: Already exists
2023-01-27T23:15:53.3457342Z 9bd150679dbd: Already exists
2023-01-27T23:15:53.3504092Z 5b282ee9da04: Already exists
2023-01-27T23:15:53.3559794Z 03f027d5e312: Pulling fs layer
2023-01-27T23:15:53.3560203Z 591b0f932310: Pulling fs layer
2023-01-27T23:15:53.3560533Z 1047c5f4cc7d: Pulling fs layer
2023-01-27T23:15:53.3560786Z 5b5cbe74bf76: Pulling fs layer
2023-01-27T23:15:53.3561034Z 5b5cbe74bf76: Waiting
2023-01-27T23:15:53.6622736Z 03f027d5e312: Verifying Checksum
2023-01-27T23:15:53.6626717Z 03f027d5e312: Download complete
2023-01-27T23:15:53.6644659Z 1047c5f4cc7d: Verifying Checksum
2023-01-27T23:15:53.6645058Z 1047c5f4cc7d: Download complete
2023-01-27T23:15:53.7900795Z 591b0f932310: Verifying Checksum
2023-01-27T23:15:53.7908189Z 591b0f932310: Download complete
2023-01-27T23:15:53.9440158Z 5b5cbe74bf76: Verifying Checksum
2023-01-27T23:15:53.9443638Z 5b5cbe74bf76: Download complete
2023-01-27T23:15:54.9323257Z 03f027d5e312: Pull complete
2023-01-27T23:15:56.0906680Z 591b0f932310: Pull complete
2023-01-27T23:15:56.1558543Z 1047c5f4cc7d: Pull complete
2023-01-27T23:15:56.5200457Z 5b5cbe74bf76: Pull complete
2023-01-27T23:15:56.5296728Z Digest: sha256:6b85854518f812d94cf2dfee2386df85b9cb78835a872d4769b4335f584c43ba
2023-01-27T23:15:56.5358739Z Status: Downloaded newer image for python:3
2023-01-27T23:15:56.5382862Z  ---> 63490c269128
2023-01-27T23:15:56.5383355Z Step 2/7 : ENV REVIEWDOG_VERSION=v0.13.0
2023-01-27T23:15:56.5655089Z  ---> Running in 0e0f52739097
2023-01-27T23:16:06.3270558Z Removing intermediate container 0e0f52739097
2023-01-27T23:16:06.3309210Z  ---> 6604f09a8964
2023-01-27T23:16:06.3309511Z Step 3/7 : RUN apt-get install bash
2023-01-27T23:16:06.3564222Z  ---> Running in ed9d19ef79fe
2023-01-27T23:16:08.8878785Z Reading package lists...
2023-01-27T23:16:08.8920463Z Building dependency tree...
2023-01-27T23:16:08.8925836Z Reading state information...
2023-01-27T23:16:08.9357205Z bash is already the newest version (5.1-2+deb11u1).
2023-01-27T23:16:08.9357511Z bash set to manually installed.
2023-01-27T23:16:08.9357834Z 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2023-01-27T23:16:10.4029249Z Removing intermediate container ed9d19ef79fe
2023-01-27T23:16:10.4029650Z  ---> bf1b1df1003d
2023-01-27T23:16:10.4030125Z Step 4/7 : RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b /usr/local/bin/ ${REVIEWDOG_VERSION}
2023-01-27T23:16:10.4246775Z  ---> Running in 9852c7703092
2023-01-27T23:16:11.8905716Z �[91mreviewdog/reviewdog info checking GitHub for tag 'v0.13.0'
2023-01-27T23:16:13.9216738Z �[0m�[91mreviewdog/reviewdog info found version:  <!DOCTYPE html> <html lang= for  <!DOCTYPE html> <html lang=/Linux/x86_64
2023-01-27T23:16:14.1264279Z The command '/bin/sh -c wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b /usr/local/bin/ ${REVIEWDOG_VERSION}' returned a non-zero code: 1
2023-01-27T23:16:14.1267032Z �[0m
2023-01-27T23:16:14.1296306Z ##[warning]Docker build failed with exit code 1, back off 8.728 seconds before retry.
2023-01-27T23:16:22.8583298Z ##[command]/usr/bin/docker build -t 49859c:91772305f3e7482b91cfcbfd8112245c -f "/home/runner/work/_actions/reviewdog/action-black/v2/Dockerfile" "/home/runner/work/_actions/reviewdog/action-black/v2"
2023-01-27T23:16:22.8862454Z Sending build context to Docker daemon  41.98kB
2023-01-27T23:16:22.8863011Z 
2023-01-27T23:16:22.9301265Z Step 1/7 : FROM python:3
2023-01-27T23:16:22.9309767Z  ---> 63490c269128
2023-01-27T23:16:22.9310158Z Step 2/7 : ENV REVIEWDOG_VERSION=v0.13.0
2023-01-27T23:16:22.9342386Z  ---> Using cache
2023-01-27T23:16:22.9342658Z  ---> 6604f09a8964
2023-01-27T23:16:22.9343107Z Step 3/7 : RUN apt-get install bash
2023-01-27T23:16:22.9343377Z  ---> Using cache
2023-01-27T23:16:22.9343621Z  ---> bf1b1df1003d
2023-01-27T23:16:22.9345176Z Step 4/7 : RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b /usr/local/bin/ ${REVIEWDOG_VERSION}
2023-01-27T23:16:22.9658215Z  ---> Running in d0eb9c912c5a
2023-01-27T23:16:23.2550915Z �[91mreviewdog/reviewdog info checking GitHub for tag 'v0.13.0'
2023-01-27T23:16:23.7717035Z �[0m�[91mreviewdog/reviewdog info found version:  <!DOCTYPE html> <html lang= for  <!DOCTYPE html> <html lang=/Linux/x86_64
2023-01-27T23:16:23.9813059Z The command '/bin/sh -c wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b /usr/local/bin/ ${REVIEWDOG_VERSION}' returned a non-zero code: 1
2023-01-27T23:16:23.9833908Z �[0m
2023-01-27T23:16:23.9835892Z ##[warning]Docker build failed with exit code 1, back off 4.085 seconds before retry.
2023-01-27T23:16:28.0708936Z ##[command]/usr/bin/docker build -t 49859c:91772305f3e7482b91cfcbfd8112245c -f "/home/runner/work/_actions/reviewdog/action-black/v2/Dockerfile" "/home/runner/work/_actions/reviewdog/action-black/v2"
2023-01-27T23:16:28.0954496Z Sending build context to Docker daemon  41.98kB
2023-01-27T23:16:28.0956084Z 
2023-01-27T23:16:28.1406825Z Step 1/7 : FROM python:3
2023-01-27T23:16:28.1413644Z  ---> 63490c269128
2023-01-27T23:16:28.1417180Z Step 2/7 : ENV REVIEWDOG_VERSION=v0.13.0
2023-01-27T23:16:28.1424617Z  ---> Using cache
2023-01-27T23:16:28.1425216Z  ---> 6604f09a8964
2023-01-27T23:16:28.1426033Z Step 3/7 : RUN apt-get install bash
2023-01-27T23:16:28.1430952Z  ---> Using cache
2023-01-27T23:16:28.1432715Z  ---> bf1b1df1003d
2023-01-27T23:16:28.1434421Z Step 4/7 : RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b /usr/local/bin/ ${REVIEWDOG_VERSION}
2023-01-27T23:16:28.1736407Z  ---> Running in b73dd67d1326
2023-01-27T23:16:28.4829802Z �[91mreviewdog/reviewdog info checking GitHub for tag 'v0.13.0'
2023-01-27T23:16:28.9464292Z �[0m�[91mreviewdog/reviewdog info found version:  <!DOCTYPE html> <html lang= for  <!DOCTYPE html> <html lang=/Linux/x86_64
2023-01-27T23:16:29.1591695Z The command '/bin/sh -c wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b /usr/local/bin/ ${REVIEWDOG_VERSION}' returned a non-zero code: 1

Looking at the reviewdog install script, it looks like it tries to make a request kind of like this (depending on if you specify a tag, wget may also be used):

curl -w '%{http_code}' -sL -H "Accept:application/json" -o ./tmp.html 'https://github.com/reviewdog/reviewdog/releases/v0.14.1'

Running that command locally for me though returns html and not json. I think that's why we're seeing this line in your output:

2023-01-27T23:16:28.9464292Z �[0m�[91mreviewdog/reviewdog info found version:  <!DOCTYPE html> <html lang= for  <!DOCTYPE html> <html lang=/Linux/x86_64

Not sure why the accept header isn't working though.

Yeah, its as if the latest tag disappeared:

Or are y'all seeing issues for pinned versions as well?

2023-01-27T23:34:12.0257709Z ##[group]🐶 Installing reviewdog ... https://github.com/reviewdog/reviewdog
2023-01-27T23:34:12.0258892Z finding a release for latest
2023-01-27T23:34:12.7452370Z ##[endgroup]
2023-01-27T23:34:12.7510550Z ##[error]Error: unable to find 'latest' - use 'latest' or see https://github.com/reviewdog/reviewdog/releases for details

which in the install script here https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh corresponds to L90-93.

 90   if test -z "$REALTAG"; then
 91     log_crit "unable to find '${TAG}' - use 'latest' or see https://github.com/${PREFIX}/releases for details"
 92     exit 1
 93   fi
commented

I don't think the issue is related to latest disappearing. Latest appears to be a GitHub semantic that always resolves to the latest release. We can successfully navigate to the latest release for reviewdog: https://github.com/reviewdog/reviewdog/releases/latest

I wonder if GitHub has released a change that ignores the Accept:application/json header for requests to https://github.com. The script may need to be updated to use the API endpoint directly, e.g. https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#get-the-latest-release

It does look like they released a silent update that ignores headers for https://github.com/reviewdog/reviewdog/releases/latest, but you can call https://api.github.com/repos/reviewdog/reviewdog/releases/latest instead and get the JSON response.

Any estimates when the fix will be available?

Any estimates when the fix will be available?

Same Q here. When to expect a fix for this?

Looks like GitHub were able to revert their offending API change - should be working again now.

I'm seeing this failing again, though the cause might be different:

::group::🐶 Installing reviewdog ... https://github.com/reviewdog/reviewdog
🐶 Installing reviewdog ... https://github.com/reviewdog/reviewdog
  reviewdog/reviewdog info checking GitHub for tag 'v0.14.1'
  reviewdog/reviewdog info found version: 0.14.1 for v0.14.1/Linux/x86_64
  reviewdog/reviewdog info installed /tmp/tmp.BakvtHCtrY/reviewdog
  ::endgroup::
::group:: Running `npm install` to install eslint ...
 Running `npm install` to install eslint ...
  
  up to date, audited 1927 packages in 7s
  
  201 packages are looking for funding
    run `npm fund` for details
  
  3 high severity vulnerabilities
  
  To address all issues (including breaking changes), run:
    npm audit fix --force
  
  Run `npm audit` for details.
  ::endgroup::
/home/runner/work/_actions/reviewdog/action-eslint/v1/script.sh: 20: Unknown: not found
eslint version:
::group:: Running eslint with reviewdog 🐶 ...
 Running eslint with reviewdog 🐶 ...
  /home/runner/work/_actions/reviewdog/action-eslint/v1/script.sh: 23: Unknown: not found
  reviewdog: parse error: failed to unmarshal rdjson (DiagnosticResult): proto: syntax error (line 1:1): unexpected token 
  ::endgroup::
Error: Process completed with exit code 1.

I think my issue is actually related to: reviewdog/action-eslint#152

This issue can be closed out

I agree, this has long since been resolved. 👍