Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI exits with 0 even when graph deploy has failed #1570

Open
jaybuidl opened this issue Jan 19, 2024 · 2 comments
Open

CLI exits with 0 even when graph deploy has failed #1570

jaybuidl opened this issue Jan 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jaybuidl
Copy link

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

  1. Run graph deploy --studio -l existingLabel
  2. Run echo $?

image

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.

@jaybuidl jaybuidl added the bug Something isn't working label Jan 19, 2024
@saihaj
Copy link
Member

saihaj commented Feb 13, 2024

@JamesEarle
Copy link

JamesEarle commented Feb 13, 2024

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",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants