Skip to content

Commit

Permalink
Format func params and comment
Browse files Browse the repository at this point in the history
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
  • Loading branch information
t-kikuc committed Jul 8, 2024
1 parent d17a9b7 commit 5103158
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
12 changes: 11 additions & 1 deletion pkg/app/piped/executor/ecs/ecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,17 @@ func createPrimaryTaskSet(ctx context.Context, client provider.Client, service t
return nil
}

func sync(ctx context.Context, in *executor.Input, platformProviderName string, platformProviderCfg *config.PlatformProviderECSConfig, recreate bool, taskDefinition types.TaskDefinition, serviceDefinition types.Service, targetGroup *types.LoadBalancer, ignoreDesiredCountOnUpdate bool) bool {
func sync(
ctx context.Context,
in *executor.Input,
platformProviderName string,
platformProviderCfg *config.PlatformProviderECSConfig,
recreate bool,
taskDefinition types.TaskDefinition,
serviceDefinition types.Service,
targetGroup *types.LoadBalancer,
ignoreDesiredCountOnUpdate bool,
) bool {
client, err := provider.DefaultRegistry().Client(platformProviderName, platformProviderCfg, in.Logger)
if err != nil {
in.LogPersister.Errorf("Unable to create ECS client for the provider %s: %v", platformProviderName, err)
Expand Down
12 changes: 11 additions & 1 deletion pkg/app/piped/executor/ecs/rollback.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,17 @@ func (e *rollbackExecutor) ensureRollback(ctx context.Context) model.StageStatus
return model.StageStatus_STAGE_SUCCESS
}

func rollback(ctx context.Context, in *executor.Input, platformProviderName string, platformProviderCfg *config.PlatformProviderECSConfig, taskDefinition types.TaskDefinition, serviceDefinition types.Service, primaryTargetGroup *types.LoadBalancer, canaryTargetGroup *types.LoadBalancer, ignoreDesiredCountOnUpdate bool) bool {
func rollback(
ctx context.Context,
in *executor.Input,
platformProviderName string,
platformProviderCfg *config.PlatformProviderECSConfig,
taskDefinition types.TaskDefinition,
serviceDefinition types.Service,
primaryTargetGroup *types.LoadBalancer,
canaryTargetGroup *types.LoadBalancer,
ignoreDesiredCountOnUpdate bool,
) bool {
in.LogPersister.Infof("Start rollback the ECS service and task family: %s and %s to original stage", *serviceDefinition.ServiceName, *taskDefinition.Family)
client, err := provider.DefaultRegistry().Client(platformProviderName, platformProviderCfg, in.Logger)
if err != nil {
Expand Down
3 changes: 1 addition & 2 deletions pkg/config/application_ecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ type ECSDeploymentInput struct {
// - SERVICE_DISCOVERY - The service is accessed via ECS Service Discovery.
// Default is ELB.
AccessType string `json:"accessType,omitempty" default:"ELB"`

// Whether to ignore desiredCount of the service definition when updating the service.
// Whether to ignore the desiredCount of the service definition when updating the service.
// If this is set as true, the desiredCount will be updated when creating the service, but will not be updated when updating the service.
// Default is false.
IgnoreDesiredCountOnUpdate *bool `json:"ignoreDesiredCountOnUpdate,omitempty" default:"false"`
Expand Down

0 comments on commit 5103158

Please sign in to comment.