Skip to content
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

Add RavenDB client & hosting integration #397

Merged
merged 7 commits into from
Feb 6, 2025

Conversation

shiranshalom
Copy link
Contributor

Closes #396

This pull request includes several updates to the Aspire.CommunityToolkit.sln file, new project additions, and updates to dependencies. The most important changes include the addition of new RavenDB projects, updates to project references, and the introduction of new dependencies.

Project Additions and Updates:

Added new RavenDB projects to the solution, including Aspire.CommunityToolkit.Hosting.RavenDB, Aspire.CommunityToolkit.RavenDB.Client, and their respective test and example projects .

Dependency Updates:

Added new dependencies in Directory.Packages.props, including RavenDB.Client, AspNetCore.HealthChecks.RavenDB, and RavenDB.TestDriver.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written - this PR includes README.md files for RavenDB client and hosting projects. Complete documentation is prepared, and we will open a PR to the dotnet/docs-aspire repository soon.
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • 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

We are currently working on an article related to this integration. Once it's ready, I will attach the link here.
Additionally, some links in this PR will need to be updated once the NuGet packages are published.

@shiranshalom
Copy link
Contributor Author

shiranshalom commented Jan 15, 2025

@dotnet-policy-service agree company="Hibernating Rhinos"

@aaronpowell aaronpowell requested a review from Copilot January 16, 2025 00:03
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.

Copilot reviewed 13 out of 28 changed files in this pull request and generated 2 comments.

Files not reviewed (15)
  • CommunityToolkit.Aspire.sln: Language not supported
  • Directory.Packages.props: Language not supported
  • examples/ravendb/RavenDB.AppHost/Properties/launchSettings.json: Language not supported
  • examples/ravendb/RavenDB.AppHost/RavenDB.AppHost.csproj: Language not supported
  • src/CommunityToolkit.Aspire.Hosting.RavenDB/CommunityToolkit.Aspire.Hosting.RavenDB.csproj: Language not supported
  • src/CommunityToolkit.Aspire.Hosting.RavenDB/PublicAPI.Shipped.txt: Language not supported
  • src/CommunityToolkit.Aspire.Hosting.RavenDB/PublicAPI.Unshipped.txt: Language not supported
  • src/CommunityToolkit.Aspire.RavenDB.Client/CommunityToolkit.Aspire.RavenDB.Client.csproj: Language not supported
  • src/CommunityToolkit.Aspire.RavenDB.Client/PublicAPI.Shipped.txt: Language not supported
  • src/CommunityToolkit.Aspire.RavenDB.Client/PublicAPI.Unshipped.txt: Language not supported
  • src/CommunityToolkit.Aspire.Hosting.RavenDB/RavenDBServerSettings.cs: Evaluated as low risk
  • src/CommunityToolkit.Aspire.RavenDB.Client/HealthChecksExtensions.cs: Evaluated as low risk
  • src/CommunityToolkit.Aspire.RavenDB.Client/README.md: Evaluated as low risk
  • src/CommunityToolkit.Aspire.Hosting.RavenDB/README.md: Evaluated as low risk
  • src/CommunityToolkit.Aspire.Hosting.RavenDB/RavenDBDatabaseResource.cs: Evaluated as low risk

Copy link
Member

@aaronpowell aaronpowell left a comment

Choose a reason for hiding this comment

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

