graph-tooling
graph-tooling copied to clipboard
Can not run `graph test`
I am trying to run unit tests for my subgraph (as part of CI on github actions). The script is crashing with the following error. All the tests run properly locally using the -d Docker flag. Any idea what is happening there?
Note that this is running inside a Docker image, using yarn workspaces
Fetching latest version tag
OS type: Alpine Linux
OS arch: x64
OS release: 5.15.0-1019-azure
OS major version: 5
CPU model: Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
Download link: https://github.com/LimeChain/matchstick/releases/download/0.5.3/binary-linux-20
Downloading release from https://github.com/LimeChain/matchstick/releases/download/0.5.3/binary-linux-20
binary-linux-20 has been installed!
Error: spawnSync /home/unlock/subgraph/node_modules/binary-install-raw/bin/0.5.3/binary-linux-20 ENOENT
at Object.spawnSync (node:internal/child_process:1112:20)
at spawnSync (node:child_process:827:24)
at Binary.run (/home/unlock/subgraph/node_modules/binary-install-raw/index.js:111:20)
at runBinary (/home/unlock/subgraph/node_modules/@graphprotocol/graph-cli/src/commands/test.js:164:50)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
errno: -2,
code: 'ENOENT',
syscall: 'spawnSync /home/unlock/subgraph/node_modules/binary-install-raw/bin/0.5.3/binary-linux-20',
path: '/home/unlock/subgraph/node_modules/binary-install-raw/bin/0.5.3/binary-linux-20',
spawnargs: []
}
1
Error: Process completed with exit code 1.
We are running against the same issue as our CI env is using Bookworm, which does not have libssl.so.1.1 but is required by the binary-install-raw package and that package seems out of date... but used by the graph CLI.
.../subgraph/node_modules/binary-install-raw/bin/0.5.2/binary-linux-20: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Can you clarify the use of that library please and if you would take a PR that replaces it?
cc @saihaj can you clarify here?
so we use that package to run the matchstick binary but maybe there is a better way to do this https://github.com/graphprotocol/graph-tooling/blob/3860fb58190aad708a754a0338b1c37475943e25/packages/cli/src/commands/test.ts#L133-L173 happy for any PRs that improve this.
We are also planning to revamp graph test instead of installing a binary we want the matchstick functionality natively from the CLI using some rust binding magic