v1.0 API redesign: annotation-based config, client library, and OTel integration#273
Closed
ElanHasson wants to merge 2 commits intoInfinityFlowApp:mainfrom
Closed
v1.0 API redesign: annotation-based config, client library, and OTel integration#273ElanHasson wants to merge 2 commits intoInfinityFlowApp:mainfrom
ElanHasson wants to merge 2 commits intoInfinityFlowApp:mainfrom
Conversation
BREAKING CHANGE: Default port allocation changed from fixed to dynamic
## Changes
### Core API (Breaking)
- Changed `Port` property from `int` to `int?` in TemporalServerResourceArguments
- Removed default values (7233, 8233) to enable dynamic allocation
- Updated container extension to use fixed `targetPort` with dynamic `port`
- Removed fallback port calculations in executable extension
- Updated builder methods to accept nullable port parameters
### Client Integration Library (New)
- Added InfinityFlow.Aspire.Temporal.Client package
- Provides `AddTemporalClient()` and `AddTemporalWorker()` extension methods
- Automatic connection string resolution from Aspire configuration
- Follows standard Aspire client integration patterns
### Documentation
- Updated README with breaking changes section
- Added migration guide from v0.x to v1.0
- Updated sample to demonstrate both dynamic and fixed port usage
- Improved connection string documentation
### Tests
- Added comprehensive unit tests for port allocation
- Tests verify both dynamic and fixed port scenarios
- All 7 tests passing
## Benefits
- Eliminates port conflicts in multi-instance scenarios
- Better parallel test execution
- Consistent with official Aspire networking patterns
- Easier client integration with new library
## Migration
To maintain v0.x behavior with fixed ports:
```csharp
var temporal = builder.AddTemporalServerContainer("temporal", x => x
.WithPort(7233)
.WithUiPort(8233));
```
Follows patterns from:
- https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/networking-overview
- Aspire.Hosting.PostgreSQL
- Aspire.Hosting.Valkey
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
3bc0bc3 to
7d93d3f
Compare
Contributor
Author
Code reviewFound 1 issue:
Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Complete v1.0 API redesign of InfinityFlow.Aspire.Temporal:
InfinityFlow.Aspire.Temporal.Client) withAddTemporalClient,AddTemporalWorker, health checks, and automatic OpenTelemetrytemporal server start-devCLI flags supportedBreaking Changes
Hosting API
Before (lambda callback):
After (fluent extension methods):
TemporalServerResourceBuilderandTemporalServerResourceArgumentsremovedTemporalServerArgsBuilderNew Client Library
Both methods automatically resolve connection strings, add
TracingInterceptor, configureCustomMetricMeter, and register health checks.Architecture
Configuration is now stored as
IResourceAnnotationtypes:TemporalNamespaceAnnotation,TemporalLogFormatAnnotation,TemporalLogLevelAnnotation, etc.TemporalServerArgsBuilderreads all annotations and builds CLI argsITemporalServerResourceinterface shared by container and executable resourcesConfiguration Reference
All
temporal server start-devflags are supported:Other Changes
temporalio/admin-tools:1.30.1.WithOtlpExporter()added to container resource for Aspire dashboard telemetryTest Plan
Generated with Claude Code