- 
                Notifications
    You must be signed in to change notification settings 
- Fork 132
fixes #638 #681
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
fixes #638 #681
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.
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 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) => {
        
          
                src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlProjectBuilderExtensions.cs
          
            Show resolved
            Hide resolved
        
      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.
LGTM
| @ErikEJ, Next time, please use 'squash' to merge PRs to keep the history clean. | 
| Thanks, I will keep that in mind | 
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