Skip to content

Commit

Permalink
Upgrade dependencies and Github runner images
Browse files Browse the repository at this point in the history
  • Loading branch information
fordN committed Dec 7, 2023
1 parent 6df7c56 commit ee40077
Show file tree
Hide file tree
Showing 15 changed files with 406 additions and 70 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/indexer-agent-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
packages: write

Expand All @@ -38,6 +38,10 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: 20
- name: Build and push Indexer Agent image
id: docker_build
uses: docker/build-push-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/indexer-cli-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
packages: write

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/indexer-service-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
packages: write

Expand Down
2 changes: 1 addition & 1 deletion packages/indexer-agent/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"target": "es2015",
"target": "es2022",
"module": "commonjs",
"declaration": true,
"sourceMap": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/indexer-cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"target": "es2015",
"target": "es2022",
"module": "commonjs",
"composite": false,
"declaration": false,
Expand Down
46 changes: 23 additions & 23 deletions packages/indexer-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
"dependencies": {
"@graphprotocol/common-ts": "2.0.9",
"@graphprotocol/cost-model": "0.1.18",
"@thi.ng/heaps": "1.2.38",
"@types/lodash.clonedeep": "^4.5.7",
"@types/lodash.intersection": "^4.4.7",
"@types/lodash.xor": "^4.5.7",
"@thi.ng/heaps": "2.1.46",
"@types/lodash.clonedeep": "^4.5.9",
"@types/lodash.intersection": "^4.4.9",
"@types/lodash.xor": "^4.5.9",
"@urql/core": "2.4.4",
"@urql/exchange-execute": "1.2.2",
"axios": "0.26.1",
"axios": "1.6.2",
"body-parser": "1.20.2",
"cors": "2.8.5",
"ethers": "5.7.0",
Expand All @@ -46,34 +46,34 @@
"lodash.xor": "^4.5.0",
"morgan": "1.10.0",
"ngeohash": "0.6.3",
"p-filter": "2.1.0",
"p-map": "4.0.0",
"p-reduce": "2.1.0",
"p-retry": "4.6.1",
"p-filter": "3.0.0",
"p-map": "7.0.0",
"p-reduce": "3.0.0",
"p-retry": "6.1.0",
"p-timeout": "4.1.0",
"parsimmon": "^1.18.1",
"sequelize": "6.33.0",
"ts-custom-error": "^3.2.0",
"ts-custom-error": "^3.3.1",
"zod": "^3.21.4"
},
"devDependencies": {
"@types/cors": "2.8.14",
"@types/express": "4.17.17",
"@types/jest": "29.5.4",
"@types/lodash.groupby": "^4.6.7",
"@types/lodash.isequal": "4.5.6",
"@types/morgan": "1.9.5",
"@types/ngeohash": "0.6.4",
"@types/node": "20.6.1",
"@types/cors": "2.8.17",
"@types/express": "4.17.21",
"@types/jest": "29.5.11",
"@types/lodash.groupby": "^4.6.9",
"@types/lodash.isequal": "4.5.8",
"@types/morgan": "1.9.9",
"@types/ngeohash": "0.6.8",
"@types/node": "20.10.3",
"@types/parsimmon": "^1.10.6",
"@typescript-eslint/eslint-plugin": "6.7.0",
"@typescript-eslint/parser": "6.7.0",
"eslint": "8.49.0",
"eslint-config-prettier": "8.5.0",
"@typescript-eslint/eslint-plugin": "6.13.2",
"@typescript-eslint/parser": "6.13.2",
"eslint": "8.55.0",
"eslint-config-prettier": "9.1.0",
"jest": "<30.0.0-0",
"prettier": "3.0.3",
"ts-jest": "29.1.1",
"typescript": "5.2.2"
"typescript": "5.3.3"
},
"resolutions": {
"ethers": "5.7.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/indexer-common/src/graph-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
IndexerErrorCode,
} from './errors'
import { BlockPointer, ChainIndexingStatus, IndexingStatus } from './types'
import pRetry from 'p-retry'
import pRetry, { Options } from 'p-retry'
import axios, { AxiosInstance } from 'axios'
import fetch from 'isomorphic-fetch'

