-
Notifications
You must be signed in to change notification settings - Fork 152
Properly fix waiting for dependencies #979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Jonathan Mezach <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the dependency waiting mechanism for SQL Database Projects by implementing proper waiting for dependencies before attempting to publish a SQL project. Previously, the publish operation may have proceeded without ensuring required resources were ready.
Key Changes:
- Added explicit waiting for dependencies using
WaitForDependenciesAsyncwhen the target is aSqlServerDatabaseResource - Implemented handling of
WaitAnnotationto wait for specific resource states based onWaitType - Ensures all waiting tasks complete before proceeding with dacpac publishing
src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlProjectPublishService.cs
Outdated
Show resolved
Hide resolved
| } | ||
| } | ||
|
|
||
| await Task.WhenAll(waitingTasks); |
Copilot
AI
Nov 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If waitingTasks is empty, Task.WhenAll will return immediately, which is correct behavior. However, if the target is not a SqlServerDatabaseResource and there are no wait annotations, this may proceed without waiting for any dependencies when it should. Consider whether waiting should be mandatory for all resource types.
Signed-off-by: Jonathan Mezach <[email protected]>
|
Looks like this is being hit by #974 as well |
|
@jmezach Great - ran my repro locally, and can confirm that this finally works as expected now |
|
I will test this with #529 as well! |
src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlProjectPublishService.cs
Outdated
Show resolved
Hide resolved
Signed-off-by: Jonathan Mezach <[email protected]>
|
Closing this in favor of #994 |


**Closes #942 **
This should fix the waiting for dependent resources.
PR Checklist
Other information