diff --git a/packages/indexer-agent/src/agent.ts b/packages/indexer-agent/src/agent.ts index f5a1c8583..16eb165f4 100644 --- a/packages/indexer-agent/src/agent.ts +++ b/packages/indexer-agent/src/agent.ts @@ -173,8 +173,8 @@ class Agent { const currentEpoch = timer(600_000).tryMap( () => this.network.contracts.epochManager.currentEpoch(), { - onError: err => - this.logger.warn(`Failed to fetch current epoch`, { err }), + onError: error => + this.logger.warn(`Failed to fetch current epoch`, { error }), }, ) @@ -191,9 +191,9 @@ class Agent { } }, { - onError: err => + onError: error => this.logger.warn(`Failed to fetch start block of current epoch`, { - err, + error, }), }, ) @@ -201,16 +201,16 @@ class Agent { const channelDisputeEpochs = timer(600_000).tryMap( () => this.network.contracts.staking.channelDisputeEpochs(), { - onError: err => - this.logger.warn(`Failed to fetch channel dispute epochs`, { err }), + onError: error => + this.logger.warn(`Failed to fetch channel dispute epochs`, { error }), }, ) const maxAllocationEpochs = timer(600_000).tryMap( () => this.network.contracts.staking.maxAllocationEpochs(), { - onError: err => - this.logger.warn(`Failed to fetch max allocation epochs`, { err }), + onError: error => + this.logger.warn(`Failed to fetch max allocation epochs`, { error }), }, ) @@ -250,9 +250,12 @@ class Agent { const activeDeployments = timer(60_000).tryMap( () => this.indexer.subgraphDeployments(), { - onError: () => + onError: error => this.logger.warn( `Failed to obtain active deployments, trying again later`, + { + error, + }, ), }, ) @@ -260,9 +263,12 @@ class Agent { const networkDeployments = timer(240_000).tryMap( async () => await this.networkMonitor.subgraphDeployments(), { - onError: () => + onError: error => this.logger.warn( `Failed to obtain network deployments, trying again later`, + { + error, + }, ), }, ) @@ -279,9 +285,12 @@ class Agent { : evaluateDeployments(this.logger, networkDeployments, indexingRules) }, { - onError: () => + onError: error => this.logger.warn( `Failed to obtain target allocations, trying again later`, + { + error, + }, ), }, ) @@ -314,9 +323,12 @@ class Agent { : [...targetDeploymentIDs, ...this.offchainSubgraphs] }, { - onError: () => + onError: error => this.logger.warn( `Failed to obtain target deployments, trying again later`, + { + error, + }, ), }, ) @@ -664,7 +676,9 @@ class Agent { this.logger.warn( `The following deployments do not have defined cost models and will use the global cost model if it exists`, { - deployments: deploymentMissingModels, + deployments: deploymentMissingModels.map( + deployment => deployment.ipfsHash, + ), }, ) } @@ -704,7 +718,7 @@ class Agent { deploymentIDSet(activeDeployments) != deploymentIDSet(targetDeployments) ) { // Turning to trace until the above conditional is fixed - this.logger.trace('Reconcile deployments', { + this.logger.debug('Reconcile deployments', { syncing: activeDeployments.map(id => id.display), target: targetDeployments.map(id => id.display), withActiveOrRecentlyClosedAllocation: eligibleAllocationDeployments.map( diff --git a/packages/indexer-agent/src/indexer.ts b/packages/indexer-agent/src/indexer.ts index 810fe1384..5981e481e 100644 --- a/packages/indexer-agent/src/indexer.ts +++ b/packages/indexer-agent/src/indexer.ts @@ -197,7 +197,7 @@ export class Indexer { }, ) - this.logger.info(`Queried index nodes`, { + this.logger.trace(`Queried index nodes`, { indexNodes, }) return indexNodes @@ -731,14 +731,14 @@ export class Indexer { activeDeploymentAllocations .filter(allocation => allocation.createdAtEpoch < epoch) .map(allocation => allocation.id) - logger.info( - `Deployment is not (or no longer) worth allocating towards, close allocation if it is from a previous epoch`, - { - eligibleForClose: activeDeploymentAllocationsEligibleForClose, - }, - ) // Make sure to close all active allocations on the way out if (activeDeploymentAllocationsEligibleForClose.length > 0) { + logger.info( + `Deployment is not (or no longer) worth allocating towards, close allocation`, + { + eligibleForClose: activeDeploymentAllocationsEligibleForClose, + }, + ) await pMap( // We can only close allocations from a previous epoch; // try the others again later diff --git a/packages/indexer-common/src/indexer-management/monitor.ts b/packages/indexer-common/src/indexer-management/monitor.ts index e1a75a107..701297a2f 100644 --- a/packages/indexer-common/src/indexer-management/monitor.ts +++ b/packages/indexer-common/src/indexer-management/monitor.ts @@ -543,7 +543,7 @@ export class NetworkMonitor { } } - this.logger.trace(`Fetched subgraph deployments published to network`, { + this.logger.debug(`Finished fetching subgraph deployments published to network`, { publishedSubgraphs: queryProgress.fetched, }) return deployments diff --git a/packages/indexer-common/src/indexer-management/resolvers/actions.ts b/packages/indexer-common/src/indexer-management/resolvers/actions.ts index 556036c8e..223988149 100644 --- a/packages/indexer-common/src/indexer-management/resolvers/actions.ts +++ b/packages/indexer-common/src/indexer-management/resolvers/actions.ts @@ -41,6 +41,7 @@ async function executeQueueOperation( duplicateAction[0].source === action.source && duplicateAction[0].status === action.status ) { + // TODO: Log this only when update will actually change existing item logger.info( `Action found in queue that effects the same deployment as proposed queue action, updating existing action`, {