Skip to content

Commit 3297fa9

Browse files
committed
all: release-0.21.7 bump, paused migration fix
1 parent a4ea1a4 commit 3297fa9

File tree

7 files changed

+19
-14
lines changed

7 files changed

+19
-14
lines changed

docs/networks/arbitrum-sepolia.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ The Graph Network's testnet is on Arbitrum Sepolia (eip155:421614). Sepolia netw
77
| Component | Release |
88
| ------------------ | ------------------------------------------------------------------------------------ |
99
| contracts | [5.3.3](https://github.com/graphprotocol/contracts/releases/tag/v5.3.3) |
10-
| indexer-agent | [0.21.6-2](https://github.com/graphprotocol/indexer/releases/tag/v0.21.6-2) |
11-
| indexer-cli | [0.21.6-2](https://github.com/graphprotocol/indexer/releases/tag/v0.21.6-2) |
10+
| indexer-agent | [0.21.7](https://github.com/graphprotocol/indexer/releases/tag/v0.21.7) |
11+
| indexer-cli | [0.21.7](https://github.com/graphprotocol/indexer/releases/tag/v0.21.7) |
1212
| indexer-service-rs | [1.0.0](https://github.com/graphprotocol/indexer-rs/releases/tag/v1.0.0) |
1313
| tap-agent | [1.0.0](https://github.com/graphprotocol/indexer-rs/releases/tag/v1.0.0) |
1414
| graph-node | [0.35.1](https://github.com/graphprotocol/graph-node/releases/tag/v0.35.1) |

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
],
55
"npmClient": "yarn",
66
"useWorkspaces": true,
7-
"version": "0.21.6-2"
7+
"version": "0.21.7"
88
}

packages/indexer-agent/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@graphprotocol/indexer-agent",
3-
"version": "0.21.6-2",
3+
"version": "0.21.7",
44
"description": "Indexer agent",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",
@@ -30,7 +30,7 @@
3030
},
3131
"dependencies": {
3232
"@graphprotocol/common-ts": "2.0.11",
33-
"@graphprotocol/indexer-common": "^0.21.6-2",
33+
"@graphprotocol/indexer-common": "^0.21.7",
3434
"@thi.ng/heaps": "^1.3.1",
3535
"@uniswap/sdk": "3.0.3",
3636
"axios": "0.26.1",

packages/indexer-agent/src/db/migrations/14-use-new-deployment-pause-mechanism.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,15 @@ export async function up({ context }: Context): Promise<void> {
3434
indexNodes,
3535
})
3636

37-
const targetNode =
37+
const specifiedTargetNode = process.env.INDEXER_PAUSED_TARGET_NODE
38+
const leastDeploymentsNode =
3839
indexNodes.sort((nodeA, nodeB) => {
3940
return nodeA.deployments.length - nodeB.deployments.length
4041
})[0]?.id || 'default'
4142

43+
// If the target node is specified, use it. Otherwise, use the node with the least deployments
44+
const targetNode = specifiedTargetNode || leastDeploymentsNode
45+
4246
const pausedDeploymentAssignments =
4347
await graphNode.subgraphDeploymentsAssignments(SubgraphStatus.PAUSED)
4448

@@ -49,7 +53,7 @@ export async function up({ context }: Context): Promise<void> {
4953
)
5054

5155
logger.info(
52-
'Reassigning paused subgraphs to valid node_id (targetNode), then pausing',
56+
'Pausing subgraphs, then reassigning them to valid node_id (targetNode)',
5357
{
5458
pausedSubgraphs: virtuallyPausedDeploymentAssignments.map(
5559
details => details.id,
@@ -59,9 +63,10 @@ export async function up({ context }: Context): Promise<void> {
5963
)
6064

6165
for (const deploymentAssignment of virtuallyPausedDeploymentAssignments) {
62-
await graphNode.reassign(deploymentAssignment.id, targetNode)
66+
// Here we first pause the subgraph to ensure it does not start indexing
6367
await graphNode.pause(deploymentAssignment.id)
64-
logger.debug('Successfully reassigned and paused deployment', {
68+
await graphNode.reassign(deploymentAssignment.id, targetNode)
69+
logger.debug('Successfully paused and reassigned deployment', {
6570
deployment: deploymentAssignment.id.ipfsHash,
6671
})
6772
}

packages/indexer-cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@graphprotocol/indexer-cli",
3-
"version": "0.21.6-2",
3+
"version": "0.21.7",
44
"description": "Indexer CLI for The Graph Network",
55
"main": "./dist/cli.js",
66
"files": [
@@ -27,7 +27,7 @@
2727
},
2828
"dependencies": {
2929
"@graphprotocol/common-ts": "2.0.11",
30-
"@graphprotocol/indexer-common": "^0.21.6-2",
30+
"@graphprotocol/indexer-common": "^0.21.7",
3131
"@iarna/toml": "2.2.5",
3232
"@thi.ng/iterators": "5.1.74",
3333
"@urql/core": "3.1.0",

packages/indexer-common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@graphprotocol/indexer-common",
3-
"version": "0.21.6-2",
3+
"version": "0.21.7",
44
"description": "Common library for Graph Protocol indexer components",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",

packages/indexer-service/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@graphprotocol/indexer-service",
3-
"version": "0.21.6-2",
3+
"version": "0.21.7",
44
"description": "Indexer service",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",
@@ -33,7 +33,7 @@
3333
"dependencies": {
3434
"@google-cloud/profiler": "6.0.1",
3535
"@graphprotocol/common-ts": "2.0.11",
36-
"@graphprotocol/indexer-common": "^0.21.6-2",
36+
"@graphprotocol/indexer-common": "^0.21.7",
3737
"@graphprotocol/indexer-native": "0.21.6",
3838
"@graphql-tools/load": "8.0.0",
3939
"@graphql-tools/url-loader": "8.0.0",

0 commit comments

Comments
 (0)