This is a good start and I think the hosting integration is mostly there but we need to do some work on the client integration to align it with the Aspire API design (I've left a comment line on that).

Can we also get the sample expanded so that it includes the client library, even if it's just a serious of API endpoints, so that we have that as a reference point.

@shiranshalom
Copy link
Contributor Author

@aaronpowell thanks for the feedback!

I’ll work on aligning the client integration and I’ll push these updates shortly.

@aaronpowell aaronpowell added the awaiting response Waiting for the author of the issue to provide more information or answer a question label Jan 22, 2025
@shiranshalom
Copy link
Contributor Author

@aaronpowell
I’ve completed the changes you requested. Here’s a summary of the updates:

Client Integration:

  • Updated the integration to fully support dependency injection and added support for configuration using a connection string. We opted to keep some of the extra methods to allow clients to use the library independently of the hosting integration.

Connection String Format:

  • Modified the ConnectionStringExpression to the format: URL={Url};Database={DatabaseName}. We chose URL instead of ENDPOINT because we believe it aligns better with our code conventions and feels more intuitive.

Expanded Example Code:

  • Expanded the example in the codebase to include a new ApiService project and added some basic API endpoints to demonstrate practical use cases of the integration.

Tests:

  • Fixed existing tests to align with the new integration changes.
  • Added new tests to cover the updated functionality and improve overall test coverage.

If you have any additional feedback or suggestions, I’d be happy to address them!

@aaronpowell
Copy link
Member

Sorry for the delay, I'll hope to review the updates this week

Directory.Packages.props Outdated Show resolved Hide resolved
@aaronpowell aaronpowell requested a review from Copilot January 31, 2025 01:35
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.

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

Files not reviewed (15)
  • CommunityToolkit.Aspire.sln: Language not supported
  • Directory.Packages.props: Language not supported
  • examples/ravendb/CommunityToolkit.Aspire.Hosting.RavenDB.ApiService/CommunityToolkit.Aspire.Hosting.RavenDB.ApiService.csproj: Language not supported
  • examples/ravendb/CommunityToolkit.Aspire.Hosting.RavenDB.ApiService/Properties/launchSettings.json: Language not supported
  • examples/ravendb/CommunityToolkit.Aspire.Hosting.RavenDB.ApiService/RavenDB.ApiService.http: Language not supported
  • examples/ravendb/CommunityToolkit.Aspire.Hosting.RavenDB.ServiceDefaults/CommunityToolkit.Aspire.Hosting.RavenDB.ServiceDefaults.csproj: Language not supported
  • examples/ravendb/RavenDB.AppHost/CommunityToolkit.Aspire.Hosting.RavenDB.AppHost.csproj: Language not supported
  • examples/ravendb/RavenDB.AppHost/Properties/launchSettings.json: Language not supported
  • src/CommunityToolkit.Aspire.Hosting.RavenDB/CommunityToolkit.Aspire.Hosting.RavenDB.csproj: Language not supported
  • src/CommunityToolkit.Aspire.Hosting.RavenDB/PublicAPI.Shipped.txt: Language not supported
  • src/CommunityToolkit.Aspire.Hosting.RavenDB/PublicAPI.Unshipped.txt: Language not supported
  • src/CommunityToolkit.Aspire.Hosting.RavenDB/HealthChecksExtensions.cs: Evaluated as low risk
  • src/CommunityToolkit.Aspire.Hosting.RavenDB/README.md: Evaluated as low risk
  • src/CommunityToolkit.Aspire.Hosting.RavenDB/RavenDBBuilderExtensions.cs: Evaluated as low risk
  • src/CommunityToolkit.Aspire.Hosting.RavenDB/RavenDBContainerImageTags.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)

examples/ravendb/CommunityToolkit.Aspire.Hosting.RavenDB.ApiService/Program.cs:40

  • The properties of the 'Company' class should use non-nullable types where possible.
public class Company

@aaronpowell
Copy link
Member

Last two things @shiranshalom

  1. Can you update the CODEOWNERS file with you as the owner.
  2. Can you update the README with the packages and their details (don't worry about broken links).

Regarding docs, do you want them to be on the RavenDB docs, or is the intent to be on the Microsoft Learn docs?

shiranshalom and others added 5 commits February 2, 2025 15:46
- fix client integration
- change ConnectionStringExpression format to "URL={Url};Database={DatabaseName}"
- expand example to include the client library
- fix README.md files
- fix and add tests
@shiranshalom
Copy link
Contributor Author

Last two things @shiranshalom

  1. Can you update the CODEOWNERS file with you as the owner.

Done

  1. Can you update the README with the packages and their details (don't worry about broken links).

Done

Regarding docs, do you want them to be on the RavenDB docs, or is the intent to be on the Microsoft Learn docs?

Both! 🙂 I'll be submitting a new PR to the dotnet/docs-aspire repository, and there will also be documentation and articles on our website. I'll share the links as soon as they're available

Copy link
Member

@aaronpowell aaronpowell left a comment

Choose a reason for hiding this comment

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

All good @shiranshalom and I've sent an invite to join the contributors (I thought I'd already done that, whoops!)

@aaronpowell aaronpowell merged commit 7250acb into CommunityToolkit:main Feb 6, 2025
8 checks passed
@Alirexaa Alirexaa added this to the 9.2 milestone Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response Waiting for the author of the issue to provide more information or answer a question
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants