Skip to content

Add DocumentDB Support #9666

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

Closed
wants to merge 10 commits into from

Conversation

guanzhousongmicrosoft
Copy link

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@Copilot Copilot AI review requested due to automatic review settings June 3, 2025 17:09
@github-actions github-actions bot added the area-integrations Issues pertaining to Aspire Integrations packages label Jun 3, 2025
Copy link
Contributor

@Copilot 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 DocumentDB by introducing new resource classes, builder extensions, and playground projects to demonstrate local development and integration. Key changes include the creation of DocumentDB resource types (server and database), builder extension methods to register and configure DocumentDB resources, and playground projects with configuration files and sample API services.

Reviewed Changes

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

Show a summary per file
File Description
src/Aspire.Hosting.DocumentDB/DocumentDBServerResource.cs Implements a DocumentDB server resource with connection string building logic.
src/Aspire.Hosting.DocumentDB/DocumentDBDatabaseResource.cs Defines the DocumentDB database resource as a child of the server resource.
src/Aspire.Hosting.DocumentDB/DocumentDBContainerImageTags.cs Provides container image tag constants but note a discrepancy with the documented registry value.
src/Aspire.Hosting.DocumentDB/DocumentDBBuilderExtensions.cs Contains extension methods to add and configure DocumentDB resources in the application model.
Playground project files Demo configuration and sample API service for DocumentDB integration.
Comments suppressed due to low confidence (1)

src/Aspire.Hosting.DocumentDB/DocumentDBBuilderExtensions.cs:61

  • [nitpick] The local variable 'DocumentDBContainer' should follow camelCase naming conventions (e.g., 'documentDbContainer').
var DocumentDBContainer = new DocumentDBServerResource(name, userName?.Resource, passwordParameter, tls, allowInsecureTls);

internal static class DocumentDBContainerImageTags
{
/// <remarks>ghcr.io/microsoft/documentdb</remarks>
public const string Registry = "ghcr.io/guanzhousongmicrosoft";
Copy link
Preview

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value for 'Registry' does not match the remark comment ('ghcr.io/microsoft/documentdb') above. Please verify and update the registry URL to ensure consistency.

Suggested change
public const string Registry = "ghcr.io/guanzhousongmicrosoft";
public const string Registry = "ghcr.io/microsoft/documentdb";

Copilot uses AI. Check for mistakes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes sorry for the confusion, I am working on the registry fix

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this should probably be hosted on mcr.microsoft.com right if its an officially built/signed image?

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jun 3, 2025
@davidfowl davidfowl closed this Jun 16, 2025
@davidfowl
Copy link
Member

We have a conversation with the team about where this will live

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-integrations Issues pertaining to Aspire Integrations packages community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants