Skip to content

Conversation

@Alirexaa
Copy link
Member

@Alirexaa Alirexaa commented May 7, 2025

Contributes to #643

This pull request introduces support for integrating Adminer with SQL Server resources in the CommunityToolkit.Aspire.Hosting.SqlServer.Extensions package. The changes include adding a new WithAdminer method, updating documentation, and implementing comprehensive tests to validate the functionality.

New Feature: Adminer Integration

  • Added a WithAdminer extension method to SqlServerBuilderExtensions to enable Adminer as an administration and development platform for SQL Server resources. This includes configuring Adminer containers and managing environment variables for SQL Server instances. [1] [2]
  • Updated the SqlServer.Extensions project to include a reference to the Adminer project and link the AdminerLoginServer shared file.

Documentation Updates

  • Updated the README.md file in SqlServer.Extensions to include instructions and examples for using Adminer alongside SQL Server resources. [1] [2]

Testing Enhancements

  • Added multiple tests in ResourceCreationTests.cs to verify the functionality of the WithAdminer method, including tests for environment variable annotations, container image tags, and multiple SQL Server resources.
  • Extended tests in AddAdminerTests.cs to validate Adminer integration with multiple database types. [1] [2] [3]

Example Updates

  • Updated example applications (Adminer.AppHost and SqlServer.Extensions.AppHost) to demonstrate the use of the WithAdminer method for SQL Server resources. [1] [2]

Minor Enhancements

PR Checklist

  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

@Alirexaa Alirexaa temporarily deployed to azure-artifacts May 7, 2025 19:21 — with GitHub Actions Inactive
@Alirexaa Alirexaa marked this pull request as ready for review May 7, 2025 19:28
@Alirexaa Alirexaa requested review from aaronpowell and Copilot May 7, 2025 19:28
Copy link
Contributor

Copilot AI left a 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 adds support for integrating Adminer with SQL Server resources by introducing the WithAdminer extension method, updating documentation, and adding comprehensive tests.

  • Introduces the WithAdminer extension and configures Adminer container resource
  • Updates tests for environment variable handling and container configuration
  • Enhances example applications and project references to demonstrate the new functionality

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/CommunityToolkit.Aspire.Hosting.SqlServer.Extensions.Tests/ResourceCreationTests.cs Added tests verifying Adminer configuration and annotations
tests/CommunityToolkit.Aspire.Hosting.Adminer.Tests/AddAdminerTests.cs Extended tests to cover integration with multiple SQL Server resources
src/CommunityToolkit.Aspire.Hosting.SqlServer.Extensions/SqlServerBuilderExtensions.cs Introduced the WithAdminer extension method and associated configuration logic
src/CommunityToolkit.Aspire.Hosting.SqlServer.Extensions/README.md Updated documentation to include Adminer support
Project and example files Updated project references and examples demonstrating the new Adminer functionality
Comments suppressed due to low confidence (1)

src/CommunityToolkit.Aspire.Hosting.SqlServer.Extensions/SqlServerBuilderExtensions.cs:144

  • [nitpick] Consider renaming 'new_servers' to 'newServers' to follow standard C# camelCase naming conventions.
var new_servers = sqlServerInstances.ToDictionary(

@Alirexaa Alirexaa temporarily deployed to azure-artifacts May 7, 2025 19:38 — with GitHub Actions Inactive
@Alirexaa Alirexaa added this to the 9.5 milestone May 11, 2025
@github-actions
Copy link
Contributor

Code Coverage

Package Line Rate Branch Rate Complexity Health
CommunityToolkit.Aspire.EventStore 100% 100% 46
CommunityToolkit.Aspire.GoFeatureFlag 100% 97% 74
CommunityToolkit.Aspire.Hosting.ActiveMQ 80% 40% 100
CommunityToolkit.Aspire.Hosting.ActiveMQ.MassTransit 1% 0% 14
CommunityToolkit.Aspire.Hosting.Adminer 73% 50% 20
CommunityToolkit.Aspire.Hosting.Azure.Dapr 67% 50% 828
CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis 97% 88% 36
CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder 100% 100% 22
CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps 100% 100% 28
CommunityToolkit.Aspire.Hosting.Bun 82% 71% 54
CommunityToolkit.Aspire.Hosting.Dapr 63% 51% 724
CommunityToolkit.Aspire.Hosting.DbGate 94% 50% 18
CommunityToolkit.Aspire.Hosting.Deno 84% 75% 72
CommunityToolkit.Aspire.Hosting.EventStore 94% 100% 18
CommunityToolkit.Aspire.Hosting.GoFeatureFlag 93% 50% 18
CommunityToolkit.Aspire.Hosting.Golang 94% 50% 16
CommunityToolkit.Aspire.Hosting.Java 69% 72% 120
CommunityToolkit.Aspire.Hosting.k6 58% 12% 20
CommunityToolkit.Aspire.Hosting.LavinMQ 78% 50% 18
CommunityToolkit.Aspire.Hosting.LavinMQ.MassTransit 1% 0% 14
CommunityToolkit.Aspire.Hosting.MailPit 91% 50% 14
CommunityToolkit.Aspire.Hosting.Meilisearch 73% 57% 50
CommunityToolkit.Aspire.Hosting.MongoDB.Extensions 96% 83% 36
CommunityToolkit.Aspire.Hosting.Ngrok 52% 35% 82
CommunityToolkit.Aspire.Hosting.NodeJS.Extensions 90% 69% 96
CommunityToolkit.Aspire.Hosting.Ollama 67% 69% 162
CommunityToolkit.Aspire.Hosting.PapercutSmtp 92% 50% 10
CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions 98% 88% 92
CommunityToolkit.Aspire.Hosting.Python.Extensions 68% 55% 90
CommunityToolkit.Aspire.Hosting.RavenDB 63% 49% 136
CommunityToolkit.Aspire.Hosting.Redis.Extensions 100% 80% 40
CommunityToolkit.Aspire.Hosting.Rust 94% 83% 16
CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects 75% 62% 130
CommunityToolkit.Aspire.Hosting.Sqlite 97% 91% 54
CommunityToolkit.Aspire.Hosting.SqlServer.Extensions 100% 85% 76
CommunityToolkit.Aspire.MassTransit.RabbitMQ 100% 100% 30
CommunityToolkit.Aspire.Meilisearch 97% 92% 68
CommunityToolkit.Aspire.Microsoft.Data.Sqlite 37% 27% 194
CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite 51% 50% 92
CommunityToolkit.Aspire.OllamaSharp 71% 64% 98
CommunityToolkit.Aspire.RavenDB.Client 60% 53% 237
Summary 71% (6416 / 9031) 57% (1967 / 3426) 4063

Minimum allowed line rate is 60%

@Alirexaa Alirexaa temporarily deployed to azure-artifacts May 14, 2025 09:58 — with GitHub Actions Inactive
@aaronpowell aaronpowell merged commit bfbe2d2 into main May 16, 2025
88 checks passed
@aaronpowell aaronpowell deleted the alirexaa/adminer-mssql branch May 16, 2025 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants