feat: Add KingbaseES database support for .NET Aspire#12
Conversation
- Add KingbaseES hosting library with complete resource support - Add comprehensive unit tests (25 tests, all passing) - Add example project demonstrating usage - Add README documentation - Update solution file and root README Co-authored-by: witskeeper <5594094+witskeeper@users.noreply.github.com>
|
@copilot |
…r script - Add kingbase-init.sh script for container initialization - Document container initialization requirements in README - Add XML documentation warning about manual initialization - Update example README with initialization steps - Include init script in package content for easy access Co-authored-by: witskeeper <5594094+witskeeper@users.noreply.github.com>
Thanks for highlighting this important requirement! I've documented the container initialization needs and provided workarounds. Since Aspire doesn't support executing commands inside containers after startup (unlike Testcontainers), I've:
The initialization script is included in the package and can be used to build a custom image that auto-initializes. See commit 577ed9e for the changes. |
将 NetCorePal.Aspire.Hosting.KingbaseES 及其测试项目的目标框架由单一 net10.0 改为同时支持 net8.0、net9.0 和 net10.0,提升了项目的兼容性和可用性。
# Conflicts: # README.md
|
@copilot 参考OpenGauss的测试用例,修改KingbaseES的测试用例 |
…pattern - Add KingbaseESContainerTests.cs with 7 integration tests - Update project to target net10.0 and add SharedAppHost reference - Tests verify container startup, SQL execution, table operations - Matches OpenGauss test structure and patterns Co-authored-by: witskeeper <5594094+witskeeper@users.noreply.github.com>
Done! Added KingbaseES container integration tests following the OpenGauss pattern:
The test structure now matches OpenGauss exactly. See commit 1b770b3 |
Implements .NET Aspire hosting support for KingbaseES database, following the reference implementation from netcorepal-testcontainers.
Implementation
Core library (
NetCorePal.Aspire.Hosting.KingbaseES)KingbaseESServerResource- Server resource with connection string supportKingbaseESDatabaseResource- Database resourceKingbaseESBuilderExtensions- Configuration APIkingbase-init.sh) - Handles SSH daemon and database startupKey configurations
Tests & Example
Documentation
Usage
Connection string format:
Host=localhost;Port=54321;Username=system;Password=***;Database=testImportant Note
The KingbaseES container requires manual initialization after startup as it uses systemd and doesn't automatically start the database service. The package includes:
kingbase-init.sh) for creating custom auto-initializing imagesSee the package README for complete initialization instructions and workarounds.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.