@@ -262,14 +262,15 @@ export class Agent {
262
262
} ,
263
263
)
264
264
265
- // Skip fetching active deployments if the deployment management mode is manual and POI tracking is disabled
265
+ // Skip fetching active deployments if the deployment management mode is manual, DIPs is disabled, and POI tracking is disabled
266
266
const activeDeployments : Eventual < SubgraphDeploymentID [ ] > =
267
267
sequentialTimerMap (
268
268
{ logger, milliseconds : requestIntervalLarge } ,
269
269
async ( ) => {
270
270
if (
271
271
this . deploymentManagement === DeploymentManagementMode . AUTO ||
272
- network . networkMonitor . poiDisputeMonitoringEnabled ( )
272
+ network . networkMonitor . poiDisputeMonitoringEnabled ( ) ||
273
+ network . specification . indexerOptions . enableDips
273
274
) {
274
275
logger . trace ( 'Fetching active deployments' )
275
276
const assignments =
@@ -497,9 +498,40 @@ export class Agent {
497
498
}
498
499
break
499
500
case DeploymentManagementMode . MANUAL :
500
- this . logger . debug (
501
- `Skipping subgraph deployment reconciliation since DeploymentManagementMode = 'manual'` ,
502
- )
501
+ if ( network . specification . indexerOptions . enableDips ) {
502
+ // Reconcile DIPs deployments anyways
503
+ this . logger . warn (
504
+ `Deployment management is manual, but DIPs is enabled. Reconciling DIPs deployments anyways.` ,
505
+ )
506
+ if ( ! operator . dipsManager ) {
507
+ throw new Error ( 'DipsManager is not available' )
508
+ }
509
+ const dipsDeployments =
510
+ await operator . dipsManager . getActiveDipsDeployments ( )
511
+ const newTargetDeployments = new Set ( [
512
+ ...activeDeployments ,
513
+ ...dipsDeployments ,
514
+ ] )
515
+ try {
516
+ await this . reconcileDeployments (
517
+ activeDeployments ,
518
+ Array . from ( newTargetDeployments ) ,
519
+ eligibleAllocations ,
520
+ )
521
+ } catch ( err ) {
522
+ logger . warn (
523
+ `Exited early while reconciling deployments. Skipped reconciling actions.` ,
524
+ {
525
+ err : indexerError ( IndexerErrorCode . IE005 , err ) ,
526
+ } ,
527
+ )
528
+ return
529
+ }
530
+ } else {
531
+ this . logger . debug (
532
+ `Skipping subgraph deployment reconciliation since DeploymentManagementMode = 'manual'` ,
533
+ )
534
+ }
503
535
break
504
536
default :
505
537
throw new Error (
0 commit comments