Merged
Conversation
Add explicit start option for SQL projects Update to check for `ExplicitStartupAnnotation` to determine resource state. Modify the redeploy command and add a test case in `AddSqlProjectTests.cs` to verify the new behavior.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces an explicit startup option for SQL projects, allowing users to delay the SQL project deployment until explicitly triggered.
- Added a new test case in AddSqlProjectTests to verify the explicit startup behavior.
- Modified SqlProjectBuilderExtensions to check for an ExplicitStartupAnnotation and adjust command state accordingly.
- Updated the example project to demonstrate the use of the explicit start option.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.Tests/AddSqlProjectTests.cs | Added a new test to verify explicit startup behavior |
| src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlProjectBuilderExtensions.cs | Updated event subscriptions and redeploy command to support explicit start |
| examples/sql-database-projects/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.AppHost/Program.cs | Demonstrated the new explicit start option |
Comments suppressed due to low confidence (1)
src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlProjectBuilderExtensions.cs:247
- The command identifier remains 'redeploy' even though the display name is 'Deploy'. Consider aligning the identifier with the display name or documenting the rationale to avoid potential confusion.
builder.WithCommand( "redeploy", "Deploy", async (context) => {
jmezach
reviewed
May 9, 2025
src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlProjectBuilderExtensions.cs
Show resolved
Hide resolved
Member
|
@ErikEJ, Next time, please use 'squash' to merge PRs to keep the history clean. |
Contributor
Author
|
Thanks, I will keep that in mind |
This was referenced Aug 5, 2025
This was referenced Aug 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #638
Add explicit start option for SQL projects
Update to check for
ExplicitStartupAnnotationto determine resource state. Modify the redeploy command and add a test case inAddSqlProjectTests.csto verify the new behavior.PR Checklist
Other information