Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit aaf662b

Browse files
authored
Merge pull request #1522 from defyrlt/1112-ecs-exit-1-on-old-cfm-events
Ignore previous CFM events on update to avoid false positive errors
2 parents c11a458 + 85f0a7c commit aaf662b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

ecs/up.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@ func (b *ecsAPIService) Up(ctx context.Context, project *types.Project, options
9393
if err != nil {
9494
return err
9595
}
96+
97+
var previousEvents []string
98+
if update {
99+
var err error
100+
previousEvents, err = b.previousStackEvents(ctx, project.Name)
101+
if err != nil {
102+
return err
103+
}
104+
}
105+
96106
operation := stackCreate
97107
if update {
98108
operation = stackUpdate
@@ -121,6 +131,6 @@ func (b *ecsAPIService) Up(ctx context.Context, project *types.Project, options
121131
b.Down(ctx, project.Name, compose.DownOptions{}) // nolint:errcheck
122132
}()
123133

124-
err = b.WaitStackCompletion(ctx, project.Name, operation)
134+
err = b.WaitStackCompletion(ctx, project.Name, operation, previousEvents...)
125135
return err
126136
}

0 commit comments

Comments
 (0)