@@ -384,7 +384,7 @@ func (e *Engine) watchForModuleChanges(ctx context.Context, period time.Duration
384
384
}()
385
385
386
386
// Build and deploy all modules first.
387
- _ = e .BuildAndDeploy (ctx , 1 , true , false ) //nolint:errcheck
387
+ _ = e .BuildAndDeploy (ctx , optional . None [ int32 ]() , true , false ) //nolint:errcheck
388
388
389
389
// Update schema and set initial module hashes
390
390
for {
@@ -432,7 +432,7 @@ func (e *Engine) watchForModuleChanges(ctx context.Context, period time.Duration
432
432
},
433
433
}
434
434
logger .Debugf ("calling build and deploy %q" , event .Config .Module )
435
- _ = e .BuildAndDeploy (ctx , 1 , false , false , config .Module ) //nolint:errcheck
435
+ _ = e .BuildAndDeploy (ctx , optional . None [ int32 ]() , false , false , config .Module ) //nolint:errcheck
436
436
}
437
437
case watch.WatchEventModuleRemoved :
438
438
err := e .deployCoordinator .terminateModuleDeployment (ctx , event .Config .Module )
@@ -476,7 +476,7 @@ func (e *Engine) watchForModuleChanges(ctx context.Context, period time.Duration
476
476
meta .module .Config = validConfig
477
477
e .moduleMetas .Store (event .Config .Module , meta )
478
478
479
- _ = e .BuildAndDeploy (ctx , 1 , false , false , event .Config .Module ) //nolint:errcheck
479
+ _ = e .BuildAndDeploy (ctx , optional . None [ int32 ]() , false , false , event .Config .Module ) //nolint:errcheck
480
480
}
481
481
case event := <- e .deployCoordinator .SchemaUpdates :
482
482
e .targetSchema .Store (event .schema )
@@ -509,7 +509,7 @@ func (e *Engine) watchForModuleChanges(ctx context.Context, period time.Duration
509
509
})
510
510
if len (dependentModuleNames ) > 0 {
511
511
logger .Infof ("%s's schema changed; processing %s" , module .Name , strings .Join (dependentModuleNames , ", " )) //nolint:forbidigo
512
- _ = e .BuildAndDeploy (ctx , 1 , false , false , dependentModuleNames ... ) //nolint:errcheck
512
+ _ = e .BuildAndDeploy (ctx , optional . None [ int32 ]() , false , false , dependentModuleNames ... ) //nolint:errcheck
513
513
}
514
514
}
515
515
@@ -561,7 +561,7 @@ func (e *Engine) watchForModuleChanges(ctx context.Context, period time.Duration
561
561
}
562
562
}
563
563
go func () {
564
- _ = e .deployCoordinator .deploy (ctx , e .projectConfig , modulesToDeploy , 1 ) //nolint:errcheck
564
+ _ = e .deployCoordinator .deploy (ctx , e .projectConfig , modulesToDeploy , optional . None [ int32 ]() ) //nolint:errcheck
565
565
}()
566
566
}
567
567
@@ -575,7 +575,7 @@ func (e *Engine) watchForModuleChanges(ctx context.Context, period time.Duration
575
575
modulesToBuild [event .module ] = true
576
576
}
577
577
if len (modulesToBuild ) > 0 {
578
- _ = e .BuildAndDeploy (ctx , 1 , false , false , maps .Keys (modulesToBuild )... ) //nolint
578
+ _ = e .BuildAndDeploy (ctx , optional . None [ int32 ]() , false , false , maps .Keys (modulesToBuild )... ) //nolint
579
579
}
580
580
}
581
581
}
@@ -789,7 +789,7 @@ func (e *Engine) getDependentModuleNames(moduleName string) []string {
789
789
}
790
790
791
791
// BuildAndDeploy attempts to build and deploy all local modules.
792
- func (e * Engine ) BuildAndDeploy (ctx context.Context , replicas int32 , waitForDeployOnline bool , singleChangeset bool , moduleNames ... string ) (err error ) {
792
+ func (e * Engine ) BuildAndDeploy (ctx context.Context , replicas optional. Option [ int32 ] , waitForDeployOnline bool , singleChangeset bool , moduleNames ... string ) (err error ) {
793
793
logger := log .FromContext (ctx )
794
794
if len (moduleNames ) == 0 {
795
795
moduleNames = e .Modules ()
0 commit comments