Skip to content

Commit

Permalink
all: release-0.21.7 bump, paused migration fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dwerner committed Nov 12, 2024
1 parent a4ea1a4 commit 3297fa9
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 14 deletions.
4 changes: 2 additions & 2 deletions docs/networks/arbitrum-sepolia.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ The Graph Network's testnet is on Arbitrum Sepolia (eip155:421614). Sepolia netw
| Component | Release |
| ------------------ | ------------------------------------------------------------------------------------ |
| contracts | [5.3.3](https://github.com/graphprotocol/contracts/releases/tag/v5.3.3) |
| indexer-agent | [0.21.6-2](https://github.com/graphprotocol/indexer/releases/tag/v0.21.6-2) |
| indexer-cli | [0.21.6-2](https://github.com/graphprotocol/indexer/releases/tag/v0.21.6-2) |
| indexer-agent | [0.21.7](https://github.com/graphprotocol/indexer/releases/tag/v0.21.7) |
| indexer-cli | [0.21.7](https://github.com/graphprotocol/indexer/releases/tag/v0.21.7) |
| indexer-service-rs | [1.0.0](https://github.com/graphprotocol/indexer-rs/releases/tag/v1.0.0) |
| tap-agent | [1.0.0](https://github.com/graphprotocol/indexer-rs/releases/tag/v1.0.0) |
| graph-node | [0.35.1](https://github.com/graphprotocol/graph-node/releases/tag/v0.35.1) |
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "0.21.6-2"
"version": "0.21.7"
}
4 changes: 2 additions & 2 deletions packages/indexer-agent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphprotocol/indexer-agent",
"version": "0.21.6-2",
"version": "0.21.7",
"description": "Indexer agent",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down Expand Up @@ -30,7 +30,7 @@
},
"dependencies": {
"@graphprotocol/common-ts": "2.0.11",
"@graphprotocol/indexer-common": "^0.21.6-2",
"@graphprotocol/indexer-common": "^0.21.7",
"@thi.ng/heaps": "^1.3.1",
"@uniswap/sdk": "3.0.3",
"axios": "0.26.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,15 @@ export async function up({ context }: Context): Promise<void> {
indexNodes,
})

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

// If the target node is specified, use it. Otherwise, use the node with the least deployments
const targetNode = specifiedTargetNode || leastDeploymentsNode

const pausedDeploymentAssignments =
await graphNode.subgraphDeploymentsAssignments(SubgraphStatus.PAUSED)

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

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

for (const deploymentAssignment of virtuallyPausedDeploymentAssignments) {
await graphNode.reassign(deploymentAssignment.id, targetNode)
// Here we first pause the subgraph to ensure it does not start indexing
await graphNode.pause(deploymentAssignment.id)
logger.debug('Successfully reassigned and paused deployment', {
await graphNode.reassign(deploymentAssignment.id, targetNode)
logger.debug('Successfully paused and reassigned deployment', {
deployment: deploymentAssignment.id.ipfsHash,
})
}
Expand Down
4 changes: 2 additions & 2 deletions packages/indexer-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphprotocol/indexer-cli",
"version": "0.21.6-2",
"version": "0.21.7",
"description": "Indexer CLI for The Graph Network",
"main": "./dist/cli.js",
"files": [
Expand All @@ -27,7 +27,7 @@
},
"dependencies": {
"@graphprotocol/common-ts": "2.0.11",
"@graphprotocol/indexer-common": "^0.21.6-2",
"@graphprotocol/indexer-common": "^0.21.7",
"@iarna/toml": "2.2.5",
"@thi.ng/iterators": "5.1.74",
"@urql/core": "3.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/indexer-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphprotocol/indexer-common",
"version": "0.21.6-2",
"version": "0.21.7",
"description": "Common library for Graph Protocol indexer components",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/indexer-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphprotocol/indexer-service",
"version": "0.21.6-2",
"version": "0.21.7",
"description": "Indexer service",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down Expand Up @@ -33,7 +33,7 @@
"dependencies": {
"@google-cloud/profiler": "6.0.1",
"@graphprotocol/common-ts": "2.0.11",
"@graphprotocol/indexer-common": "^0.21.6-2",
"@graphprotocol/indexer-common": "^0.21.7",
"@graphprotocol/indexer-native": "0.21.6",
"@graphql-tools/load": "8.0.0",
"@graphql-tools/url-loader": "8.0.0",
Expand Down

0 comments on commit 3297fa9

Please sign in to comment.