graph-tooling
graph-tooling copied to clipboard
CLI exits with 0 even when graph deploy has failed
Which packages are impacted by your issue?
@graphprotocol/graph-cli
Describe the issue
If graph deploy
fails, it should exit with 1, so that the error can be reported or handled in a CI context (e.g. Github workflow), but it exits with 0 currently.
Reproduction
https://github.com/kleros/kleros-v2/actions/runs/7578013905/job/20639879509#step:13:120
Steps to Reproduce the Bug or Issue
- Run
graph deploy --studio -l existingLabel
- Run
echo $?
Expected behavior
If graph deploy
fails, it should exit with 1, so that the error can be reported or handled in a CI context (e.g. Github workflow)
Screenshots or Videos
No response
Platform
- OS: macOS
- NodeJS: 16.20.2
-
@graphprotocol/graph-cli
version(s): [0.64.1]
Subgraph Manifest
No response
Subgraph GraphQL Schema
No response
Additional context
I have only looked at graph deploy
with Studio, but other products or sub-commands might be affected too.
One more report on Discord https://discord.com/channels/438038660412342282/438070183794573313/1207010623297290320
One more report on Discord https://discord.com/channels/438038660412342282/438070183794573313/1207010623297290320
This was me, so I'm adding more information here.
Calling to
$ yarn graph deploy --studio <slug> --deploy-key <key> --version-label <label>
using a <label>
that already exists will fail the deploy process
Build completed: QmcyuNXAXyBsFyk2buzzDxLUc8NTsws5SYAxRbGX8hDPmK
✖ Failed to deploy to Graph node https://api.studio.thegraph.com/deploy/: Version label already exists.
UNCAUGHT EXCEPTION: Error: EEXIT: 1
Done in 17.07s.
but when I call to check the exit code of that, it shows 0
$ echo $?
0
Currently I'm using
$ yarn -v
1.22.19
with the graph packages in my package.json as
"@graphprotocol/graph-cli": "^0.61.0",
"@graphprotocol/graph-ts": "0.30.0",
+1 This is also affecting our CI/CD pipelines. Did you find a workaround?
+1 same issue here
+1, same issue