kong/setup-inso@v2 returns HTTP 404 errors for seemingly valid version when used in github actions
- Dominant language
- JavaScript
- Stars
- 12
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
When trying to use github actions script like the following to install and use inso CLI:
```
name: API Validation
on:
pull_request:
paths: ['api-spec.yaml', '.spectral.yaml']
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: kong/setup-inso@v2
with: {inso-version: "13.0.2"}
- run: inso lint spec
- name: Run collection
run: |
INSO_WORK_ID=$(awk '/wrk_/{print $2}' api-spec.yaml)
inso run collection -w api-spec.yaml $INSO_WORK_ID \
--env "OpenAPI env localhost:8081"
```
Running this results in an error like:
```
Run kong/setup-inso@v2
with:
inso-version: 13.0.2
wrapper: false
Installing inso version linux-13.0.2
/home/runner/work/_actions/kong/setup-inso/v2/dist/index.js:3640
const err = new HTTPError(response.message.statusCode);
^
HTTPError: Unexpected HTTP response: 404
at /home/runner/work/_actions/kong/setup-inso/v2/dist/index.js:3640:25
at Generator.next ()
at fulfilled (/home/runner/work/_actions/kong/setup-inso/v2/dist/index.js:3553:58)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {
httpStatusCode: 404
}
Node.js v24.16.0
```
This seems to be due to the URL being queried ending with: .`../inso-linux-13.0.2.tar.xz`
Rather than the correct value which looks like it should be ending with: `.../inso-linux-x64-13.0.2.tar.xz`
Looks like the issue may well be here: https://github.com/Kong/setup-inso/blob/main/index.js#L19-L26 where the logic looks like it is removing `-x64` from the string for versions above 10.99.99.
From what I can see the assets appear to have this sub-string in the 11.0 and higher releases as well, but there no longer look to be any `-arm64` architecture assets after 10.3.1, so looks like the logic needs to be adjusted to account for this, rather than blanket removal of the architecture from the URL string:
13.0.2: https://github.com/Kong/insomnia/releases/download/core%4013.0.2/inso-linux-x64-13.0.2.tar.xz
11.0.0: https://github.com/Kong/insomnia/releases/download/core%4011.0.0/inso-linux-x64-11.0.0.tar.xz
10.3.1: https://github.com/Kong/insomnia/releases/download/core%4010.3.1/inso-linux-x64-10.3.1.tar.xz
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in index.js around lines 19-26 and inspect how the Inso download URL is assembled for versions above 10.99.99. Reproduce the GitHub Actions workflow with Inso 13.0.2, then verify that the action requests the x64 asset and completes installation without a 404.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, javascript
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100