Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
Hosting.PostgreSQL.Extensions.Tests,
Hosting.PowerShell.Tests,
Hosting.Python.Extensions.Tests,
Hosting.Quartz.Tests,
Hosting.RavenDB.Tests,
Hosting.Redis.Extensions.Tests,
Hosting.Rust.Tests,
Expand All @@ -77,6 +78,7 @@ jobs:
Microsoft.EntityFrameworkCore.Sqlite.Tests,
Minio.Client.Tests,
OllamaSharp.Tests,
Quartz.Tests,
RavenDB.Client.Tests,
Sftp.Tests,
SurrealDb.Tests,
Expand Down
11 changes: 11 additions & 0 deletions CommunityToolkit.Aspire.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@
<Folder Name="/examples/powershell/">
<Project Path="examples/powershell/CommunityToolkit.Aspire.PowerShell.AppHost/CommunityToolkit.Aspire.PowerShell.AppHost.csproj" />
</Folder>
<Folder Name="/examples/quartz/">
<Project Path="examples/quartz/CommunityToolkit.Aspire.Hosting.Quartz.ApiService/CommunityToolkit.Aspire.Hosting.Quartz.ApiService.csproj" />
<Project Path="examples/quartz/CommunityToolkit.Aspire.Hosting.Quartz.AppHost/CommunityToolkit.Aspire.Hosting.Quartz.AppHost.csproj" />
<Project Path="examples/quartz/CommunityToolkit.Aspire.Hosting.Quartz.ServiceDefaults/CommunityToolkit.Aspire.Hosting.Quartz.ServiceDefaults.csproj" />
<Project Path="examples/quartz/CommunityToolkit.Aspire.Hosting.Quartz.Web/CommunityToolkit.Aspire.Hosting.Quartz.Web.csproj" />
</Folder>
<Folder Name="/examples/ravendb/">
<Project Path="examples/ravendb/CommunityToolkit.Aspire.Hosting.RavenDB.ApiService/CommunityToolkit.Aspire.Hosting.RavenDB.ApiService.csproj" />
<Project Path="examples/ravendb/CommunityToolkit.Aspire.Hosting.RavenDB.ServiceDefaults/CommunityToolkit.Aspire.Hosting.RavenDB.ServiceDefaults.csproj" />
Expand Down Expand Up @@ -231,6 +237,7 @@
<Project Path="src/CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions/CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.PowerShell/CommunityToolkit.Aspire.Hosting.PowerShell.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.Python.Extensions/CommunityToolkit.Aspire.Hosting.Python.Extensions.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.Quartz/CommunityToolkit.Aspire.Hosting.Quartz.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.RavenDB/CommunityToolkit.Aspire.Hosting.RavenDB.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.Redis.Extensions/CommunityToolkit.Aspire.Hosting.Redis.Extensions.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.Rust/CommunityToolkit.Aspire.Hosting.Rust.csproj" />
Expand All @@ -249,6 +256,8 @@
<Project Path="src/CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite/CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Minio.Client/CommunityToolkit.Aspire.Minio.Client.csproj" />
<Project Path="src/CommunityToolkit.Aspire.OllamaSharp/CommunityToolkit.Aspire.OllamaSharp.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Quartz/CommunityToolkit.Aspire.Quartz.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Quartz.Abstractions/CommunityToolkit.Aspire.Quartz.Abstractions.csproj" />
<Project Path="src/CommunityToolkit.Aspire.RavenDB.Client/CommunityToolkit.Aspire.RavenDB.Client.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Sftp/CommunityToolkit.Aspire.Sftp.csproj" />
<Project Path="src/CommunityToolkit.Aspire.SurrealDb/CommunityToolkit.Aspire.SurrealDb.csproj" />
Expand Down Expand Up @@ -293,6 +302,7 @@
<Project Path="tests/CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions.Tests/CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.PowerShell.Tests/CommunityToolkit.Aspire.Hosting.PowerShell.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.Perl.Tests/CommunityToolkit.Aspire.Hosting.Perl.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.Quartz.Tests/CommunityToolkit.Aspire.Hosting.Quartz.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.RavenDB.Tests/CommunityToolkit.Aspire.Hosting.RavenDB.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.Redis.Extensions.Tests/CommunityToolkit.Aspire.Hosting.Redis.Extensions.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.Rust.Tests/CommunityToolkit.Aspire.Hosting.Rust.Tests.csproj" />
Expand All @@ -311,6 +321,7 @@
<Project Path="tests/CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite.Tests/CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Minio.Client.Tests/CommunityToolkit.Aspire.Minio.Client.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.OllamaSharp.Tests/CommunityToolkit.Aspire.OllamaSharp.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Quartz.Tests/CommunityToolkit.Aspire.Quartz.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.RavenDB.Client.Tests/CommunityToolkit.Aspire.RavenDB.Client.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Sftp.Tests/CommunityToolkit.Aspire.Sftp.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.SurrealDb.Tests/CommunityToolkit.Aspire.SurrealDb.Tests.csproj" />
Expand Down
7 changes: 7 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<PackageVersion Include="Dapr.Client" Version="1.15.3" />
<PackageVersion Include="Microsoft.AspNetCore.Components.QuickGrid" Version="$(AspNetCoreVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.20" />
<PackageVersion Include="Microsoft.AspNetCore.SignalR.Client" Version="10.0.5" />
<PackageVersion Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down Expand Up @@ -76,14 +77,20 @@
<PackageVersion Include="MassTransit.RabbitMQ" Version="8.5.5" />
<PackageVersion Include="MeiliSearch" Version="0.18.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="10.0.2" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="6.1.4" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.2" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="$(DotNetExtensionsVersion)" />
<PackageVersion Include="Microsoft.SqlServer.DacFx" Version="170.2.70" />
<PackageVersion Include="Microsoft.Build" Version="17.11.48" />
<PackageVersion Include="Microsoft.Build.Framework" Version="17.11.48" />
<PackageVersion Include="Microsoft.NET.StringTools" Version="17.11.48" />
<PackageVersion Include="Microsoft.Build.Locator" Version="1.10.12" />
<PackageVersion Include="Npgsql" Version="10.0.2" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.1" />
<PackageVersion Include="ErikEJ.Dacpac.Chinook" Version="1.0.0" />
<PackageVersion Include="Quartz" Version="3.16.1" />
<PackageVersion Include="Quartz.Extensions.Hosting" Version="3.16.1" />
<PackageVersion Include="Quartz.Serialization.Json" Version="3.16.1" />
<PackageVersion Include="RavenDB.Client" Version="6.2.1" />
<PackageVersion Include="RavenDB.TestDriver" Version="6.2.1" />
<PackageVersion Include="YamlDotNet" Version="16.3.0" />
Expand Down
84 changes: 84 additions & 0 deletions INTEGRATION_PROGRESS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# AspireQuartz Integration Progress

## ✅ Completed Steps

1. ✅ Forked CommunityToolkit/Aspire repository
2. ✅ Created feature branch: `feature/add-quartz-integration`
3. ✅ Created directory structure
4. ✅ Copied source files from original project
5. ✅ Renamed all csproj files
6. ✅ Updated package metadata (Description, AdditionalPackageTags)
7. ✅ Created api/ folders with PublicAPI.txt files
8. ✅ Updated all README.md files with CommunityToolkit naming
9. ✅ Pushed all changes to GitHub

## 📋 Remaining Tasks

### High Priority (Required for PR approval)

- [ ] **Unit Tests** - Create comprehensive unit tests
- Test resource creation and configuration
- Test job client API (enqueue, schedule, cancel)
- Test idempotency store behavior
- Test retry policy logic
- Test job serialization

- [ ] **Integration Tests** - Create end-to-end tests
- Test with PostgreSQL (mark with `[RequiresDocker]`)
- Test database migration
- Test health checks
- Test OpenTelemetry traces
- Inherit from `IClassFixture<AspireIntegrationTestFixture<TExampleAppHost>>`

- [ ] **Example Application** - Create minimal example
- Move from `samples/` to `examples/Quartz/`
- Simplify to demonstrate core features only
- Remove SignalR (optional feature, not core)
- Update to use CommunityToolkit packages

### Medium Priority (Can be done after initial PR)

- [ ] **Update CI Workflow** - Add tests to GitHub Actions
- Update `.github/workflows/tests.yml`
- Run `./eng/testing/generate-test-list-for-workflow.sh`

- [ ] **Update Main README** - Add integration to main repo README
- Add to integrations table
- Include links to packages

### Low Priority (Nice to have)

- [ ] **Additional Documentation** - Create detailed guides
- Advanced scenarios
- Migration guides
- Troubleshooting

## 🎯 Current Status

**Ready for Initial PR**: YES ✅

The core integration is complete and ready for initial review. Tests and examples can be added based on maintainer feedback.

## 📝 Next Immediate Steps

1. **Open Pull Request** as draft
2. **Wait for maintainer feedback**
3. **Add tests** based on feedback
4. **Add example** if requested
5. **Mark PR as ready** when complete

## ⏱️ Time Estimates

- Open PR: 5 minutes
- Unit tests: 4-6 hours
- Integration tests: 4-6 hours
- Example application: 2-3 hours
- **Total remaining**: 10-15 hours

## 💡 Notes

- All core code is complete and follows CommunityToolkit conventions
- Package metadata is properly configured
- PublicAPI.txt files are in place for API tracking
- README files are updated with correct naming
- Ready for maintainer review and feedback
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ This repository contains the source code for the Aspire Community Toolkit, a col
| - **Learn More**: [`Hosting.Bun`][bun-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.Bun][bun-shields]][bun-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.Bun][bun-shields-preview]][bun-nuget-preview] | A hosting integration for the Bun apps. |
| - **Learn More**: [`Hosting.Perl`][perl-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.Perl][perl-shields]][perl-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.Perl][perl-shields-preview]][perl-nuget-preview] | A hosting integration for Perl scripts and APIs. |
| - **Learn More**: [`Hosting.Python.Extensions`][python-ext-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Python.Extensions][python-ext-shields]][python-ext-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.Python.Extensions][python-ext-shields-preview]][python-ext-nuget-preview] | An integration that contains some additional extensions for running python applications |
| - **Learn More**: [`Hosting.Quartz`][quartz-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.Quartz][quartz-hosting-shields]][quartz-hosting-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.Quartz][quartz-hosting-shields-preview]][quartz-hosting-nuget-preview] | An Aspire hosting integration for Quartz.NET background job scheduling with persistent storage and automatic migrations. |
| - **Learn More**: [`Quartz`][quartz-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Quartz][quartz-client-shields]][quartz-client-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Quartz][quartz-client-shields-preview]][quartz-client-nuget-preview] | An Aspire client integration for Quartz.NET job scheduling with idempotency and OpenTelemetry support. |
| - **Learn More**: [`Quartz.Abstractions`][quartz-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Quartz.Abstractions][quartz-abstractions-shields]][quartz-abstractions-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Quartz.Abstractions][quartz-abstractions-shields-preview]][quartz-abstractions-nuget-preview] | Core abstractions and interfaces for Quartz.NET integration. |
| - **Learn More**: [`Hosting.KurrentDB`][kurrentdb-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.KurrentDB][kurrentdb-shields]][kurrentdb-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.KurrentDB][kurrentdb-shields-preview]][kurrentdb-nuget-preview] | An Aspire hosting integration leveraging the [KurrentDB](https://www.kurrent.io) container. |
| - **Learn More**: [`KurrentDB`][kurrentdb-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.KurrentDB][kurrentdb-client-shields]][kurrentdb-client-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.KurrentDB][kurrentdb-client-shields-preview]][kurrentdb-client-nuget-preview] | An Aspire client integration for the [KurrentDB](https://github.com/kurrent-io/KurrentDB-Client-Dotnet) package. |
| - **Learn More**: [`Hosting.Flagd`][flagd-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.Flagd][flagd-shields]][flagd-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.Flagd][flagd-shields-preview]][flagd-nuget-preview] | An Aspire hosting integration for [flagd](https://flagd.dev), a feature flag evaluation engine. |
Expand Down Expand Up @@ -298,3 +301,16 @@ This project is supported by the [.NET Foundation](https://dotnetfoundation.org)
[azure-ext-nuget]: https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.Azure.Extensions/
[azure-ext-shields-preview]: https://img.shields.io/nuget/vpre/CommunityToolkit.Aspire.Hosting.Azure.Extensions?label=nuget%20(preview)
[azure-ext-nuget-preview]: https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.Azure.Extensions/absoluteLatest
[quartz-integration-docs]: https://learn.microsoft.com/dotnet/aspire/community-toolkit/hosting-quartz
[quartz-hosting-shields]: https://img.shields.io/nuget/v/CommunityToolkit.Aspire.Hosting.Quartz
[quartz-hosting-nuget]: https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.Quartz/
[quartz-hosting-shields-preview]: https://img.shields.io/nuget/vpre/CommunityToolkit.Aspire.Hosting.Quartz?label=nuget%20(preview)
[quartz-hosting-nuget-preview]: https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.Quartz/absoluteLatest
[quartz-client-shields]: https://img.shields.io/nuget/v/CommunityToolkit.Aspire.Quartz
[quartz-client-nuget]: https://nuget.org/packages/CommunityToolkit.Aspire.Quartz/
[quartz-client-shields-preview]: https://img.shields.io/nuget/vpre/CommunityToolkit.Aspire.Quartz?label=nuget%20(preview)
[quartz-client-nuget-preview]: https://nuget.org/packages/CommunityToolkit.Aspire.Quartz/absoluteLatest
[quartz-abstractions-shields]: https://img.shields.io/nuget/v/CommunityToolkit.Aspire.Quartz.Abstractions
[quartz-abstractions-nuget]: https://nuget.org/packages/CommunityToolkit.Aspire.Quartz.Abstractions/
[quartz-abstractions-shields-preview]: https://img.shields.io/nuget/vpre/CommunityToolkit.Aspire.Quartz.Abstractions?label=nuget%20(preview)
[quartz-abstractions-nuget-preview]: https://nuget.org/packages/CommunityToolkit.Aspire.Quartz.Abstractions/absoluteLatest
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\CommunityToolkit.Aspire.Quartz\CommunityToolkit.Aspire.Quartz.csproj" />
<ProjectReference Include="..\CommunityToolkit.Aspire.Hosting.Quartz.ServiceDefaults\CommunityToolkit.Aspire.Hosting.Quartz.ServiceDefaults.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Quartz;

namespace CommunityToolkit.Aspire.Hosting.Quartz.ApiService.Extensions;

public static class QuartzExtensions
{
/// <summary>
/// Add a job and trigger from configuration
/// </summary>
public static void AddJobAndTrigger<T>(
this IServiceCollectionQuartzConfigurator quartz,
IConfiguration config)
where T : IJob
{
string jobName = typeof(T).Name;
var configKey = $"Quartz:{jobName}";
var cronSchedule = config[configKey];

if (string.IsNullOrEmpty(cronSchedule))
{
throw new Exception($"No Quartz.NET Cron schedule found for job in configuration at {configKey}");
}

var jobKey = new JobKey(jobName);

quartz.AddJob<T>(opts => opts
.WithIdentity(jobKey)
.StoreDurably());

quartz.AddTrigger(opts => opts
.ForJob(jobKey)
.WithIdentity($"{jobName}-trigger")
.WithCronSchedule(cronSchedule));
}
}
Loading