From e1a763cccc69acf2c5cb1d9f86e6aa5aeb616acb Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Fri, 19 Jan 2024 13:20:43 +0000 Subject: [PATCH] fix: forcing the subgraph deploy workflow to fail on error --- .github/workflows/deploy-subgraph.yml | 6 +++++- subgraph/package.json | 2 +- yarn.lock | 22 +++++++++++----------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy-subgraph.yml b/.github/workflows/deploy-subgraph.yml index 4b32f972b..dd5a0ea7b 100644 --- a/.github/workflows/deploy-subgraph.yml +++ b/.github/workflows/deploy-subgraph.yml @@ -84,5 +84,9 @@ jobs: working-directory: subgraph - name: Deploy the subgraph - run: yarn deploy:${{ inputs.subgraph }}:${{ vars.NETWORK }} + run: | + # working around a graph bug which doesn't exit 1 on error: https://github.com/graphprotocol/graph-client/issues/608 + error=$(yarn deploy:${{ inputs.subgraph }}:${{ vars.NETWORK }}) + echo "$error" + [[ $(echo "$error" | tail -n1 | grep -i error) ]] && exit 1 working-directory: subgraph diff --git a/subgraph/package.json b/subgraph/package.json index 5da2f9255..6ff043bb3 100644 --- a/subgraph/package.json +++ b/subgraph/package.json @@ -49,7 +49,7 @@ "@graphprotocol/graph-ts": "^0.32.0" }, "devDependencies": { - "@graphprotocol/graph-cli": "0.64.0", + "@graphprotocol/graph-cli": "0.64.1", "@kleros/kleros-v2-eslint-config": "workspace:^", "@kleros/kleros-v2-prettier-config": "workspace:^", "gluegun": "^5.1.2", diff --git a/yarn.lock b/yarn.lock index 2c64cea3b..c183a6073 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4276,9 +4276,9 @@ __metadata: languageName: node linkType: hard -"@graphprotocol/graph-cli@npm:0.64.0": - version: 0.64.0 - resolution: "@graphprotocol/graph-cli@npm:0.64.0" +"@graphprotocol/graph-cli@npm:0.64.1": + version: 0.64.1 + resolution: "@graphprotocol/graph-cli@npm:0.64.1" dependencies: "@float-capital/float-subgraph-uncrashable": ^0.0.0-alpha.4 "@oclif/core": 2.8.6 @@ -4300,7 +4300,7 @@ __metadata: ipfs-http-client: 55.0.0 jayson: 4.0.0 js-yaml: 3.14.1 - prettier: 1.19.1 + prettier: 3.0.3 request: 2.88.2 semver: 7.4.0 sync-request: 6.1.0 @@ -4310,7 +4310,7 @@ __metadata: yaml: 1.10.2 bin: graph: bin/run - checksum: f4abd1fac20e235e4d8e459ce3495fe4910064fc6d53e725dacb67d8814c95ce0eb38c8f8ec6b92db33b371ae5f59ebda86164bd437b48a82bee3729c030bcc0 + checksum: cb390037538cf79576a13673b6848930fd01bd0c5ac521092f7425caafb37b051cf86e6bb3b92457b632c5933aa19b27eb93740fe3fd895b8050c9b575329600 languageName: node linkType: hard @@ -5531,7 +5531,7 @@ __metadata: version: 0.0.0-use.local resolution: "@kleros/kleros-v2-subgraph@workspace:subgraph" dependencies: - "@graphprotocol/graph-cli": 0.64.0 + "@graphprotocol/graph-cli": 0.64.1 "@graphprotocol/graph-ts": ^0.32.0 "@kleros/kleros-v2-eslint-config": "workspace:^" "@kleros/kleros-v2-prettier-config": "workspace:^" @@ -27245,12 +27245,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:1.19.1": - version: 1.19.1 - resolution: "prettier@npm:1.19.1" +"prettier@npm:3.0.3": + version: 3.0.3 + resolution: "prettier@npm:3.0.3" bin: - prettier: ./bin-prettier.js - checksum: bc78219e0f8173a808f4c6c8e0a137dd8ebd4fbe013e63fe1a37a82b48612f17b8ae8e18a992adf802ee2cf7428f14f084e7c2846ca5759cf4013c6e54810e1f + prettier: bin/prettier.cjs + checksum: e10b9af02b281f6c617362ebd2571b1d7fc9fb8a3bd17e371754428cda992e5e8d8b7a046e8f7d3e2da1dcd21aa001e2e3c797402ebb6111b5cd19609dd228e0 languageName: node linkType: hard