Skip to content

Add polyglot exports for gofeatureflag#1189

Merged
aaronpowell merged 4 commits into
mainfrom
dapine/polyglot-export-gofeatureflag
Apr 1, 2026
Merged

Add polyglot exports for gofeatureflag#1189
aaronpowell merged 4 commits into
mainfrom
dapine/polyglot-export-gofeatureflag

Conversation

@IEvangelist

Copy link
Copy Markdown
Contributor

Adds AspireExport coverage and a matching TypeScript validation apphost for gofeatureflag.

Copilot AI review requested due to automatic review settings March 18, 2026 16:04
@github-actions

github-actions Bot commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1189

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1189"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds polyglot (AspireExport) coverage for the GoFeatureFlag hosting integration and introduces a TypeScript ValidationAppHost to validate the generated exports.

Changes:

  • Annotate GoFeatureFlag resource and builder extension methods with AspireExport (and ignore unsupported overloads).
  • Add a TS ValidationAppHost (configs + apphost) for exercising exports and exposed properties.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/GoFeatureFlagResource.cs Adds AspireExport(ExposeProperties = true) and suppresses ASPIREATS001 for the experimental attribute.
src/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/GoFeatureFlagBuilderExtensions.cs Adds AspireExport attributes for polyglot exports and an ATS-friendly log level overload + enum.
playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/tsconfig.json TypeScript config for the validation app host build.
playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/package.json NPM manifest for running/building the validation app host.
playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/package-lock.json Lockfile for deterministic dependencies.
playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/goff/goff-proxy.yaml GoFeatureFlag proxy configuration used by the validation app host.
playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/goff/flags.yaml Sample feature flags consumed by the proxy config.
playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/apphost.ts Validation app host exercising exported APIs and exposed resource properties.
playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/apphost.run.json Local run profile for the validation app host.
playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/.aspire/settings.json Aspire settings tying the TS app host to the GoFeatureFlag package.
Files not reviewed (1)
  • playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/package-lock.json: Language not supported

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +4 to +5
#pragma warning disable ASPIREATS001 // AspireExport is experimental