Expand Down Expand Up @@ -114,7 +114,7 @@ export class GraphNode {
err: err.message,
})
},
} as pRetry.Options,
} as Options,
)
} catch (error) {
const err = indexerError(IndexerErrorCode.IE024, error)
Expand Down Expand Up @@ -468,7 +468,7 @@ export class GraphNode {
err: err.message,
})
},
} as pRetry.Options)
} as Options)
} catch (error) {
const err = indexerError(IndexerErrorCode.IE018, error)
this.logger.error(`Failed to query indexing status API`, {
Expand Down Expand Up @@ -542,7 +542,7 @@ export class GraphNode {
err: err.message,
})
},
} as pRetry.Options,
} as Options,
)
} catch (error) {
const err = indexerError(IndexerErrorCode.IE019, error)
Expand Down Expand Up @@ -607,7 +607,7 @@ export class GraphNode {
err: err.message,
})
},
} as pRetry.Options,
} as Options,
)
} catch (error) {
const err = indexerError(IndexerErrorCode.IE070, error)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class AllocationManager {
try {
return await this.confirmActionExecution(receipt, action)
} catch (error) {
let transaction = undefined
let transaction: string | undefined = undefined
if (typeof receipt == 'object') {
transaction = receipt.transactionHash ?? undefined
}
Expand Down
6 changes: 3 additions & 3 deletions packages/indexer-common/src/indexer-management/monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
import { BigNumber } from 'ethers'
import gql from 'graphql-tag'
import { providers, utils, Wallet } from 'ethers'
import pRetry from 'p-retry'
import pRetry, { Options } from 'p-retry'
import { IndexerOptions } from '../network-specification'
import pMap from 'p-map'

Expand Down Expand Up @@ -579,7 +579,7 @@ export class NetworkMonitor {
}

async subgraphDeployments(): Promise<SubgraphDeployment[]> {
const deployments = []
const deployments: SubgraphDeployment[] = []
const queryProgress = {
lastCreatedAt: 0,
first: 10,
Expand Down Expand Up @@ -797,7 +797,7 @@ Please submit an issue at https://github.com/graphprotocol/block-oracle/issues/n
err: err.message,
})
},
} as pRetry.Options)
} as Options)
} catch (err) {
if (err instanceof indexerError) {
throw err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const testURL = async (
url: string,
tests: Test[],
): Promise<{ url: string; ok: boolean; tests: TestResult[] }> => {
const results = []
const results: TestResult[] = []

for (const test of tests) {
const cmd = test.test(url)
Expand All @@ -49,7 +49,7 @@ const testURL = async (
}
}

return { url, tests: results, ok: !results.find((result) => result.error !== null) }
return { url, tests: results, ok: !results.find((result) => result['error'] !== null) }
}

const URL_VALIDATION_TEST: Test = {
Expand Down
10 changes: 5 additions & 5 deletions packages/indexer-common/src/indexer-management/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ export const parseGraphQLSubgraphDeployment = (
subgraphDeployment: any,
protocolNetwork: string,
): SubgraphDeployment => ({
id: new SubgraphDeploymentID(subgraphDeployment.id),
deniedAt: subgraphDeployment.deniedAt,
stakedTokens: BigNumber.from(subgraphDeployment.stakedTokens),
signalledTokens: BigNumber.from(subgraphDeployment.signalledTokens),
queryFeesAmount: BigNumber.from(subgraphDeployment.queryFeesAmount),
id: new SubgraphDeploymentID(subgraphDeployment['id']),
deniedAt: subgraphDeployment['deniedAt'],
stakedTokens: BigNumber.from(subgraphDeployment['stakedTokens']),
signalledTokens: BigNumber.from(subgraphDeployment['signalledTokens']),
queryFeesAmount: BigNumber.from(subgraphDeployment['queryFeesAmount']),
protocolNetwork,
})

Expand Down
4 changes: 2 additions & 2 deletions packages/indexer-common/src/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { providers, Wallet } from 'ethers'
import { strict as assert } from 'assert'
import geohash from 'ngeohash'

import pRetry from 'p-retry'
import pRetry, { Options } from 'p-retry'
import { resolveChainId } from './indexer-management'
import { monitorEthBalance } from './utils'
import { QueryFeeModels } from './query-fees'
Expand Down Expand Up @@ -412,7 +412,7 @@ export class Network {
throw error
}
},
{ retries: 5 } as pRetry.Options,
{ retries: 5 } as Options,
)
}
}
Expand Down
3 changes: 2 additions & 1 deletion packages/indexer-common/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"target": "es2015",
"target": "es2022",
"module": "commonjs",
"declaration": true,
"sourceMap": true,
"esModuleInterop": true,
"strict": true,
"noImplicitAny": false,
"composite": true,
"lib": [
"esnext.asynciterable",
Expand Down
2 changes: 1 addition & 1 deletion packages/indexer-service/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"target": "es2015",
"target": "es2022",
"module": "commonjs",
"declaration": true,
"sourceMap": true,
Expand Down
Loading

0 comments on commit ee40077

Please sign in to comment.