feat: Simplified Temporal API with dynamic ports, fluent builder, and critical fixes #273
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR modernizes the InfinityFlow.Aspire.Temporal package with:
🎯 New Simplified API
Before (Lambda Callback Pattern):
After (Direct Fluent API):
Executable Mode (New):
🔧 Breaking Changes
1. Default Port Allocation (v0.x → v1.0)
Old behavior (fixed ports):
New behavior (dynamic ports):
Migration to fixed ports:
2. API Simplification
AddTemporalServerContainer()→AddTemporalServer()(container by default)AddTemporalServerExecutable()→AddTemporalServer().WithExecutable()WithPort()→WithServiceEndpoint()WithUiPort()→WithUiEndpoint()WithMetricsEndpoint(),WithHttpEndpoint()3. Client Library Returns Builder
Old:
New:
🐛 Critical Fixes
1. Memory Leak (Fixed)
Meterinstances created but never disposedMeteras singleton with DI for proper lifecycle managementAspireTemporalExtensions.cs:220-2212. Silent Failure in Dynamic Config (Fixed)
ArgumentExceptionwith clear error messageTemporalServerResourceArguments.cs:148-1513. Worker Sample Silent Failure (Fixed)
?.caused silent failuressample/Worker/Program.cs:18-194. Unprotected User Callbacks (Fixed)
WithInterceptors()- Line 127-137WithTracingSources()- Line 152-162ConfigureOptions()- Line 272-2815. Poor Error Messages (Fixed)
AspireTemporalExtensions.cs:205-2166. Missing Validation (Fixed)
AspireTemporalExtensions.cs:238-243📦 Changes
Core API Improvements
Client Library (InfinityFlow.Aspire.Temporal.Client)
WithInterceptors(),WithTracingSources()Testing
Dependencies
Temporaliofrom 1.3.4 to 1.4.0Temporalio.Extensions.Hostingfrom 1.3.4 to 1.4.0Documentation
✅ Benefits
🧪 Testing
All tests passing (22/22):
Sample applications verified:
📚 References
🚀 Version
Recommend v1.0.0 release due to: