Open nirmalsunny opened 2 months ago
@nirmalsunny Thanks for reporting! I'm looking for a specific line –
Downloading CC Reporter from ...
in the output log, and it is missing.
Can you get me that URL from your workflow logs please? You can get them after setting ACTIONS_STEP_DEBUG
environment variables to true
and then re-running your workflow – see https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/troubleshooting-workflows/enabling-debug-logging#enabling-runner-diagnostic-logging
Note that this information is already required according to the bug report template.
Thank you for the reply.
Downloading CC Reporter from https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
It looks wrong file is being downloaded.
@nirmalsunny Interesting, this action uses the arch
package to detect the runtime architecture; I'll need your help to take a closer look.
Can you execute this on your runner and paste the output here?
// npm i arch
var arch = require('arch')
console.log(arch())
Additionally, just to make sure you're using the right version of Node, can you also run these and paste the output here?
node -p "process.arch"
node -p "process.platform"
node -p "process.release"
node -p "process.config.variables.host_arch"
$ node -e 'console.log(require("os").arch())'
arm64
$ node -e "var arch = require('arch'); console.log(arch());"
x64
$ node -p "process.arch"
arm64
$ node -p "process.platform"
linux
$ node -p "process.release"
{
name: 'node',
lts: 'Hydrogen',
sourceUrl: 'https://nodejs.org/download/release/v[18](https://github.com/<org>/<repo>/actions/runs/105063558290/job/291055832049#step:4:19).20.4/node-v18.[20](https://github.com/<org>/<repo>/actions/runs/105063558290/job/291055832049#step:4:21).4.tar.gz',
headersUrl: 'https://nodejs.org/download/release/v18.20.4/node-v18.20.4-headers.tar.gz'
}
$ node -p "process.config.variables.host_arch"
arm64
@nirmalsunny Thanks. I notice that you're using the x64 build of Node.js – shouldn't you be using https://nodejs.org/download/release/v18.20.4/node-v18.20.4-linux-arm64.tar.gz instead?
The problem here is that the arch
module is reporting the architecture based on the Node.js binary and the platform it was built for – in your case, you're using the x64
version, when in fact, it should be arm64
.
Same issue for me. I bumped from version v3.2.0
to v9.0.0
. But I had to rollback since it seems that this error is present. This is the our runner info:
node -e "const arch = require('arch'); console.log(arch())" -> x64
node -p "process.arch"- > arm64
node -p "process.platform" -> linux
node -p "process.release" -> {
name: 'node',
lts: 'Hydrogen',
sourceUrl: 'https://nodejs.org/download/release/v18.20.4/node-v18.20.4.tar.gz',
headersUrl: 'https://nodejs.org/download/release/v18.20.4/node-v18.20.4-headers.tar.gz'
}
node -p "process.config.variables.host_arch" -> arm64
In my case I don't have the ability to modify the runner, could we have a parameter where we hardcode the file instead of it being based on the node version? Or maybe in another previous step I should install the node version base on arm64
?
Sorry for the delay.
I have updated the images to make sure that arm64 version of node is installed, and propagating those images to the runners needed some time.
I have also updated the cc to v9. But the error or the outputs from the commands above have not been changed. Either my images did not change or something wrong with node/arch?
I second the suggestion of having an input to specify architecture if it cannot be assumed. Thank you.
Thanks for the details, folks. I will add an option to override the download URL in a forthcoming release.
Describe the bug
The action is failing on arm64 based runners despite using the same config and node version as x64.
Node information
Version of
codeclimate-action
you're usingv8.0.0
Expected behavior The action to work the same way as it does on x64 systems.
Additional context Using self-hosted runners. v6 works.