feat: CommunityToolkit.Aspire.Hosting.Floc — Floci AWS emulator hosing integration#1448
Open
edmondshtogu wants to merge 8 commits into
Open
feat: CommunityToolkit.Aspire.Hosting.Floc — Floci AWS emulator hosing integration#1448edmondshtogu wants to merge 8 commits into
edmondshtogu wants to merge 8 commits into
Conversation
…ting integration
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1448Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1448" |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new CommunityToolkit.Aspire.Hosting.Floci hosting integration that models the Floci AWS emulator as an Aspire container resource, plus accompanying examples (C# + TypeScript AppHost) and automated tests to validate resource wiring and startup.
Changes:
- Added
AddFloci+ related fluent configuration APIs (data persistence, Docker socket, config file, TLS wiring) and theFlociContainerResourcemodel. - Added an end-to-end example (
examples/floci) including a minimal API service usingAWSSDK.S3, plus a TypeScript AppHost for polyglot surface validation. - Added integration and model-level tests and registered the new projects in the solution and root README integration list.
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/CommunityToolkit.Aspire.Hosting.Floci.Tests/TypeScriptAppHostTests.cs | Adds an integration test ensuring the TypeScript AppHost compiles and starts required resources. |
| tests/CommunityToolkit.Aspire.Hosting.Floci.Tests/ContainerResourceCreationTests.cs | Adds unit tests validating resource construction, image metadata, env var wiring, and mount annotations. |
| tests/CommunityToolkit.Aspire.Hosting.Floci.Tests/CommunityToolkit.Aspire.Hosting.Floci.Tests.csproj | Introduces the Floci test project and references to the integration and examples. |
| tests/CommunityToolkit.Aspire.Hosting.Floci.Tests/AppHostTests.cs | Adds a Docker-required integration test asserting the Floci resource becomes healthy. |
| src/CommunityToolkit.Aspire.Hosting.Floci/README.md | Provides usage documentation and examples for the new Floci hosting integration. |
| src/CommunityToolkit.Aspire.Hosting.Floci/FlociHostingExtension.cs | Implements the hosting integration extension methods (AddFloci and configuration helpers). |
| src/CommunityToolkit.Aspire.Hosting.Floci/FlociContainerResource.cs | Adds the Floci container resource model and connection string/connection properties. |
| src/CommunityToolkit.Aspire.Hosting.Floci/FlociContainerImageTags.cs | Defines the default container image coordinates for Floci. |
| src/CommunityToolkit.Aspire.Hosting.Floci/CommunityToolkit.Aspire.Hosting.Floci.csproj | Adds the new integration package project and dependencies. |
| README.md | Adds Floci to the repository’s integrations table and link references. |
| examples/floci/CommunityToolkit.Aspire.Hosting.Floci.AppHost/Program.cs | Adds a sample AppHost wiring Floci + ApiService with health checks and references. |
| examples/floci/CommunityToolkit.Aspire.Hosting.Floci.AppHost/CommunityToolkit.Aspire.Hosting.Floci.AppHost.csproj | Adds the example C# AppHost project for Floci. |
| examples/floci/CommunityToolkit.Aspire.Hosting.Floci.AppHost.TypeScript/tsconfig.json | TypeScript compiler configuration for the polyglot AppHost example. |
| examples/floci/CommunityToolkit.Aspire.Hosting.Floci.AppHost.TypeScript/package.json | Defines the TypeScript AppHost example’s scripts, dependencies, and Node engine constraints. |
| examples/floci/CommunityToolkit.Aspire.Hosting.Floci.AppHost.TypeScript/package-lock.json | Locks dependencies for the TypeScript AppHost example. |
| examples/floci/CommunityToolkit.Aspire.Hosting.Floci.AppHost.TypeScript/eslint.config.mjs | Adds ESLint configuration for the TypeScript AppHost example. |
| examples/floci/CommunityToolkit.Aspire.Hosting.Floci.AppHost.TypeScript/aspire.config.json | Adds Aspire config for the TypeScript AppHost example and local package wiring. |
| examples/floci/CommunityToolkit.Aspire.Hosting.Floci.AppHost.TypeScript/apphost.mts | Implements the TypeScript AppHost example covering runtime and compile-only scenarios. |
| examples/floci/CommunityToolkit.Aspire.Hosting.Floci.ApiService/Properties/launchSettings.json | Adds launch settings for the example API service. |
| examples/floci/CommunityToolkit.Aspire.Hosting.Floci.ApiService/Program.cs | Adds a minimal API demonstrating S3 access against the emulator using injected env vars. |
| examples/floci/CommunityToolkit.Aspire.Hosting.Floci.ApiService/CommunityToolkit.Aspire.Hosting.Floci.ApiService.csproj | Adds the example API service project and AWSSDK.S3 dependency. |
| CommunityToolkit.Aspire.slnx | Registers the new integration, tests, and example projects in the solution. |
Files not reviewed (1)
- examples/floci/CommunityToolkit.Aspire.Hosting.Floci.AppHost.TypeScript/package-lock.json: Generated file
…ls — re-declaring any of them with const triggers the SyntaxError: Identifier already declared at parse time before any of the script logic runs
edmondshtogu
marked this pull request as draft
July 17, 2026 11:45
edmondshtogu
marked this pull request as ready for review
July 17, 2026 11:45
Contributor
Author
|
@aaronpowell can you please take a look here? |
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.
Closes floci-io/floci#1242
Adds CommunityToolkit.Aspire.Hosting.Floci — a hosting integration for Floci, a high-performance AWS emulator (65+ services, LocalStack-compatible) that runs as a container inside the Aspire AppHost.
What's included
Core integration (
src/CommunityToolkit.Aspire.Hosting.Floci/)AddFloci(name, port?, defaultRegion?, defaultAccountId?)— adds the Floci container with health check at/_floci/infoWithReference(floci)automatically injectsAWS_ENDPOINT_URL,AWS_DEFAULT_REGION,AWS_ACCESS_KEY_ID, andAWS_SECRET_ACCESS_KEYinto dependent resources via aBeforeStartEventsubscriber. Host processes getlocalhost:{port}; containers gethost.docker.internal:{port}WithDataVolume/WithDataBindMount— switches Floci to persistent storage modeWithDockerSocket— mounts the Docker socket and setsFLOCI_DOCKER_DOCKER_HOSTso Lambda and other container-backed services can launch sibling containersWithConfigFile(hostPath)— bind-mounts a Quarkusapplication.ymloverride at/deployments/config/application.ymlfor advanced Floci configuration not covered by extension methodsWithHttpsCertificateConfigurationis registered insideAddFlociand fires automatically when the Aspire developer certificate service is active (or whenWithHttpsDeveloperCertificate()is chained). SetsFLOCI_TLS_ENABLED,FLOCI_TLS_CERT_PATH,FLOCI_TLS_KEY_PATHand switches connection strings tohttps://— no integration-specific TLS wrapper needed.WithDeveloperCertificateTrust(true)is also registered so Floci trusts the dev cert for its own outbound callsExample app (
examples/floci/)AppHost— orchestrates Floci + ApiService, demonstratingWithReference,WaitFor, and health checksApiService— minimal ASP.NET Core app showingS3bucket listing viaAWSSDK.S3AppHost.TypeScript— TypeScript AppHost covering the full exported API surface for compile-time validationTests (
tests/CommunityToolkit.Aspire.Hosting.Floci.Tests/)PR Checklist
Other information
AWS_ENDPOINT_URLis the standard SDK v4 env var; noAmazonS3Config.RegionEndpointshould be set alongsideServiceURL(triggers aNullReferenceExceptionin the v4 endpoint rule engine — documented in the example)ASPIRECERTIFICATES001experimental diagnostic is suppressed at file level in the hosting extension@ts-expect-errorguards for experimental certificate APIs that have no polyglot binding yet