-
Notifications
You must be signed in to change notification settings - Fork 668
Fix incorrect XML documentation in database AddDatabase methods for PostgreSQL, MySQL, and SQL Server #10866
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
base: main
Are you sure you want to change the base?
Conversation
…base method Co-authored-by: davidfowl <[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 incorrect XML documentation in the PostgreSQL extension's AddDatabase
method. The documentation previously stated that databases are NOT automatically created, which was misleading since the implementation actually does create databases when the server becomes ready.
- Updates XML documentation to correctly reflect that databases WILL be automatically created
- Removes misleading guidance about requiring manual database creation
- Corrects the waitFor behavior documentation
/// is used with this resource it will wait indefinitely until the database exists. | ||
/// Note that calling <see cref="AddDatabase(IResourceBuilder{PostgresServerResource}, string, string?)"/> | ||
/// will result in the database being created on the Postgres server when the server becomes ready. | ||
/// The database creation happens automatically as part of the resource lifecycle. |
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.
The updated documentation should clarify when exactly the database creation occurs. Consider adding that it happens during the ResourceReadyEvent to be more specific about the timing.
/// The database creation happens automatically as part of the resource lifecycle. | |
/// Specifically, the database creation occurs during the <c>ResourceReadyEvent</c> as part of the resource lifecycle. |
Copilot uses AI. Check for mistakes.
@copilot do the same for MySQL and SQL Server |
…ase methods Co-authored-by: davidfowl <[email protected]>
I've updated the XML documentation for both MySQL and SQL Server |
The XML documentation for database
AddDatabase
methods across PostgreSQL, MySQL, and SQL Server extensions contained misleading or incomplete information about automatic database creation behavior.The Issue
The PostgreSQL documentation incorrectly stated:
Meanwhile, MySQL and SQL Server had minimal documentation that didn't explain the database creation behavior at all.
However, the actual implementation in all three providers shows that databases ARE created automatically:
ResourceReadyEvent
/OnResourceReady
CreateDatabaseAsync
for each databaseCreateDatabaseAsync
methods executeCREATE DATABASE
commandsThis is also confirmed by functional tests which successfully connect to databases that were added via
AddDatabase
.The Fix
Updated the XML documentation across all three database providers to accurately reflect the actual behavior:
All three now consistently document:
This ensures developers have correct and consistent information about how databases are handled across all .NET Aspire database providers.
Fixes #10858.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.