Should `WaitFor` / `WaitForCompletion` block pulling container resources
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
Currently if you have a container resource that waits on something else, then aspire doesn't start pulling hte container image until after the `WaitFor` or `WaitForCompletion` checks have fully passed.
### Describe the solution you'd like
Pulling can take quite some time, so it would make sense to start puling images as soon as the Aspire application starts, only doing `WaitFor` / `WaitForCompletion` once the image has been pulled.
### Additional context
Repro Steps:
```bash
docker image rm docker.io/library/redis:7.4 -f
```
```cs
var pause = builder.AddExecutable("pause", "pwsh", ".",
"-NoProfile",
"-NoLogo",
"-NonInteractive",
"-Command",
"Write-Host 'Starting Migration'; Start-Sleep -Seconds 10; Write-Host 'Done'");
var redis = builder.AddRedis("redis")
.WaitForCompletion(pause);
```
Contributor guide
Assessment
This issue has not been assessed yet.