Repository navigation
feat: Go polyglot AppHost — fixtures, playground, transport fixes, fluent API - #16038
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16038Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16038" |
|
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Pull request overview
Adds Go as a first-class “polyglot” validation language by introducing Go AppHost fixtures across many Aspire.Hosting integrations, wiring them into CI validation, and updating the Go ATS transport to support server-initiated callbacks without deadlocking.
Changes:
- Add Go validation AppHosts (go.mod + aspire.config.json + apphost.go) for a broad set of Aspire.Hosting integrations under
tests/PolyglotAppHosts/*/Go. - Add a Go playground AppHost and a CI script to regenerate Go SDK modules and compile-check all Go fixtures; wire it into the polyglot-validation Go container.
- Update the generated Go transport client to use a background reader + pending-response map to allow nested capability calls during callbacks.
Reviewed changes
Copilot reviewed 151 out of 151 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Aspire.Hosting.CodeGeneration.Go/Resources/transport.go | Switch Go JSON-RPC client to background read loop + pending response dispatch to support callback reentrancy. |
| .github/workflows/polyglot-validation/test-go-playground.sh | New script that restores + go builds all Go validation AppHosts under tests/PolyglotAppHosts/*/Go. |
| .github/workflows/polyglot-validation/Dockerfile.go | Run the new Go validation script in the polyglot-validation Go container image. |
| playground/GoAppHost/go.mod | Go module stub for the Go playground AppHost. |
| playground/GoAppHost/aspire.config.json | Configure the Go playground AppHost (language + entrypoint). |
| playground/GoAppHost/apphost.run.json | Run profile/env for local Go playground execution. |
| playground/GoAppHost/apphost.go | Minimal Go playground AppHost entrypoint. |
| tests/PolyglotAppHosts/Aspire.Hosting/Go/go.mod | Go module stub for Aspire.Hosting (core) validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting/Go/aspire.config.json | Go AppHost config for Aspire.Hosting (core). |
| tests/PolyglotAppHosts/Aspire.Hosting/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting (core). |
| tests/PolyglotAppHosts/Aspire.Hosting.Yarp/Go/go.mod | Go module stub for Aspire.Hosting.Yarp validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Yarp/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Yarp. |
| tests/PolyglotAppHosts/Aspire.Hosting.Yarp/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Yarp. |
| tests/PolyglotAppHosts/Aspire.Hosting.Valkey/Go/go.mod | Go module stub for Aspire.Hosting.Valkey validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Valkey/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Valkey. |
| tests/PolyglotAppHosts/Aspire.Hosting.Valkey/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Valkey. |
| tests/PolyglotAppHosts/Aspire.Hosting.SqlServer/Go/go.mod | Go module stub for Aspire.Hosting.SqlServer validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.SqlServer/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.SqlServer. |
| tests/PolyglotAppHosts/Aspire.Hosting.SqlServer/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.SqlServer. |
| tests/PolyglotAppHosts/Aspire.Hosting.Seq/Go/go.mod | Go module stub for Aspire.Hosting.Seq validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Seq/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Seq. |
| tests/PolyglotAppHosts/Aspire.Hosting.Seq/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Seq. |
| tests/PolyglotAppHosts/Aspire.Hosting.Redis/Go/go.mod | Go module stub for Aspire.Hosting.Redis validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Redis/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Redis. |
| tests/PolyglotAppHosts/Aspire.Hosting.Redis/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Redis. |
| tests/PolyglotAppHosts/Aspire.Hosting.RabbitMQ/Go/go.mod | Go module stub for Aspire.Hosting.RabbitMQ validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.RabbitMQ/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.RabbitMQ. |
| tests/PolyglotAppHosts/Aspire.Hosting.RabbitMQ/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.RabbitMQ. |
| tests/PolyglotAppHosts/Aspire.Hosting.Qdrant/Go/go.mod | Go module stub for Aspire.Hosting.Qdrant validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Qdrant/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Qdrant. |
| tests/PolyglotAppHosts/Aspire.Hosting.Qdrant/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Qdrant. |
| tests/PolyglotAppHosts/Aspire.Hosting.Python/Go/go.mod | Go module stub for Aspire.Hosting.Python validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Python/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Python. |
| tests/PolyglotAppHosts/Aspire.Hosting.Python/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Python. |
| tests/PolyglotAppHosts/Aspire.Hosting.PostgreSQL/Go/go.mod | Go module stub for Aspire.Hosting.PostgreSQL validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.PostgreSQL/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.PostgreSQL. |
| tests/PolyglotAppHosts/Aspire.Hosting.PostgreSQL/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.PostgreSQL. |
| tests/PolyglotAppHosts/Aspire.Hosting.Orleans/Go/go.mod | Go module stub for Aspire.Hosting.Orleans validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Orleans/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Orleans. |
| tests/PolyglotAppHosts/Aspire.Hosting.Orleans/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Orleans. |
| tests/PolyglotAppHosts/Aspire.Hosting.Oracle/Go/go.mod | Go module stub for Aspire.Hosting.Oracle validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Oracle/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Oracle. |
| tests/PolyglotAppHosts/Aspire.Hosting.Oracle/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Oracle. |
| tests/PolyglotAppHosts/Aspire.Hosting.OpenAI/Go/go.mod | Go module stub for Aspire.Hosting.OpenAI validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.OpenAI/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.OpenAI. |
| tests/PolyglotAppHosts/Aspire.Hosting.OpenAI/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.OpenAI. |
| tests/PolyglotAppHosts/Aspire.Hosting.Nats/Go/go.mod | Go module stub for Aspire.Hosting.Nats validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Nats/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Nats. |
| tests/PolyglotAppHosts/Aspire.Hosting.Nats/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Nats. |
| tests/PolyglotAppHosts/Aspire.Hosting.MySql/Go/go.mod | Go module stub for Aspire.Hosting.MySql validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.MySql/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.MySql. |
| tests/PolyglotAppHosts/Aspire.Hosting.MySql/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.MySql. |
| tests/PolyglotAppHosts/Aspire.Hosting.MongoDB/Go/go.mod | Go module stub for Aspire.Hosting.MongoDB validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.MongoDB/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.MongoDB. |
| tests/PolyglotAppHosts/Aspire.Hosting.MongoDB/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.MongoDB. |
| tests/PolyglotAppHosts/Aspire.Hosting.Milvus/Go/go.mod | Go module stub for Aspire.Hosting.Milvus validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Milvus/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Milvus. |
| tests/PolyglotAppHosts/Aspire.Hosting.Milvus/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Milvus. |
| tests/PolyglotAppHosts/Aspire.Hosting.Maui/Go/go.mod | Go module stub for Aspire.Hosting.Maui validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Maui/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Maui. |
| tests/PolyglotAppHosts/Aspire.Hosting.Maui/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Maui. |
| tests/PolyglotAppHosts/Aspire.Hosting.Kubernetes/Go/go.mod | Go module stub for Aspire.Hosting.Kubernetes validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Kubernetes/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Kubernetes. |
| tests/PolyglotAppHosts/Aspire.Hosting.Kubernetes/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Kubernetes. |
| tests/PolyglotAppHosts/Aspire.Hosting.Keycloak/Go/go.mod | Go module stub for Aspire.Hosting.Keycloak validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Keycloak/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Keycloak. |
| tests/PolyglotAppHosts/Aspire.Hosting.Keycloak/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Keycloak. |
| tests/PolyglotAppHosts/Aspire.Hosting.Kafka/Go/go.mod | Go module stub for Aspire.Hosting.Kafka validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Kafka/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Kafka. |
| tests/PolyglotAppHosts/Aspire.Hosting.Kafka/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Kafka. |
| tests/PolyglotAppHosts/Aspire.Hosting.JavaScript/Go/go.mod | Go module stub for Aspire.Hosting.JavaScript validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.JavaScript/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.JavaScript. |
| tests/PolyglotAppHosts/Aspire.Hosting.JavaScript/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.JavaScript. |
| tests/PolyglotAppHosts/Aspire.Hosting.GitHub.Models/Go/go.mod | Go module stub for Aspire.Hosting.GitHub.Models validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.GitHub.Models/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.GitHub.Models. |
| tests/PolyglotAppHosts/Aspire.Hosting.GitHub.Models/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.GitHub.Models. |
| tests/PolyglotAppHosts/Aspire.Hosting.Garnet/Go/go.mod | Go module stub for Aspire.Hosting.Garnet validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Garnet/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Garnet. |
| tests/PolyglotAppHosts/Aspire.Hosting.Garnet/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Garnet. |
| tests/PolyglotAppHosts/Aspire.Hosting.Foundry/Go/go.mod | Go module stub for Aspire.Hosting.Foundry validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Foundry/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Foundry. |
| tests/PolyglotAppHosts/Aspire.Hosting.Foundry/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Foundry. |
| tests/PolyglotAppHosts/Aspire.Hosting.Docker/Go/go.mod | Go module stub for Aspire.Hosting.Docker validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Docker/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Docker. |
| tests/PolyglotAppHosts/Aspire.Hosting.Docker/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Docker. |
| tests/PolyglotAppHosts/Aspire.Hosting.DevTunnels/Go/go.mod | Go module stub for Aspire.Hosting.DevTunnels validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.DevTunnels/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.DevTunnels. |
| tests/PolyglotAppHosts/Aspire.Hosting.DevTunnels/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.DevTunnels. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure/Go/go.mod | Go module stub for Aspire.Hosting.Azure validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.WebPubSub/Go/go.mod | Go module stub for Aspire.Hosting.Azure.WebPubSub validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.WebPubSub/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.WebPubSub. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.WebPubSub/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.WebPubSub. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Storage/Go/go.mod | Go module stub for Aspire.Hosting.Azure.Storage validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Storage/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.Storage. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Storage/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.Storage. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Sql/Go/go.mod | Go module stub for Aspire.Hosting.Azure.Sql validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Sql/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.Sql. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Sql/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.Sql. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.SignalR/Go/go.mod | Go module stub for Aspire.Hosting.Azure.SignalR validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.SignalR/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.SignalR. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.SignalR/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.SignalR. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.ServiceBus/Go/go.mod | Go module stub for Aspire.Hosting.Azure.ServiceBus validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.ServiceBus/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.ServiceBus. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.ServiceBus/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.ServiceBus. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Search/Go/go.mod | Go module stub for Aspire.Hosting.Azure.Search validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Search/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.Search. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Search/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.Search. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Redis/Go/go.mod | Go module stub for Aspire.Hosting.Azure.Redis validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Redis/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.Redis. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Redis/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.Redis. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.PostgreSQL/Go/go.mod | Go module stub for Aspire.Hosting.Azure.PostgreSQL validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.PostgreSQL/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.PostgreSQL. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.PostgreSQL/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.PostgreSQL. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.OperationalInsights/Go/go.mod | Go module stub for Aspire.Hosting.Azure.OperationalInsights validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.OperationalInsights/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.OperationalInsights. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.OperationalInsights/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.OperationalInsights. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Kusto/Go/go.mod | Go module stub for Aspire.Hosting.Azure.Kusto validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Kusto/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.Kusto. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Kusto/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.Kusto. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.KeyVault/Go/go.mod | Go module stub for Aspire.Hosting.Azure.KeyVault validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.KeyVault/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.KeyVault. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.KeyVault/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.KeyVault. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Functions/Go/go.mod | Go module stub for Aspire.Hosting.Azure.Functions validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Functions/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.Functions. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.Functions/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.Functions. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.EventHubs/Go/go.mod | Go module stub for Aspire.Hosting.Azure.EventHubs validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.EventHubs/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.EventHubs. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.EventHubs/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.EventHubs. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.CosmosDB/Go/go.mod | Go module stub for Aspire.Hosting.Azure.CosmosDB validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.CosmosDB/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.CosmosDB. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.CosmosDB/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.CosmosDB. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.ContainerRegistry/Go/go.mod | Go module stub for Aspire.Hosting.Azure.ContainerRegistry validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.ContainerRegistry/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.ContainerRegistry. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.ContainerRegistry/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.ContainerRegistry. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.CognitiveServices/Go/go.mod | Go module stub for Aspire.Hosting.Azure.CognitiveServices validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.CognitiveServices/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.CognitiveServices. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.CognitiveServices/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.CognitiveServices. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.AppService/Go/go.mod | Go module stub for Aspire.Hosting.Azure.AppService validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.AppService/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.AppService. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.AppService/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.AppService. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.ApplicationInsights/Go/go.mod | Go module stub for Aspire.Hosting.Azure.ApplicationInsights validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.ApplicationInsights/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.ApplicationInsights. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.ApplicationInsights/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.ApplicationInsights. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.AppContainers/Go/go.mod | Go module stub for Aspire.Hosting.Azure.AppContainers validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.AppContainers/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.AppContainers. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.AppContainers/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.AppContainers. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.AppConfiguration/Go/go.mod | Go module stub for Aspire.Hosting.Azure.AppConfiguration validation AppHost. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.AppConfiguration/Go/aspire.config.json | Go AppHost config for Aspire.Hosting.Azure.AppConfiguration. |
| tests/PolyglotAppHosts/Aspire.Hosting.Azure.AppConfiguration/Go/apphost.go | Go API surface validation AppHost for Aspire.Hosting.Azure.AppConfiguration. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 151 out of 151 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/Aspire.Hosting.CodeGeneration.Go/Resources/transport.go:556
readMessage()readsc.readerwithout synchronization, butcloseConnection()setsc.reader = nilundermu. CallingDisconnect()whilereadLoopis inreadMessage()can therefore introduce a data race onc.reader. Snapshot the reader undermu(similar to howwriteMessagesnapshotsconn) and use the localreadervariable for the rest of the function to keep the "mu guards reader" contract intact.
func (c *AspireClient) readMessage() (map[string]any, error) {
if c.reader == nil {
return nil, errors.New("not connected")
}
headers := make(map[string]string)
for {
line, err := c.reader.ReadString('\n')
if err != nil {
|
The lack of fluent APIs hurts my eyes. Can we make that work here as well? Just do error propagation in those methods that chain the calls. |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
Re-running the failed jobs in the CI workflow for this pull request because 2 jobs were identified as retry-safe transient failures in the CI run attempt.
Matched test failure patterns (3 tests)
|
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
Sébastien Ros (@sebastienros) is there something I can help with? I see you resolved the comments you mentioned! |
|
edmondshtogu (@edmondshtogu) you can test the latest changes maybe |
|
Sébastien Ros (@sebastienros) I've tested the latest changes; |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
Karol Zadora-Przylecki (@karolz-ms) you have requested changes, can you verify if it's still pending? |
I believe the only request you made was 1.26 which I did
Co-authored-by: Copilot <[email protected]>
|
Re-running the failed jobs in the CI workflow for this pull request because 2 jobs were identified as retry-safe transient failures in the CI run attempt.
Matched test failure patterns (27 tests)
|
Co-authored-by: Copilot <[email protected]>
8e2cead
into
microsoft:main
…PI (microsoft#16038) * feat: go polyglot * feat: go polyglot... * fix: race + duplicate callbacks & panic on non-float64 ID * fix: closeConnection / writeMessage race & yarp fixture & jsonRPCID string support * fix: close connection so write fails fast * fix: addressing reviews comments * fix: test * fix: remaining test + addressing copilot reviews * fix: test-go.sh output * fix: removed the _resourceBuilderTypeIds field and the population loop since the fluent decision already works correctly using isResourceBuilder (from the handle type) and returnsSameType (from struct name comparison) — no additional set was needed * fix: extending fluent func calls to "Add*" and adjusted tests * chore: fixing generation * chore: staging up * core: fixing generator * chore: indenting * chore: adding template + fixing test * fix: tests * fix: go-starter template to run the api and use dependencies * chore: removing http endpoint * fix: missing params in template + test script * chore: fix merge issues * Update Dockerfile.golang * Fix Go starter endpoint and version Co-authored-by: Copilot <[email protected]> * Avoid disabling TLS validation in Go starter Co-authored-by: Copilot <[email protected]> * Deduplicate Go union type checks Co-authored-by: Copilot <[email protected]> * Update Go Redis validation for canonical API Co-authored-by: Copilot <[email protected]> * Use createBuilder capability in Go SDK Co-authored-by: Copilot <[email protected]> * Update Go validation fixtures for canonical APIs Co-authored-by: Copilot <[email protected]> * Update Go coverage after upstream merge Co-authored-by: Copilot <[email protected]> * chore: enabling otel in the go template * Update Foundry ACA deployment snapshot Co-authored-by: Copilot <[email protected]> * Update Go hosting fixture environment calls Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Sebastien Ros <[email protected]> Co-authored-by: Copilot <[email protected]>
Description
Completes the Go polyglot AppHost feature (#15813) to reach parity with the TypeScript AppHost implementation. The core code generator (
AtsGoCodeGenerator.cs,GoLanguageSupport.cs) and CLI detection were already merged; this PR addresses the remaining gaps in the generator output, the runtime, the project template, and CI.Changes
Generator (
AtsGoCodeGenerator.cs,GoLanguageSupport.cs)...*XxxOptionsvariadic parameter.With*toAdd*factory methods so the entireAddX().WithY().WithZ().Err()chain composes.isResourceBuilder+returnsSameType; removed the redundant_resourceBuilderTypeIdsbookkeeping.Resourceinterface directly —WithReference,WaitFor, etc. accept builders without the oldNewIResource(handle, client)shim.Runtime (
Resources/transport.go)ioMuwithwriteMu+ apendingrequest-ID map; eliminates the callback-reentry deadlock.readLoopdemultiplexes responses to per-call channels; server-initiated callbacks run on their own goroutines.drainPendingWithError()insidecloseConnection()unblocks in-flight callers before any reconnect.c.readerremoved;readLoop/closeConnectionoperate on the capturedconnso a stale goroutine can't tear down a fresh connection.jsonRPCID()handlesfloat64/int64/json.Number/numeric strings — no more panics on non-float64IDs.aspire.FormatError(err)for consistent error rendering in user code.Runtime (
Resources/base.go)resourceBuilderBasegainederr+Err() errorso fluent chains accumulate the first failure instead of returning(value, error)at every step.newErroredResourceBuilder,newErroredHandleWrapperBase) let the generator return a usable-but-failed builder when an upstream call fails.List[T]/Dict[K,V]helpers expose capability-backed collections (Count,Get,Add,Set,Clear,ToArray).RefExpr/ConditionalRefExprbuild*ReferenceExpressionvalues from format strings, mirroring the TS/Python expression builders.StringPtr,IntPtr,BoolPtr,Float64Ptrfor inline population of optional pointer fields.CLI project template (
src/Aspire.Cli/Templating/Templates/go-starter/)go-startertemplate —aspire newcan now scaffold a Go AppHost end-to-end.apphost.go(Redis cache + HTTPapiexecutable wired withWithReference/WaitFor/WithOtlpExporter),aspire.config.json,go.mod.api/service (main.go,telemetry.go,go.mod) preconfigured for OTLP export so it shows up in the dashboard out of the box..vscode/extensions.jsonrecommends the Go extension.Test fixtures (
tests/PolyglotAppHosts/*/Go/)apphost.go+aspire.config.json+go.mod).CI / build scripts (
.github/workflows/polyglot-validation/)test-go.sh— replaced fragilesed -imulti-line insertion (BSD-sed incompatible on macOS) with portableawkinjection; updated injected code to the fluentWithImageRegistry(...).Err()pattern.test-go-playground.shmirrors the TypeScript/Python playground scripts: iterates everytests/PolyglotAppHosts/*/Go/, runsaspire restore --non-interactive --apphost apphost.go, verifies.modules/aspire.gowas generated, and compile-checks withgo build -buildvcs=false ./...(avoids VCS stamping failures in Docker/CI).Dockerfile.golang— bundlestest-go-playground.shand runs both scripts from the entrypoint, matching the Python image layout.Playground (
playground/GoAppHost/)apphost.go,go.mod,aspire.config.json,apphost.run.json) for manualaspire runsmoke-testing behind thefeatures:experimentalPolyglot:goflag.Fixes #15813
Checklist
<remarks />and<code />elements on your triple slash comments?