Skip to content

Commit

Permalink
annotated errors for deploy stage
Browse files Browse the repository at this point in the history
  • Loading branch information
mmd-afegbua committed Jun 5, 2024
1 parent c932205 commit 8ccbd31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 0 additions & 2 deletions packages/sdk-core/previous-versions-testing/queryTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ export const testListenerInitialization = async (query: Query) => {

export const getSubgraphEndpoint = (chainId: number) => {
const resolverData = chainIdToResolverDataMap.get(chainId);
console.log('resolverData:', resolverData); // Log retrieved data
if (!resolverData) throw new Error("Resolver data is undefined");
console.log('subgraphAPIEndpoint:', resolverData.subgraphAPIEndpoint); // Log endpoint URL
return resolverData.subgraphAPIEndpoint;
};

Expand Down
9 changes: 6 additions & 3 deletions packages/subgraph/tasks/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,13 @@ deploy_to_superfluid() {
echo "node url: $nodeUrl, subgraph name: $subgraphName"

$GRAPH_CLI create "$subgraphName" --node "$nodeUrl"
$GRAPH_CLI deploy "$subgraphName" \
if ! output=$($GRAPH_CLI deploy "$subgraphName" \
--version-label "$VERSION_LABEL" \
--node "$nodeUrl" \
--ipfs "$SUPERFLUID_IPFS_API"
--ipfs "$SUPERFLUID_IPFS_API" 2>"$error_log"); then
echo "::error file=check_processes.sh::Error log: '$error_log'"
cat "$error_log"
fi
}

deploy_to_goldsky() {
Expand All @@ -132,7 +135,7 @@ deploy_to_goldsky() {
)

local goldskyNetwork="${legacyNetworkNames[$network]:-$network}"
local subgraphName="protocol-$DEPLOYMENT_ENV-$goldskyNetwork/1.0.0"
local subgraphName="protocol-$DEPLOYMENT_ENV-$goldskyNetwork/$VERSION_LABEL"

$GRAPH_CLI build
# Note: when using Graph CLI to deploy, it implicitly triggers build too, but Goldsky CLI doesn't.
Expand Down

0 comments on commit 8ccbd31

Please sign in to comment.