Comment on lines +9 to +10
#pragma warning disable ASPIREATS001 // AspireExport is experimental

},
"devDependencies": {
"@types/node": "^20.0.0",
"nodemon": "^3.1.11",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo: I don't see the need for this. To remove.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These packages are used (required) by the Polyglot apphost we're introducing as part of 13.2

"devDependencies": {
"@types/node": "^20.0.0",
"nodemon": "^3.1.11",
"tsx": "^4.19.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: shouldn't that be used instead of tsc?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's following the existing pattern from dotnet/aspire:
https://github.com/dotnet/aspire/blob/main/playground/polyglot/TypeScript/Aspire.Hosting.Azure.AppContainers/ValidationAppHost/package.json

But tsx is used to simply run TypeScript code on Node.js.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it isn't used anywhere in the project, it's a useless dependency. Same for nodemon.

@@ -0,0 +1,962 @@
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: the lockfile could be shared in a monorepo to avoid installing the same dependency over and over.

IEvangelist and others added 3 commits March 30, 2026 09:37
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@IEvangelist IEvangelist force-pushed the dapine/polyglot-export-gofeatureflag branch from 9953ae9 to d4a30f1 Compare March 30, 2026 15:43
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Branch Rate Complexity Health
CommunityToolkit.Aspire.GoFeatureFlag 100% 97% 44
CommunityToolkit.Aspire.Hosting.ActiveMQ 88% 48% 95
CommunityToolkit.Aspire.Hosting.ActiveMQ.MassTransit 100% 100% 15
CommunityToolkit.Aspire.Hosting.Adminer 89% 70% 20
CommunityToolkit.Aspire.Hosting.Azure.Dapr 28% 5% 38
CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis 60% 50% 20
CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder 100% 100% 11
CommunityToolkit.Aspire.Hosting.Azure.Extensions 64% 30% 27
CommunityToolkit.Aspire.Hosting.Bun 96% 83% 14
CommunityToolkit.Aspire.Hosting.Dapr 47% 26% 557
CommunityToolkit.Aspire.Hosting.DbGate 96% 62% 12
CommunityToolkit.Aspire.Hosting.Deno 98% 85% 22
CommunityToolkit.Aspire.Hosting.Elasticsearch.Extensions 100% 94% 30
CommunityToolkit.Aspire.Hosting.Flagd 79% 100% 16
CommunityToolkit.Aspire.Hosting.Flyway 88% 100% 6
CommunityToolkit.Aspire.Hosting.GoFeatureFlag 80% 50% 24
CommunityToolkit.Aspire.Hosting.GoFeatureFlag.ApiService 100% 100% 3
CommunityToolkit.Aspire.Hosting.Golang 59% 46% 45
CommunityToolkit.Aspire.Hosting.Java 86% 75% 207
CommunityToolkit.Aspire.Hosting.Java.ApiApp 65% 50% 11
CommunityToolkit.Aspire.Hosting.Java.WebApp 25% 18% 59
CommunityToolkit.Aspire.Hosting.JavaScript.Extensions 97% 83% 158
CommunityToolkit.Aspire.Hosting.k6 70% 10% 8
CommunityToolkit.Aspire.Hosting.k6.ApiService 61% 67% 13
CommunityToolkit.Aspire.Hosting.Keycloak.Extensions 100% 100% 11
CommunityToolkit.Aspire.Hosting.KurrentDB 86% 88% 19
CommunityToolkit.Aspire.Hosting.LavinMQ 90% 83% 18
CommunityToolkit.Aspire.Hosting.LavinMQ.MassTransit 100% 100% 15
CommunityToolkit.Aspire.Hosting.MailPit 91% 100% 13
CommunityToolkit.Aspire.Hosting.McpInspector 88% 60% 99
CommunityToolkit.Aspire.Hosting.McpInspector.McpServer 89% 100% 2
CommunityToolkit.Aspire.Hosting.Meilisearch 95% 85% 30
CommunityToolkit.Aspire.Hosting.Meilisearch.ApiService 82% 100% 15
CommunityToolkit.Aspire.Hosting.Minio 99% 91% 32
CommunityToolkit.Aspire.Hosting.Minio.ApiService 98% 92% 15
CommunityToolkit.Aspire.Hosting.MongoDB.Extensions 95% 90% 10
CommunityToolkit.Aspire.Hosting.MySql.Extensions 98% 93% 37
CommunityToolkit.Aspire.Hosting.Ngrok 48% 32% 96
CommunityToolkit.Aspire.Hosting.Ollama 77% 67% 267
CommunityToolkit.Aspire.Hosting.OpenTelemetryCollector 79% 70% 42
CommunityToolkit.Aspire.Hosting.PapercutSmtp 100% 100% 9
CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions 98% 91% 43
CommunityToolkit.Aspire.Hosting.PowerShell 75% 53% 91
CommunityToolkit.Aspire.Hosting.Python.Extensions 46% 31% 44
CommunityToolkit.Aspire.Hosting.RavenDB 63% 46% 118
CommunityToolkit.Aspire.Hosting.RavenDB.ApiService 21% 33% 16
CommunityToolkit.Aspire.Hosting.Redis.Extensions 100% 71% 14
CommunityToolkit.Aspire.Hosting.Rust 94% 83% 8
CommunityToolkit.Aspire.Hosting.Sftp 86% 70% 16
CommunityToolkit.Aspire.Hosting.Sftp.ApiService 94% 100% 10
CommunityToolkit.Aspire.Hosting.Solr 88% 100% 19
CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects 70% 62% 141
CommunityToolkit.Aspire.Hosting.Sqlite 90% 93% 24
CommunityToolkit.Aspire.Hosting.SqlServer.Extensions 98% 93% 37
CommunityToolkit.Aspire.Hosting.Stripe 50% 17% 119
CommunityToolkit.Aspire.Hosting.SurrealDb 70% 52% 210
CommunityToolkit.Aspire.Hosting.SurrealDb.ApiService 81% 52% 299
CommunityToolkit.Aspire.Hosting.Umami 98% 75% 9
CommunityToolkit.Aspire.Hosting.Zitadel 97% 86% 31
CommunityToolkit.Aspire.KurrentDB 97% 95% 33
CommunityToolkit.Aspire.MassTransit.RabbitMQ 100% 100% 24
CommunityToolkit.Aspire.Meilisearch 97% 96% 38
CommunityToolkit.Aspire.Microsoft.Data.Sqlite 94% 85% 26
CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite 68% 67% 117
CommunityToolkit.Aspire.Minio.Client 93% 87% 67
CommunityToolkit.Aspire.OllamaSharp 78% 74% 76
CommunityToolkit.Aspire.RavenDB.Client 98% 78% 87
CommunityToolkit.Aspire.Sftp 90% 94% 54
CommunityToolkit.Aspire.Sqlite.Api 93% 90% 68
CommunityToolkit.Aspire.SurrealDb 99% 85% 39
Summary 75% (6842 / 9109) 58% (1933 / 3352) 4063

Minimum allowed line rate is 60%

aaronpowell added a commit that referenced this pull request Apr 1, 2026
Squash merge of #1189

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aaronpowell aaronpowell merged commit abaad5c into main Apr 1, 2026
465 of 481 checks passed
@aaronpowell aaronpowell deleted the dapine/polyglot-export-gofeatureflag branch April 1, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants