Skip to content

Commit

Permalink
fix: improve depends-on condition for wait-for-resources (#165)
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Meier <[email protected]>
  • Loading branch information
astromechza authored Jul 10, 2024
1 parent ec9a47c commit a502c64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/command/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ arguments.
if service.DependsOn == nil {
service.DependsOn = make(types.DependsOnConfig)
}
service.DependsOn[waitServiceName] = types.ServiceDependency{Condition: "service_started"}
service.DependsOn[waitServiceName] = types.ServiceDependency{Condition: "service_completed_successfully", Required: true}
}
superProject.Services[serviceName] = service
}
Expand Down
8 changes: 4 additions & 4 deletions internal/command/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ services:
compose.score.dev/workload-name: example
depends_on:
wait-for-resources:
condition: service_started
required: false
condition: service_completed_successfully
required: true
hostname: example
image: foo
generic_service:
Expand Down Expand Up @@ -663,8 +663,8 @@ services:
compose.score.dev/workload-name: example
depends_on:
wait-for-resources:
condition: service_started
required: false
condition: service_completed_successfully
required: true
hostname: example
image: busybox
foo-service:
Expand Down

0 comments on commit a502c64

Please sign in to comment.