Skip to content

Project Radius backing resource connections from recipe outputs, and upgrade to Radius 0.60 - #19555

Merged
Mitch Denny (mitchdenny) merged 46 commits into
mainfrom
fix-radius-backing-resources
Sep 14, 2026
Merged

Mitch Denny (mitchdenny) merged 46 commits into
mainfrom
fix-radius-backing-resources

Conversation

@nellshamrell

@nellshamrell Nell Shamrell-Harrington (nellshamrell) commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #19253 (and #19031 before it). The prior threads had grown long enough to be hard to follow, so this PR restarts the review on the same branch and the same commits — there are no code changes relative to #19253. Earlier discussion, including the still-open questions on the SQL Server recipe mapping and the endpoint-resolution guard, is preserved there.

Open questions carried over from #19253

Two review questions were answered but never settled, and I would still like a call on each:

  1. SQL Server database children. The legacy Applications.Datastores/sqlDatabases recipe only echoes its database parameter back as an output — it never runs CREATE DATABASE — so AddSqlServer("sql").AddDatabase("appdb") hands the consumer a connection string naming a catalog the deployment does not contain. This PR warns (ASPIRERADIUS080) scoped to referenced database children, rather than failing, because the publisher cannot fix it, no published Kubernetes recipe exists for Radius.Data/sqlServerDatabases, and failing would regress models that work today (EF Core Migrate(), or sa on master). Reviewers wanted a hard fail; I am happy to switch if that is the call, but it needs an escape hatch.
  2. RadiusUnresolvableValueException narrowing. The GetDefaultPort throw appears to be unreachable: ResolveServicePort allocates a port for a portless endpoint before that path is hit, and the one case that returns null is a project's synthetic HTTPS endpoint, whose scheme GetDefaultPort answers. PortlessNonHttpEndpoint_IsResolvedRatherThanOmitted covers it regardless. The open question is whether the throw should become a Debug.Assert.

Description

An Aspire app deployed to Radius could not talk to its own cache, database, or queue. Every connection value the app received was wrong, so WithReference produced a connection string that pointed nowhere and the app failed at startup.

The cause is that a "backing" resource targeted at a Radius environment — Redis, PostgreSQL, MongoDB, SQL Server, RabbitMQ — is not deployed as a Radius.Compute/containers workload. It is provisioned by a Radius recipe. The recipe, not Aspire, decides the Kubernetes Service name and generates the credentials. Aspire was still deriving the host, port, and password from its own endpoint model, so it emitted a container-shaped address like cache-cache.default.svc.cluster.local for a Service the recipe had named something else, paired with a password the recipe never issued.

Scope

This started as the connection-projection fix above and grew, in review, into four related changes. They are together because each one is required for the first to actually work end to end — a projected connection value is only correct if it names the right recipe, survives the deploy, and does not leak on the way:

# Change Why it is here
1 Project backing-resource connections from recipe outputs The original bug (#18935).
2 Pin Radius to 0.60 and migrate Redis / RabbitMQ to their Radius.* UDTs 0.60 renames the recipePacks fields the publisher writes. The API server drops unknown fields instead of rejecting them, so the pre-0.60 spelling publishes and deploys cleanly while producing an empty recipe pack — every backing resource then fails to resolve a recipe. Correct projection onto a silently-empty pack is still a broken deployment.
3 Publish credential-bearing container env vars as valueFrom.secretKeyRef Projection is what puts recipe credentials into consumer environment variables. Emitting them inline would have written those newly-correct credentials into the Deployment spec and its rollout history in clear text — this PR creates the exposure, so it closes it.
4 Turn silent misconfiguration into publish-time diagnostics (ASPIRERADIUS069–086) Every case where the publisher cannot project a truthful value now fails or warns by name, instead of emitting a document that deploys and then misbehaves. This is the same class of bug as #18935, found while fixing it.

Items 2 and 3 landed together in a single commit (a3a8ffbb0), because the secret carrier they both depend on — Radius.Security/secrets — is introduced by 0.60; reviewing that commit on its own covers both.

User-facing behavior

Referencing a backing resource now works. Every value a consumer sees is projected from that resource's own Radius outputs:

Value Projected from
Host / port, and anything composed from them (ConnectionStrings__*, *_HOST, *_PORT, *_URI, service discovery) <resource>.properties.host / <resource>.properties.port
Password, for resources emitted as legacy Applications.* types (MongoDB, SQL Server) <resource>.listSecrets().password
User name, for those same types <resource>.properties.username
Password and user name, for resources emitted as Radius.* types (PostgreSQL, RabbitMQ) Passed into the recipe on the resource type's required username / password schema properties, using the same secure Bicep parameter Aspire composes into the connection string, so both sides agree by construction. RabbitMQ takes its password as the resource ID of a Radius.Security/secrets resource rather than as a string
Password, for Redis Nothing — the mapped recipe deploys an unauthenticated server. A password Aspire generated is dropped with ASPIRERADIUS075; one supplied explicitly fails the publish with ASPIRERADIUS085

Because the substitution happens on the underlying values rather than on formatted strings, connection strings, URIs, and the individual properties emitted by WithReference all resolve consistently.

Failures that were previously silent are now reported by name. The full set is ASPIRERADIUS069–086, tabulated in src/Aspire.Hosting.Radius/README.md; the ones most likely to change the outcome for an existing AppHost:

  • Referencing a backing resource in a different Radius environment fails with ASPIRERADIUS069 instead of emitting an unroutable address. This also surfaces from the Kubernetes, Azure Container Apps, and Azure App Service publishers, which resolve such references through the owning Radius environment.
  • A value that cannot be resolved at publish time — most commonly an Azure Bicep output — is logged at Warning. It was previously dropped at Debug, so every environment variable sourced from an Azure resource referenced by a Radius container silently disappeared from the published output.
  • A credential parameter the AppHost author supplied is reported when the recipe's generated credential replaces it, since the author's value never reaches the cluster.
  • A TLS-enabled backing endpoint asked for Scheme, TlsEnabled, or Url fails with ASPIRERADIUS081. No mapped Radius type publishes a transport-security output, so those values would describe how the resource runs locally (rediss://, ssl=true) against a server the recipe starts in plaintext.
  • A password supplied explicitly to Redis fails with ASPIRERADIUS085 rather than being dropped: the recipe deploys an unauthenticated server, and quietly downgrading an author's request for authentication is not a decision the publisher should make. A password Aspire generated is still dropped, with the ASPIRERADIUS075 warning.
  • AddRabbitMQ(...) without an explicit user name fails with ASPIRERADIUS082 (see the 0.60 section below).
  • A referenced AddSqlServer("sql").AddDatabase("appdb") warns with ASPIRERADIUS080: the legacy SQL recipe echoes the database parameter into its outputs but never runs CREATE DATABASE, so the consumer was being handed a connection string naming a catalog the deployment does not contain.

Breaking change: Radius v0.59 and earlier are no longer supported

Release note. This is a breaking change for existing Radius users and needs to appear in the release notes for the version that ships it. The PR carries the breaking-change label so release-notes-generate picks it up; the text below is written to be usable as the entry more or less verbatim.

Who is affected. Anyone using Aspire.Hosting.Radius against a Radius control plane older than v0.60. Radius v0.60 was released on 2026-01-27.

What changes. The generated Bicep now targets the v0.60 schemas. Redis and RabbitMQ move onto their Radius.* user-defined types, credentials are carried on the new Radius.Security/secrets type, and the recipe-pack fields are written with their v0.60 names (kind / source, renamed from recipeKind / recipeLocation).

Why it matters more than a normal version bump. The Radius API server drops fields it does not recognize rather than rejecting them. On a v0.59 control plane the recipe-pack fields are silently discarded, so aspire deploy reports success and produces an application whose backing resources have no recipe — a cache, database, or queue that never provisions, with no error anywhere to explain it. This is the reason the change is called out as breaking rather than as a prerequisite bump: the failure mode is a silently non-functional deployment, not a failed deploy.

What happens now. aspire deploy refuses to deploy to an older control plane instead of producing that broken app. A preflight step reads the control-plane version and fails with ASPIRERADIUS091:

The Radius control plane is v0.59, but this integration requires v0.60 or later. Deploying to an older control plane appears to succeed while silently discarding the recipe pack, leaving every backing resource without a recipe. Run 'rad upgrade kubernetes' to bring the control plane up to date, then deploy again.

The check inspects the cluster the active rad workspace targets (honoring ASPIRE_RADIUS_KUBE_CONTEXT), not whatever context kubectl happens to point at. A version it cannot read — unreachable cluster, Radius not installed, an edge build — is allowed through, so the gate turns one silent failure loud without becoming a new way for valid deploys to fail.

Action required. Run rad upgrade kubernetes to bring the control plane to v0.60 or later, then deploy again. There is no in-package workaround: the schema change is in the Radius API, and no version negotiation exists to soften it.

Radius 0.60 is now the minimum supported runtime

This is a breaking change for anyone deploying to Radius v0.59 or earlier, and the incompatibility is silent. v0.60 renamed the Radius.Core/recipePacks fields recipeKind/recipeLocation to kind/source. The Radius API server ignores fields it does not recognize rather than rejecting them, so deploying these artifacts to a v0.59 cluster produces an empty recipe pack with no publish error and no deploy error — and every backing resource then fails to resolve a recipe. There is no version negotiation available to soften this, so the package pins 0.60 and the README states the requirement up front.

Because the failure is silent, aspire deploy now refuses to deploy to an older control plane rather than producing a non-functional app: a preflight step reads rad version and fails with ASPIRERADIUS091. It runs as its own pipeline step ahead of everything that mutates the cluster or the machine, and it inspects the cluster the active rad workspace targets (honoring ASPIRE_RADIUS_KUBE_CONTEXT) rather than whatever context kubectl currently points at, so it cannot deliver a verdict about the wrong cluster. A version it cannot read — unreachable cluster, Radius not installed, an edge build, or an unresolvable workspace context — is allowed through: the gate exists to turn one silent failure loud, not to become a new way for valid deploys to fail.

What the upgrade brings with it:

  • Redis and RabbitMQ move onto their Radius.* UDTs (Radius.Data/redisCaches, Radius.Messaging/rabbitMQ — note: not rabbitMQQueues) and their legacy Applications.* fallbacks are gone. MongoDB, SQL Server, and the Dapr building blocks stay on the legacy types, because their UDT equivalents still have no published Kubernetes recipe.
  • Radius.Security/secrets is the new carrier for credentials a UDT consumes by resource ID. RabbitMQ's password property takes the resource ID of a secrets resource, not a password string.
  • RabbitMQ requires an explicit user name (ASPIRERADIUS082). The 0.60 schema restricts guest to loopback connections, so a broker provisioned with the Aspire default would reject every workload pod — and the default arrives at the publisher as literal text inside the connection string, with no value to rewrite, so the broker and the connection string cannot be made to agree.
  • The Redis and RabbitMQ recipes are pinned by commit SHA, not :latest. resource-types-contrib moves :latest only on a stable recipe release and publishes an immutable <sha> tag on every push to main — the tag its own workflow documents as "the tag Radius pins against". Both recipes post-date the last stable release, so :latest does not exist for either, and referencing it fails at deploy time with RecipeDownloadFailed. edge is not usable either: it floats, and a generated artifact must keep deploying the recipe it was published against.

Credentials reach containers as secret references

Container environment variables were previously always emitted as env: { NAME: { value: ... } }. Routing a credential through an @secure() Bicep parameter keeps it out of the published artifact, but the resolved string still lands in the Kubernetes Deployment spec — readable by anyone with get deployment in the namespace, and retained in the rollout history after a rotation.

A value that carries a credential is now written to a Radius.Security/secrets resource named <container>-env-secret and referenced by key:

PGDB_USERNAME: {
  value: 'postgres'
}
PGDB_PASSWORD: {
  valueFrom: {
    secretKeyRef: {
      secretName: 'api-env-secret'
      key: 'PGDB_PASSWORD'
    }
  }
}

A value counts as credential-bearing if it is built from a secret parameter (AddParameter(name, secret: true), and the passwords Aspire generates for backing resources) or from a recipe's listSecrets() output. Everything else keeps its plain value, so the deployed spec stays readable. Because the variable name becomes a Kubernetes Secret data key, it is validated at publish time against the full API-server contract — 1–253 characters of [-._a-zA-Z0-9], and not ., .., or ..-prefixed — instead of failing when the Secret reaches the cluster (ASPIRERADIUS083).

User-facing usage

No API change is required — this is what an existing AppHost already looks like, and it now deploys correctly:

var builder = DistributedApplication.CreateBuilder(args);

var radius = builder.AddRadiusEnvironment("prod");

var cache = builder.AddRedis("cache");
var db = builder.AddPostgres("pg").AddDatabase("appdb");

builder.AddProject<Projects.Api>("api")
       .WithReference(cache)
       .WithReference(db);

builder.Build().Run();

aspire publish now emits, for the container:

ConnectionStrings__cache: {
  value: '${cache.properties.host}:${cache.properties.port},password=${cache.listSecrets().password}'
}
ConnectionStrings__appdb: {
  value: 'Host=${pg.properties.host};Port=${pg.properties.port};Username=postgres;Password=${pg_password};Database=appdb'
}

pg_password is the secure parameter Aspire also passes into the recipe, so the value the app receives and the value the recipe provisions are the same by construction. Where the same credential appears inside a URI it is escaped:

PG_URI: {
  value: 'postgresql://postgres:${uriComponent(pg_password)}@${pg.properties.host}:${pg.properties.port}/appdb'
}

New public API

This PR adds six public API elements, all in Aspire.Hosting.Radius. The five that are part of the ConfigureRadiusInfrastructure escape hatch carry that surface's existing ASPIRERADIUS004 experimental gate — the two new ContainerEnvVarConstruct members inherit it from the type. The exception deliberately does not:

API Why it is public
RadiusBackingResourceProjectionException So a cross-environment reference can be caught by name (see below). Not gated — it is thrown from ordinary publish through AddRadiusEnvironment, which carries no experimental attribute, so gating it would force an AppHost author to suppress a diagnostic purely in order to catch an exception an ungated API throws at them.
RadiusSecuritySecretConstruct The Radius.Security/secrets resource in the Bicep AST. Reachable from ConfigureRadiusInfrastructure, which is the documented escape hatch for editing the emitted model.
RadiusSecuritySecretDataEntryConstruct One data entry on the above; needed to add or edit an entry from a callback.
ContainerEnvVarConstruct.SecretName Existing type, new member. The Radius.Security/secrets resource a container env var reads from — the valueFrom.secretKeyRef.secretName half. Before this PR the type only modelled the plain value form.
ContainerEnvVarConstruct.SecretKey Existing type, new member. The key within that secret's data map — the valueFrom.secretKeyRef.key half.
RadiusInfrastructureOptions.SecuritySecrets The callback's entry point to the emitted secrets.

Because the two construct types are mutable from a callback, their post-callback invariants are enforced by the publisher rather than by the type system: ASPIRERADIUS088 (invalid, or missing, Kubernetes object name and data keys), ASPIRERADIUS089 (a replaced or mutated generated credential), ASPIRERADIUS090 (two secrets resolving to one cluster object) and ASPIRERADIUS092 (a Kind whose recipe-required data keys are absent, or the legacy certificate spelling this type does not accept) and ASPIRERADIUS093 (a missing EnvironmentId or entry Value, or the legacy raw encoding). The two new ContainerEnvVarConstruct members are mutually exclusive with Value and with each other's absence, which the type system also cannot express, so ASPIRERADIUS087 enforces it: both halves must be set, neither may accompany a Value, and a literal SecretName/SecretKey must be a valid Kubernetes object name and data key respectively.

The exception exists so that a cross-environment reference can be caught by name:

try
{
    await app.RunAsync();
}
catch (RadiusBackingResourceProjectionException ex)
{
    Console.Error.WriteLine($"'{ex.Resource.Name}' is provisioned by a Radius recipe in " +
                            "another environment, so its address cannot be resolved here.");
}

Implementation notes

  • RadiusBackingConnections holds the type → connection-schema table. Its credential mode is a closed hierarchy (ListSecrets / RecipeInputProperties / NotProjected) so "credential handled by neither mechanism" — the exact shape of this bug — is unrepresentable, and a contract test fails if a newly mapped backing type has no schema entry.
  • The container environment-variable loop previously caught InvalidOperationException broadly. That was positional rather than structural; it is now narrowed to the conditions the publisher genuinely intends to skip, raised as an internal RadiusUnresolvableValueException. A value is only skipped when it is an IManifestExpressionProvider (a positive marker for "produced by another deployment") and it fails to resolve; an InvalidOperationException from any other value provider now fails the publish rather than silently dropping the variable.
  • Credentials for Radius.* types are written to the resource type's top-level schema properties rather than properties.recipe.parameters. The manifests in radius-project/resource-types-contrib declare username / password as required properties and the recipes read them as context.resource.properties.<name>, so the recipe-parameter shape would have failed schema validation at deploy time.
  • The default recipe for Radius.Data/postgreSqlDatabases is ghcr.io/radius-project/kube-recipes/postgresqldatabases:latest. The recipes/local-dev/postgresqldatabases artifact this originally pointed at is not published.
  • Values a ReferenceExpression marked as URI components are emitted as Bicep uriComponent(...), so a recipe-generated password containing @ or / cannot corrupt the URI it sits in.
  • The multi-database failure is scoped to databases consumers actually reference; unreferenced extras and servers with no database child warn and continue. Declaring several databases and referencing none of them fails too, rather than defaulting to the first: a database consumed only from inside a WithEnvironment callback records no reference annotation, so the choice cannot be proven.
  • SQL Server is emitted as the legacy Applications.Datastores/sqlDatabases type. The contrib UDT is Radius.Data/sqlServerDatabases (not sqlDatabases), and its Kubernetes recipe is not published — there is no ghcr.io/radius-project/kube-recipes/sqlserverdatabases repository at all — so the legacy type, which has both a published recipe and a listSecrets() action, is the only deployable option today.
  • A credential parameter cannot serve two roles: using one parameter as both the user name and the password of a resource, or sharing it across resources when either credential is recipe-generated, fails with ASPIRERADIUS070. Substitutions are keyed by parameter identity, so such a parameter could only ever be rewritten to one of the two values.
  • New diagnostic codes ASPIRERADIUS069–086, documented in src/Aspire.Hosting.Radius/README.md along with the known gaps (the default MongoDB user name cannot be projected, Radius.Messaging/rabbitMQ carries a queue property Aspire has no concept of, uriComponent escaping differs cosmetically from Uri.EscapeDataString, and only a resource's primary endpoint is projectable).
  • ASPIRERADIUS076 fails the publish when the recipe's input schema does not accept the credential properties the resource requires, which previously produced a resource nothing could authenticate against.
  • The ASPIRERADIUS081 TLS guard is enforced in RadiusEnvironmentResource rather than only in the publisher, so a Kubernetes, Azure Container Apps, or App Service consumer that resolves a Radius-owned endpoint through ComputeEnvironmentEndpointResolver gets the same failure instead of a locally-derived rediss/TlsEnabled=True. Host/Port/HostAndPort still project — the address is right regardless of transport.
  • The ASPIRERADIUS070 "unrelated use of a substituted parameter" check now takes provenance from the connection-property injection (the variable name the splat produces for a declared reference, with an aliased connectionName recovered from the ConnectionStrings__<name> entry the same call emits) rather than from value equality. A user-authored value identical to an injected property is still silently replaced by the recipe credential, so it is now reported instead of exempted.

Validation

  • Aspire.Hosting.Radius.Tests: 614 passing, 0 failing (the count includes the secret-store tests that landed on main while this branch was open). The new tests cover schema totality, the cross-publisher exception contract, the narrowed-catch conditions (both the skip and the fail-the-publish path), user-name projection, database scoping, the credential warnings, and URI escaping.
  • A deployment end-to-end test, DeployRadiusPostgresBackingResourceToKind, stands up KinD plus the Radius control plane, publishes an AppHost that references a Postgres backing resource, deploys the generated artifacts, and then reads the environment back off the deployed container and authenticates against the provisioned database with psql. This is what surfaced the property-shape and recipe-source bugs above, which the Bicep snapshots could not catch.
    • This originally needed the test to register the type by hand (rad resource-type create plus rad bicep publish-extension) and to patch the published artifact, because Radius.Data/postgreSqlDatabases was absent from the Bicep extension at 0.59. Radius 0.60 ships the type in the pinned extension and registers it at rad install kubernetes, so all of that is gone: the test publishes and then runs aspire deploy against the untouched artifacts, which is the path a user actually follows.
  • A second deployment end-to-end test, DeployRadiusRedisRabbitMqAndMongoBackingResourcesToKind, covers the types whose 0.60 migration cannot be proven from a Bicep snapshot. RabbitMQ's password takes the resource ID of a Radius.Security/secrets resource, so only a real deployment shows that Radius dereferenced it and the broker enforces the projected credential. It also asserts the credential reaches the pod as a secretKeyRef and that the plaintext appears nowhere in the Deployment spec. It is marked [OuterloopTest] and therefore runs in the scheduled outerloop suite, not per-PR: it stands up a third KinD cluster, and three per PR is more CI budget than the incremental coverage justifies. The container and Postgres deploy tests above do run per-PR, so the Redis and RabbitMQ deployment paths specifically are covered on a schedule rather than on every change.
  • No behavior change in the publishers that share the endpoint resolver: Aspire.Hosting.Kubernetes.Tests 269/269, Aspire.Hosting.Azure.Kubernetes.Tests 63/63, Aspire.Hosting.Azure.Tests 1645 passed / 5 skipped.
  • ./build.sh clean with 0 warnings.
  • Every added or changed Verify snapshot was reviewed line by line rather than accepted on a green test, since this repo enables AutoVerify locally.

Security considerations

This change alters how credentials appear in generated deployment artifacts, so it is flagged for review even though the net effect is a reduction in exposure:

  • Aspire-generated password parameters for backing resources are no longer emitted into the published Bicep. Previously they were written as secure parameters that the recipe ignored, so the artifact carried credential material that had no deployment purpose.
  • Passwords are now read at deploy time via listSecrets(), or passed into the recipe as a secure parameter. No secret value is materialized into the generated file in either case.
  • Values interpolated into URIs are wrapped in uriComponent(...). Recipe-generated passwords come from an alphabet the recipe chooses rather than Aspire's URL-safe generator, so an unescaped @, /, or : could previously have re-parsed the URI's authority section.
  • Where the credential ends up is a trade, not a strict win, and reviewers should weigh it. listSecrets() is evaluated by the deployment engine, so the resolved secret is written into the consuming resource's Deployment spec (and is therefore readable by anything with get pod/get deployment in the namespace, and by anyone who can read the deployment history that records the evaluated template output). The alternative - declaring the value @secure() - keeps it out of deployment history but requires the operator to supply it out of band, which defeats the point of a recipe that generates its own credential. The correct long-term shape is a secret reference so neither the artifact nor the Deployment spec carries the plaintext, and this PR now lands it: a container environment variable that carries a credential is published as valueFrom.secretKeyRef against a Radius.Security/secrets resource named <container>-env-secret, rather than as an inline value. Non-credential variables keep their plain value, so the deployed spec stays readable. Net: both the artifact-at-rest and the Deployment-spec exposure are reduced.
  • Redis is a special case worth naming: its recipe deploys an unauthenticated server and emits no secrets output at all, so no credential is projected. The generated connection string carries an empty password. A password Aspire generated is dropped with the ASPIRERADIUS075 warning; a password the AppHost author supplied fails the publish with ASPIRERADIUS085, because silently downgrading an explicit request for authentication is a security decision the publisher should not make. This is the recipe's security posture, not a change introduced here - see the Known limitations section of the README.

Fixes #18935

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

Copilot AI balanced review requested due to automatic review settings August 20, 2026 22:56
@nellshamrell Nell Shamrell-Harrington (nellshamrell) added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 20, 2026
@github-actions

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/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19555

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19555"

@github-actions github-actions Bot added area-integrations Issues pertaining to Aspire Integrations packages and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Aug 20, 2026
@github-actions

This comment has been minimized.

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

Updates Radius publishing so recipe-backed resources expose correct endpoints and credentials, targeting Radius 0.60.

Changes:

  • Projects backing-resource connections from Radius recipe outputs.
  • Uses Radius.Security/secrets and Kubernetes secret references for credentials.
  • Adds diagnostics, contract tests, snapshots, and KinD deployment coverage.

Reviewed changes

Copilot reviewed 44 out of 45 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Aspire.Hosting.Radius/README.md Documents Radius 0.60 behavior and diagnostics.
src/Aspire.Hosting.Radius/RadiusBackingResourceEndpointException.cs Adds the public projection exception.
src/Aspire.Hosting.Radius/RadiusBicepExtension.cs Pins Radius Bicep types to 0.60.
src/Aspire.Hosting.Radius/RadiusEnvironmentResource.cs Guards recipe-owned endpoints and TLS metadata.
src/Aspire.Hosting.Radius/Publishing/BicepPostProcessor.cs Emits and validates security-secret constructs.
src/Aspire.Hosting.Radius/Publishing/Constructs/ContainerEnvVarConstruct.cs Adds secretKeyRef environment values.
src/Aspire.Hosting.Radius/Publishing/Constructs/LegacyApplicationEnvironmentConstruct.cs Updates legacy-resource documentation.
src/Aspire.Hosting.Radius/Publishing/Constructs/LegacyRecipeEntryConstruct.cs Clarifies legacy recipe fields.
src/Aspire.Hosting.Radius/Publishing/Constructs/RadiusResourceTypeConstruct.cs Adds backing-resource schema properties.
src/Aspire.Hosting.Radius/Publishing/Constructs/RadiusSecuritySecretConstruct.cs Models Radius.Security/secrets.
src/Aspire.Hosting.Radius/Publishing/Constructs/RecipeEntryConstruct.cs Uses Radius 0.60 recipe-pack fields.
src/Aspire.Hosting.Radius/Publishing/RadiusBackingConnections.cs Defines connection-projection schemas.
src/Aspire.Hosting.Radius/Publishing/RadiusInfrastructureBuilder.cs Implements projection, diagnostics, and secrets.
src/Aspire.Hosting.Radius/Publishing/RadiusInfrastructureOptions.cs Exposes generated security secrets.
src/Aspire.Hosting.Radius/Publishing/RadiusUnresolvableValueException.cs Narrows skippable resolution failures.
src/Aspire.Hosting.Radius/ResourceMapping/RadiusResourceTypes.cs Updates Radius 0.60 type constants.
src/Aspire.Hosting.Radius/ResourceMapping/ResourceTypeMapper.cs Migrates resource mappings and fallbacks.
tests/Aspire.Cli.EndToEnd.Tests/Helpers/KubernetesDeployTestHelpers.cs Updates Radius helper documentation.
tests/Aspire.Cli.EndToEnd.Tests/Helpers/KubernetesE2EVersions.cs Pins E2E Radius to 0.60.
tests/Aspire.Cli.EndToEnd.Tests/RadiusDeployTests.cs Adds real backing-resource deployments.
tests/Aspire.Cli.EndToEnd.Tests/RadiusPublishTests.cs Updates extension-version expectations.
tests/Aspire.Deployment.EndToEnd.Tests/RadiusAzureResourcesDeploymentTests.cs Updates Radius-version documentation.
tests/Aspire.Deployment.EndToEnd.Tests/RadiusStarterDeploymentTests.cs Upgrades AKS deployment coverage to 0.60.
tests/Aspire.Hosting.Radius.Tests/DeploymentE2E/DeployEndToEndTests.cs Expands generated-resource checks.
tests/Aspire.Hosting.Radius.Tests/Publishing/BackingResourceContractTests.cs Verifies mapping and recipe invariants.
tests/Aspire.Hosting.Radius.Tests/Publishing/BackingResourceProjectionTests.cs Tests endpoint and credential projection.
tests/Aspire.Hosting.Radius.Tests/Publishing/BackingResourceValueResolutionTests.cs Tests value-resolution edge cases.
tests/Aspire.Hosting.Radius.Tests/Publishing/BicepGenerationMultiResourceTests.cs Updates multi-resource expectations.
tests/Aspire.Hosting.Radius.Tests/Publishing/BicepSyntaxValidationTests.cs Expects the Redis UDT.
tests/Aspire.Hosting.Radius.Tests/Publishing/ConfigureRadiusInfrastructureTests.cs Tests Radius 0.60 recipe fields.
tests/Aspire.Hosting.Radius.Tests/Publishing/ContainerSecretEnvironmentTests.cs Tests secret-backed environment variables.
tests/Aspire.Hosting.Radius.Tests/Publishing/LegacyFallbackEmissionTests.cs Updates legacy/UDT scenarios.
tests/Aspire.Hosting.Radius.Tests/RadiusEnvironmentResourceTests.cs Tests cross-publisher TLS guards.
tests/Aspire.Hosting.Radius.Tests/Recipes/RecipePackParametersBicepTests.cs Updates the legacy recipe fixture.
tests/Aspire.Hosting.Radius.Tests/RecordingLogger.cs Adds diagnostic capture support.
tests/Aspire.Hosting.Radius.Tests/ResourceMapping/ResourceTypeMapperTests.cs Verifies updated type mappings.
tests/Aspire.Hosting.Radius.Tests/Snapshots/BackingResourceProjectionTests.AllBackingResourceTypes_ProjectRecipeOutputs.verified.bicep Captures all projected resource types.
tests/Aspire.Hosting.Radius.Tests/Snapshots/BackingResourceProjectionTests.CallbackRenamingBackingResource_RewiresProjectedEnvironmentValues.verified.bicep Captures callback rewiring.
tests/Aspire.Hosting.Radius.Tests/Snapshots/BackingResourceProjectionTests.DirectEndpointPropertyReference_ProjectsRecipeOutputs.verified.bicep Captures direct endpoint projection.
tests/Aspire.Hosting.Radius.Tests/Snapshots/BackingResourceProjectionTests.UnauthenticatedBackingResource_DoesNotLeakAspireGeneratedPasswordParameter.verified.bicep Captures unauthenticated Redis output.
tests/Aspire.Hosting.Radius.Tests/Snapshots/BackingResourceValueResolutionTests.UserNameParameter_IsProjectedFromRecipeOutputs.verified.bicep Captures username projection.
tests/Aspire.Hosting.Radius.Tests/Snapshots/LegacyFallbackEmissionTests.LegacyAndUdt_ShareResourceNameAndUseDistinctParents.verified.bicep Captures mixed parent references.
tests/Aspire.Hosting.Radius.Tests/Snapshots/LegacyFallbackEmissionTests.LegacyOnly_EmitsLegacyParentsAndNoUdtResources.verified.bicep Captures MongoDB legacy-only output.
tests/Aspire.Hosting.Radius.Tests/Snapshots/LegacyFallbackEmissionTests.MixedLegacyAndUdt_EmitsBothParentPairs.verified.bicep Captures mixed legacy/UDT output.
tests/Aspire.Hosting.Radius.Tests/Snapshots/LegacyFallbackEmissionTests.UdtOnly_DoesNotEmitLegacyParents.verified.bicep Captures PostgreSQL UDT output.

Nell Shamrell-Harrington (nellshamrell) added a commit to nellshamrell/aspire that referenced this pull request Aug 20, 2026
…ations

Two review findings on microsoft#19555.

ASPIRERADIUS080 only saw consumers recorded by a ResourceRelationshipAnnotation,
so `WithEnvironment(ctx => ctx.EnvironmentVariables["CS"] = db)` — which builds
its value inline and records no annotation — silently received a connection
string naming a database the legacy `sqldatabases` recipe never creates. The
warning is now driven off the union of the annotations and the connection
strings actually resolved during the publish, which means it has to run after
every container's environment has been built rather than inline with credential
wiring.

Separately, several diagnostics pointed at a remediation that cannot be
followed: `username`/`password`/`database` are internal schema properties, so a
ConfigureRadiusInfrastructure callback cannot set them, and RecipeParameters is
not a substitute because it emits under a different part of the resource body.
ASPIRERADIUS074 (secret removed, and the projected-property site, which also
called a schema property a "recipe parameter") and ASPIRERADIUS086 now say what
is actually possible. The container env var sites keep their advice: `Env` is
public and genuinely settable from a callback.

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings August 20, 2026 23:31
Nell Shamrell-Harrington (nellshamrell) added a commit that referenced this pull request Aug 20, 2026
…ations

Two review findings on #19555.

ASPIRERADIUS080 only saw consumers recorded by a ResourceRelationshipAnnotation,
so `WithEnvironment(ctx => ctx.EnvironmentVariables["CS"] = db)` — which builds
its value inline and records no annotation — silently received a connection
string naming a database the legacy `sqldatabases` recipe never creates. The
warning is now driven off the union of the annotations and the connection
strings actually resolved during the publish, which means it has to run after
every container's environment has been built rather than inline with credential
wiring.

Separately, several diagnostics pointed at a remediation that cannot be
followed: `username`/`password`/`database` are internal schema properties, so a
ConfigureRadiusInfrastructure callback cannot set them, and RecipeParameters is
not a substitute because it emits under a different part of the resource body.
ASPIRERADIUS074 (secret removed, and the projected-property site, which also
called a schema property a "recipe parameter") and ASPIRERADIUS086 now say what
is actually possible. The container env var sites keep their advice: `Env` is
public and genuinely settable from a callback.

Co-authored-by: Copilot <[email protected]>
@github-actions

This comment has been minimized.

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

Copilot reviewed 44 out of 45 changed files in this pull request and generated 1 comment.

Suppressed comments (2)

src/Aspire.Hosting.Radius/README.md:251

  • “Any supplied password” incorrectly includes an AppHost-authored password, which is not discarded: it aborts publishing with ASPIRERADIUS085. Distinguish that from the generated-password ASPIRERADIUS075 path, as the diagnostics section already does.
For resources emitted as legacy `Applications.*` types (MongoDB, SQL Server), a password or user name the AppHost supplies as a parameter is *not* used when deploying to Radius — the recipe generates its own. Aspire replaces it with the recipe's value and logs a warning, since the parameter's value never reaches the cluster. Passwords Aspire generated itself are replaced silently. Resources emitted as `Radius.*` types (PostgreSQL, RabbitMQ) behave the opposite way: the parameter *is* handed to the recipe — directly on the resource's properties for PostgreSQL, through a `Radius.Security/secrets` resource for RabbitMQ — so the value the AppHost supplied is the deployed credential and nothing is replaced. Redis is neither: its recipe deploys an unauthenticated server, so any supplied password is discarded with `ASPIRERADIUS075`.

src/Aspire.Hosting.Radius/README.md:243

  • This table says every Redis password is discarded with ASPIRERADIUS075, but an explicitly supplied password actually fails publishing with ASPIRERADIUS085; only Aspire-generated passwords are discarded. Qualify both outcomes so users do not expect an explicit authentication request to publish successfully.

This issue also appears on line 251 of the same file.

| Password, for Redis | Nothing. The pinned `kube-recipes/rediscaches` recipe deploys Redis **without authentication** and publishes no password secret, so consumers receive an empty password and a warning names the discarded value (`ASPIRERADIUS075`) |

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

This comment has been minimized.

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

Copilot reviewed 44 out of 45 changed files in this pull request and generated no new comments.

Suppressed comments (2)

src/Aspire.Hosting.Radius/Publishing/Constructs/ContainerEnvVarConstruct.cs:66

  • The new public surface permits states that its contract says are invalid: callers can assign only one of SecretName/SecretKey, or assign them on an existing value entry and emit both value and valueFrom. Those artifacts are rejected downstream by the container/Kubernetes schema. Model the secret reference as one atomic alternative, or add post-callback validation that requires both fields and rejects coexistence with Value.
    public BicepValue<string> SecretName
    {
        get { Initialize(); return _secretName!; }
        set { Initialize(); _secretName!.Assign(value); }
    }

    /// <summary>
    /// The key within the secret resource's <c>data</c> map. Emitted only when assigned, and
    /// mutually exclusive with <see cref="Value"/>.
    /// </summary>
    public BicepValue<string> SecretKey
    {
        get { Initialize(); return _secretKey!; }
        set { Initialize(); _secretKey!.Assign(value); }

src/Aspire.Hosting.Radius/Publishing/Constructs/RadiusSecuritySecretConstruct.cs:70

  • These remarks are already stale: this PR uses the construct for credential-bearing container environment variables in CreateContainerEnvSecret, so container use is no longer “later work.” Document both current uses to keep the public API description accurate.
/// This construct is the canonical secret primitive for the <c>Radius.*</c> surface. It is used
/// today to hold credentials that a UDT backing resource consumes by resource ID (for example
/// the RabbitMQ <c>properties.password</c>), and is intended to be reused rather than duplicated
/// by later work that needs to hand a secret to a container env var.

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.

Reviewed the full builder diff, the new connection-schema/type-mapper/environment code, the new constructs, and the deploy E2E tests, and cross-checked the diagnostic codes against the README.

2 findings: 1 correctness gap in the callback escape hatch, and 1 informational test-coverage note. The three already-resolved review threads (lowercased secret names, callback-only ASPIRERADIUS080 consumers, impossible callback remediations) are not repeated here.

The deployment behavior change is backed by real rad deploy-to-KinD end-to-end coverage rather than snapshots alone, which is the right shape for this kind of change.

Nell Shamrell-Harrington (nellshamrell) added a commit that referenced this pull request Aug 21, 2026
…ations

Two review findings on #19555.

ASPIRERADIUS080 only saw consumers recorded by a ResourceRelationshipAnnotation,
so `WithEnvironment(ctx => ctx.EnvironmentVariables["CS"] = db)` — which builds
its value inline and records no annotation — silently received a connection
string naming a database the legacy `sqldatabases` recipe never creates. The
warning is now driven off the union of the annotations and the connection
strings actually resolved during the publish, which means it has to run after
every container's environment has been built rather than inline with credential
wiring.

Separately, several diagnostics pointed at a remediation that cannot be
followed: `username`/`password`/`database` are internal schema properties, so a
ConfigureRadiusInfrastructure callback cannot set them, and RecipeParameters is
not a substitute because it emits under a different part of the resource body.
ASPIRERADIUS074 (secret removed, and the projected-property site, which also
called a schema property a "recipe parameter") and ASPIRERADIUS086 now say what
is actually possible. The container env var sites keep their advice: `Env` is
public and genuinely settable from a callback.

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings August 21, 2026 15:54
@github-actions

This comment has been minimized.

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

Copilot reviewed 45 out of 46 changed files in this pull request and generated 3 comments.

Suppressed comments (1)

src/Aspire.Hosting.Radius/README.md:251

  • This repeats the same incorrect Redis behavior: explicitly supplied passwords are not discarded with ASPIRERADIUS075; they fail with ASPIRERADIUS085. Only generated passwords are discarded.
For resources emitted as legacy `Applications.*` types (MongoDB, SQL Server), a password or user name the AppHost supplies as a parameter is *not* used when deploying to Radius — the recipe generates its own. Aspire replaces it with the recipe's value and logs a warning, since the parameter's value never reaches the cluster. Passwords Aspire generated itself are replaced silently. Resources emitted as `Radius.*` types (PostgreSQL, RabbitMQ) behave the opposite way: the parameter *is* handed to the recipe — directly on the resource's properties for PostgreSQL, through a `Radius.Security/secrets` resource for RabbitMQ — so the value the AppHost supplied is the deployed credential and nothing is replaced. Redis is neither: its recipe deploys an unauthenticated server, so any supplied password is discarded with `ASPIRERADIUS075`.

Comment thread src/Aspire.Hosting.Radius/README.md Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Copilot AI review requested due to automatic review settings August 21, 2026 19:14
Fixes the nine findings from review, plus three defects found while
verifying them:

- Re-register the secrets recipe through the same construction path as
  the first pass, so a callback that drops the entry gets it back with
  the environment-wide and type-scoped recipe parameters applied.
- Narrow the conditional-condition catch to MissingParameterValueException
  and InvalidOperationException from a manifest expression, so unrelated
  failures are no longer swallowed.
- Validate the final Kubernetes Secret name and data keys after callbacks
  (ASPIRERADIUS088), rather than letting the API server reject them at
  deploy.
- Reject a Radius.Security/secrets credential whose key was removed or
  whose value was changed after the credential was already composed into
  consumers' connection strings (ASPIRERADIUS089), and run the
  callback-ownership check first so handing the property off stays legal.
- Fail publish when two Radius resources resolve to one Kubernetes Secret
  and at least one of them creates it (ASPIRERADIUS090). Sealed stores
  claim through their validated manifest, because the apply step selects
  them from the application model and applies them even when a callback
  removed the emitted construct.
- Reject a ContainerEnvVarConstruct left with nothing set
  (ASPIRERADIUS087).
- Re-enable the AKS Radius deployment test and extend the kind end-to-end
  test with MongoDB, which is the only live coverage of listSecrets()
  password and username projection.

Co-authored-by: Copilot <[email protected]>
The round-3 guards each fell short of what their own comments claimed.

- Classify a conditional's condition by shape instead of by marker. Gating
  the ASPIRERADIUS078 skip on `Condition is IManifestExpressionProvider`
  was nearly vacuous: IExpressionValue derives from that marker, so a
  parameter, a reference expression or a connection string all carried it,
  and a genuine failure inside one was still downgraded to a warning that
  dropped the environment variable. IsDeploymentSubstituted mirrors the
  type dispatch in ResolveEnvPartsAsync, where the marker test is
  meaningful because it sits in the default arm.

  A conditional expression's ValueProviders is the union of its two
  branches and excludes its own Condition, so a nested conditional needs a
  dedicated case; a visited set keeps the walk terminating on a cyclic
  connection string and answers false there, so an incomplete traversal is
  never the reason a variable is dropped. ContainerImageReference is
  excluded from the default arm because it carries the marker but resolves
  eagerly, so its failure names a real configuration error.

- Compare the credential entry's encoding alongside its value
  (ASPIRERADIUS089). The encoding decides how the recipe interprets the
  value, so flipping `string` to `base64` provisions a server with a
  credential no consumer holds while leaving the value byte-identical.

- Validate an inline secret store's final StoreName (ASPIRERADIUS088). The
  collision pass already treats it as the Kubernetes object name, and
  ASPIRERADIUS049 only guards the pre-callback model name. Existing and
  sealed stores are excluded because they name their object through
  `resource`, matching the gate the collision pass uses.

Co-authored-by: Copilot <[email protected]>
- Catch a parameter-supplied `guest` RabbitMQ user name in the
  ASPIRERADIUS082 guard. The guard only compared the rendered Bicep, which
  is a literal only for a literal user name — so supplying a parameter, the
  very remediation the diagnostic recommends, routed users around it.
  The parameter's value is now resolved at publish time.
- Turn the silent Radius v0.59 incompatibility into a loud failure. A new
  `verify-radius-control-plane-{env}` pipeline step reads `rad version
  --output json` and fails with ASPIRERADIUS091 when the control plane is
  older than v0.60, before credential registration or sealed-secret apply
  mutate anything. An unreadable version is allowed through so the gate
  cannot become a new way for valid deploys to fail.
- Mark DeployRadiusRedisRabbitMqAndMongoBackingResourcesToKind as
  [OuterloopTest]: three KinD + Radius control-plane installs per PR run
  exceeded the per-PR CI budget.
- Replace the discouraged Assert.DoesNotContain checks in the CLI E2E test
  with a single assertion over the complete emitted resource type set.
- Correct the comment on
  UnauthenticatedBackingResource_DoesNotLeakAspireGeneratedPasswordParameter:
  Redis's recipe publishes no credential output, so the projected values are
  empty rather than reading listSecrets().
- Fix the "Securitity" test name typo.

Co-authored-by: Copilot <[email protected]>
Control plane version gate now inspects the right cluster (blocking).
`rad version` accepts no context flag and leaves the CLI's KubeContext
unset, so the gate was reading whatever context the ambient kubeconfig
happened to point at rather than the cluster `rad deploy` targets — it
could approve an unsupported 0.59 cluster or reject a supported one.
Extracted the workspace kube-context resolver out of SealedSecretApplyStep
into a shared RadiusWorkspaceKubeContext (including the
ASPIRE_RADIUS_KUBE_CONTEXT override) and had the gate flatten that single
context into a throwaway kubeconfig with `kubectl config view --minify`,
pointing the child `rad version` at it via KUBECONFIG. An unresolvable
context now skips the gate rather than falling back to ambient state: a
verdict about the wrong cluster is worse than no verdict.

Fix ASPIRERADIUS056 on a valid model. One parameter used by both
WithEnvironment and a type-scoped recipe parameter allocated two Bicep
params for one Aspire parameter, because only GetOrAddEnvParameter reused
the other allocator's declaration. Made the reuse bidirectional, and
unified both allocators on BicepPostProcessor.SanitizeIdentifier — the
SDK's NormalizeBicepIdentifier does not reserve `radius`, so a parameter
by that name emitted a bare `param radius` colliding with the
`extension radius` alias.

Fix ASPIRERADIUS090 false positive. Two stores populated from one sealed
manifest — the documented way to split a multi-key manifest — were
reported as colliding writers. Byte-identical manifests are now coalesced
and the diagnostic is reserved for distinct manifests targeting one
object, which really do clobber each other.

Reject a security secret with no name. An unset SecretName rendered as
null, which the DNS-1123 check skipped, so publish emitted a
Radius.Security/secrets block with no `name` that failed only at deploy.

Add ASPIRERADIUS092 for kind/data-shape mismatches. Kind is public and
freely mutable, so a callback could select basicAuthentication,
certificate, azureWorkloadIdentity or awsIRSA without the keys those kinds
require; the pinned recipe turns that into an invalid metadata.name at
deploy. Literal recognized kinds are now validated; expression-valued and
unrecognized kinds are left alone for forward compatibility.

Also hardened the gate's process helper: cancellation kills the process
tree, tolerates a refused kill, and reaps/observes the child under a
bounded timeout so a child that will not die cannot hang a cancelled
deploy.

Co-authored-by: Copilot <[email protected]>
…one, and validate the fields both types require

Five findings from the second review pass.

Radius.Security/secrets does not share the legacy Applications.Core/secretStores
vocabulary. Its v0.60 kind enum is generic, certificate-pem, certificate-pkcs12,
basicAuthentication, awsIRSA and azureWorkloadIdentity; the bare 'certificate'
spelling belongs to the legacy type only. Validating the new type against the
legacy table therefore missed certificate-pem's tls.crt/tls.key contract entirely
while treating the invalid 'certificate' as recognized. RadiusSecuritySecretKinds
is a separate table for the new type, TryParseRadiusTypeString stays the legacy
parser, and ValidateSecretStoreTypeRequiredKeys gives it a post-callback caller so
both surfaces are covered symmetrically.

Both gates fail open on an unrecognized literal: a newer control plane may extend
either enum, and there is no way for an AppHost author to opt out of a publish-time
gate. The two legacy spellings are the exception -- 'certificate' as a kind and
'raw' as an encoding are not future values, they are the vocabulary this type
replaced, so they are named and rejected with a message that points at the
migration.

ASPIRERADIUS087 now also checks a complete-but-invalid secretKeyRef. Both halves
are copied verbatim into the pod spec, so a literal SecretName that is not a
DNS-1123 subdomain, or a SecretKey that is not a valid Secret data key, previously
passed publish and rad deploy and was rejected only when the API server created the
pod. Expression-valued halves are still allowed: RewireContainerEnvSecrets assigns
one on purpose.

New ASPIRERADIUS093 covers the fields the type requires and the callback can drop.
properties.environment and every data entry's value are required, and an unset
BicepValue is simply omitted from the emitted Bicep rather than failing to compile,
so the artifact published cleanly and failed only at Radius schema validation. A
null or unset dictionary entry is rejected the same way; an entry whose whole
wrapper is an expression still resolves at deploy time and is skipped.

RadiusBackingResourceProjectionException deliberately does not take an
[Experimental] attribute. ASPIRERADIUS004 gates the ConfigureRadiusInfrastructure
escape hatch, but this exception is thrown from ordinary publish through the
ungated AddRadiusEnvironment, so gating it would force a suppression purely in
order to catch an exception an ungated API throws. The PR description claimed
otherwise and has been corrected, along with a claim about a deployment test that
was merged into the broader outerloop one.

Co-authored-by: Copilot <[email protected]>
RewireSecretResourceCredentials repaired a Radius.Security/secrets
resource's EnvironmentId/ApplicationId inside the per-credential loop,
after the guards that skip a credential whose consumer a callback removed
or whose consumer property it reassigned. The secret outlives its
consumer, though: it stays in options.SecuritySecrets and is still
emitted. So a callback that renamed the environment and removed the
consumer left the orphaned secret scoped to the symbol the rename
retired, which reached the artifact as a dangling reference that only
bicep compilation rejects, with nothing naming the callback responsible.

Hoist the scope repair into an unconditional per-secret loop, mirroring
RewireContainerEnvSecrets, which already had this shape. The repair is
keyed per secret rather than per credential for the same reason called
out there: the last-write-wins comparison only holds against the value
the publisher wrote, so repairing once per credential would mis-detect
on a second credential sharing a secret.

Also split ASPIRERADIUS071, which covered two unrelated causes, so the
diagnostic identifies which invariant broke. It now means only "an
emitted Radius type has no connection schema row"; the two sites
asserting that a credential-carrying secret has an environment to be
scoped to move to ASPIRERADIUS094. Both README rows now state plainly
that these are internal invariants an AppHost cannot trigger, rather
than leaving readers hunting for an AppHost-side fix.

Co-authored-by: Copilot <[email protected]>
Aspire.Hosting.Radius uses KnownRelationshipTypes and
EnvironmentVariableNameEncoder but never included their source files,
reaching them through InternalsVisibleTo on Aspire.Hosting instead.
That is not a contract the shared sources offer, and main has since
stopped granting it, so merging main into this branch fails the build
with four errors: CS0122 on each of the three use sites, plus IDE0005
on the now-apparently-unused `using Aspire.Dashboard.Model`, which is
the namespace KnownRelationshipTypes lives in.

Include both files the way every other consumer does — Aspire.Hosting,
Aspire.Hosting.Azure, Aspire.Hosting.DevTunnels and Aspire.Dashboard
all take them as $(SharedDir) Compile items. That resolves all four
errors, since the using becomes necessary again once the type resolves
from source rather than from a referenced assembly.

Co-authored-by: Copilot <[email protected]>
Radius reads internal members of Aspire.Hosting that have no public
equivalent -- ProjectLaunchDefaultsAnnotation.DefaultHttpsEndpoint is the
clearest example. Main removed the Aspire.Hosting.Radius friend declaration
in #19620 as unnecessary, which was true of Radius as it stood on main, but
the backing-resource work in this PR reintroduced the dependency.

Because the branch never modified that hunk, the three-way merge took main's
deletion, so the merged tree failed to build even though the branch built on
its own. Merging main and restoring the entry here records the decision in
branch history instead of leaving it to be silently dropped again.

This also replaces the earlier attempt to pull KnownRelationshipTypes and
EnvironmentVariableNameEncoder in as $(SharedDir) Compile items. That fixed
the merged build but broke the branch-only build with CS0436, because those
types were then defined in two places; it also could not have addressed
DefaultHttpsEndpoint, which is not shared source.

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Addresses review feedback: setting KUBECONFIG did not actually point
`rad version` at the workspace's cluster. Parts of the Radius CLI load
`clientcmd.RecommendedHomeFile` (~/.kube/config) directly through
pkg/kubeutil and ignore KUBECONFIG, so a supported ambient cluster could
let an unsupported workspace target pass the gate (or the reverse),
reintroducing the silent broken deployment ASPIRERADIUS091 exists to
prevent.

The minified kubeconfig is now written to <temp>/.kube/config and the
child `rad version` runs against that directory as its home: HOME and
USERPROFILE are redirected and HOMEDRIVE/HOMEPATH are removed, covering
every variable client-go's homedir.HomeDir() consults on Unix and
Windows. KUBECONFIG still points at the same file for the loaders that
do honor it, so every loader inside `rad` reaches the workspace cluster.

RunAsync now treats a null environment value as "remove this variable"
so HOMEDRIVE/HOMEPATH can be cleared rather than blanked.

Co-authored-by: Copilot <[email protected]>
Addresses two review findings.

Database selection for a recipe-backed resource has to run before any
container environment is resolved, so it can only see WithReference
annotations. A mixed model defeated that: `WithReference(first)` plus a
`WithEnvironment` callback resolving `second.ConnectionStringExpression`
selected `first`, while the consumer received a connection string naming
`second` — a database the recipe never creates, failing at run time with
nothing in the generated Bicep to explain it. The consumption set that
would have caught it was only read by the SQL Server ASPIRERADIUS080
warning pass.

The selection is now recorded and validated in a deferred pass that runs
once every container environment has been resolved, alongside the
existing warning pass, and rejects any consumed database child other
than the selected one with ASPIRERADIUS072.

The database-child expression map is now derived from the emitted-type
table rather than from the sets filled during the credential pass. Those
sets are populated while that same pass triggers the map's first lookup,
so a resource wired before its own selection was recorded would have
been missing from the map and its consumers left unobserved.

Also drops the branch/PR history from the Aspire.Hosting.Radius
InternalsVisibleTo comment, keeping it focused on why the grant exists.

Co-authored-by: Copilot <[email protected]>
A ConfigureRadiusInfrastructure callback can drop a broker from
options.ResourceTypeInstances after its user-name parameter was recorded. The
parameter can still reach the deploy step through another consumer, so the
stale mapping failed 'aspire deploy' with ASPIRERADIUS082 naming a broker the
deployment does not contain. Only brokers whose construct survived the
callbacks are validated now.

Co-authored-by: Copilot <[email protected]>
The pinned 0.60 Radius extension models Radius.Security/secrets 'kind' and
'encoding', and Applications.Core/secretStores 'type', as closed unions of
string literals in types.json. An unrecognized literal therefore fails
'bicep build' during rad deploy, and a newer control plane cannot make it valid
because the compile step reads the pinned definitions. Publishing one only
produced an artifact that cannot deploy, so reject it where the message can name
the resource. Expression-valued fields keep their escape path.

Separately, database selection counted child resources rather than distinct
deployed database names, so aliases for one physical database -
AddDatabase("orders-a", "orders") alongside AddDatabase("orders-b", "orders") -
were rejected with ASPIRERADIUS072 even though the single recipe-provisioned
database satisfies both consumers.

Co-authored-by: Copilot <[email protected]>
kubectl config view --minify emits file paths for client certificates, keys and
token files rather than inlining them. kubeconfig resolves relative paths
against the file's own location, so relocating the export under the temporary
home broke them: rad version failed and the control plane gate skipped, letting
an unsupported version through. --flatten makes the export self-contained.

A user-name parameter shared by several brokers also overwrote earlier owners in
a one-to-one map, so removing whichever broker was recorded last dropped the
deploy-time guest check for the brokers that survived. Every owner is kept now
and the check applies while any of them remains live.

Co-authored-by: Copilot <[email protected]>
…hild

Addresses two review findings on RadiusInfrastructureBuilder.

RewireContainerEnvSecrets only treated a changed `SecretName` as a callback
re-point, then validated the key the *publisher* generated rather than the one
the variable currently carries. A callback that changed only `SecretKey` slipped
past both: the original key was still present, so the publish succeeded while
the emitted `secretKeyRef` named a key that does not exist. Radius accepts that
artifact and it surfaces only as a pod that never starts. The current key is now
resolved and validated against the generated secret, with a message that
distinguishes a re-point from a removed key. A key that renders as a Bicep
expression resolves at deploy time and a cleared key is already covered by
ASPIRERADIUS087, so both are left alone.

The recipe database selection fell back to `databaseChildren[0]` unless exactly
one child was referenced. Multiple referenced children are legal when they alias
one physical database, and ASPIRERADIUS072 has already rejected the case where
they do not, so any referenced child is a correct choice. Selecting the first
declared child instead pointed the recipe at an unreferenced database and made
the deferred check reject a supported alias model.

Regression tests cover a re-point to a missing key, a re-point to a key the
callback added, and aliased children declared after an unreferenced child.

Co-authored-by: Copilot <[email protected]>
Review feedback asked for the `StartsWith("..")` check to be removed from
KubernetesName.IsValidSecretDataKey on the grounds that apimachinery's
IsConfigMapKey rejects only the exact keys "." and "..". It rejects the prefix
too: IsConfigMapKey delegates to hasChDirPrefix, whose third case is
`strings.HasPrefix(value, "..")` -> "must not start with '..'". Removing the
check would let Aspire publish a key the API server rejects, moving the failure
from publish time to deploy time, which is what this validation exists to
prevent.

Keeping the behavior and pinning it instead: a regression test asserts that
`..token` is rejected with ASPIRERADIUS083, and the comment on
IsValidSecretDataKey now says why the prefix rule exists on top of the character
class (the kubelet atomic-writer's `..data` symlink) and names hasChDirPrefix,
since the character class alone reads as though `..token` were acceptable.

Co-authored-by: Copilot <[email protected]>
…solated home

The gate redirects HOME so the parts of `rad` that read ~/.kube/config directly
resolve the workspace's minified kubeconfig instead of the ambient cluster.
`--flatten` inlines file-backed certificates, keys and token files, but it
carries kubeconfig `exec` entries through untouched, and those shell out at load
time. Every managed cluster authenticates that way — kubelogin for AKS, `aws eks
get-token` for EKS, gke-gcloud-auth-plugin for GKE — and each helper resolves its
credentials under the home directory. Under a bare redirect they found an empty
home, failed to authenticate and took `rad version` down with them; because the
gate fails open on a version it cannot read, it then skipped silently for exactly
the population it is most needed for, letting an unsupported 0.59 control plane
through.

Each helper's state is now pinned back to the real home through the variable it
already documents for relocating it (AZURE_CONFIG_DIR, AWS_CONFIG_FILE,
AWS_SHARED_CREDENTIALS_FILE, CLOUDSDK_CONFIG). The kubeconfig stays isolated, so
the gate still inspects the workspace's cluster. A variable the user has already
set is left alone, since the child inherits the ambient environment and an
explicit value may deliberately point elsewhere, and nothing is pinned when no
home can be resolved.

Also documents that RadiusInfrastructureOptions.SecuritySecrets carries two kinds
of entry: credentials a backing resource consumes by resource ID, and the
per-container secrets backing credential-bearing environment variables. Nothing
distinguishes them structurally, so a callback treating every entry as
backing-resource state can remove the secret a container reads from.

Co-authored-by: Copilot <[email protected]>
The gate's supporting tests pinned version parsing, the diagnostic text, the
isolated environment and step ordering, but nothing invoked the path that
decides. The deployment tests install a supported v0.60 control plane, so a
regression that mishandled a successful command result — reading the version as
unknown and falling through the fail-open branch — would have kept every test
green while doing exactly what the gate exists to prevent: letting a v0.59
cluster accept a deploy that silently discards the recipe pack.

VerifyControlPlaneVersionAsync now takes the resolved Kubernetes context and a
command runner, with the existing two-argument entry point composing the real
resolver and process runner. Only the parts that need a live cluster are
supplied by the caller; the decision itself runs unchanged, including exporting
the kubeconfig to a temporary home and reading the version back.

The new tests cover a 0.59 control plane failing with ASPIRERADIUS091 and 0.60
proceeding, that `rad` is run against the exported workspace kubeconfig rather
than the ambient cluster, and that every way the environment can be
uncooperative rather than unsupported still fails open. Verified against a
deliberately regressed gate: the unsupported-control-plane test is the one that
fails.

Co-authored-by: Copilot <[email protected]>
Each of these explained the change rather than the code, so all three would have
read as stale or unresolvable once merged.

The legacy recipe map cited "a future PR" for why the inner map is keyed by
recipe name. The durable reason is that Radius keys recipes by name within a
type, so the map matches the schema whether or not more names are ever emitted.

The legacy application comment attributed the shared `name:` to review feedback,
which records how the shape was arrived at rather than why it is required: the
legacy application is the same Radius application as the UDT one, and only the
Bicep identifier is suffixed so the two declarations do not collide.

The recipe-location test referenced the `L5`/`L1` design identifiers. It now
describes the behavior under test, and says why the assertion looks for
`source:` rather than the `RecipeLocation` member it sets.

Co-authored-by: Copilot <[email protected]>
The workspace resolver read <process HOME>/.rad/config.yaml directly. `rad` has
no configuration environment variable — the config is selected by the global
`--config` flag — so that file describes the workspace only when `rad` runs with
its default config. Anything that passes `--config`, including a shim wrapping
`rad`, leaves the resolver inspecting an unrelated config or finding none.

The Radius deployment E2E test is exactly that case: it shadows `rad` with a
workspace-local shim that injects `--config <workspace>/.rad/config.yaml` and
sets HOME inside the shim only, while the Aspire process keeps the real HOME.
The version gate therefore resolved no context and skipped, so the test that is
supposed to demonstrate the gate would have passed against a control plane the
gate exists to reject — the gate fails open by design, and here it failed open
silently in its own coverage.

Resolution now asks `rad workspace show --output json` first, reading
connection.context. That runs the same executable the deploy will spawn, found
through the same PATH and therefore the same shim and config, so the answer
describes the cluster actually being targeted. The config file is still read
when `rad` is absent or cannot answer, preserving the previous behavior for the
default-config case, and an explicit ASPIRE_RADIUS_KUBE_CONTEXT still wins.

The sealed-secret step resolves through the same path. Both steps deliberately
share this resolver so they cannot disagree about which cluster is being
inspected, and fixing only the gate would have broken that. It matters more
there than for the gate: a misresolved context makes it apply a SealedSecret to
the wrong cluster, which writes, where the gate only reads a version.

ProcessRunResult and the command-runner delegate move to namespace scope as
RadiusCommandRunner, since they are now shared rather than gate-specific.

Verified the coverage catches the regression: with the rad answer discarded so
resolution falls back to the file, TryResolve_PrefersTheContextRadItselfReports
fails. Full suite is 655 passing.

Co-authored-by: Copilot <[email protected]>
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Tests selector

50 / 99 PR test projects · 4 PR jobs · 3 advisory-only targets, from 59 changed files.

Selected PR test projects (50 / 99)

Aspire.Cli.EndToEnd.Tests, Aspire.Hosting.Analyzers.Tests, Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Kusto.Tests, Aspire.Hosting.Azure.Tests, Aspire.Hosting.Blazor.Tests, Aspire.Hosting.Browsers.Tests, Aspire.Hosting.CodeGeneration.Go.Tests, Aspire.Hosting.CodeGeneration.Java.Tests, Aspire.Hosting.CodeGeneration.Python.Tests, Aspire.Hosting.CodeGeneration.Rust.Tests, Aspire.Hosting.CodeGeneration.TypeScript.Tests, Aspire.Hosting.Containers.Tests, Aspire.Hosting.DevTunnels.Tests, Aspire.Hosting.Docker.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Hosting.DotnetTool.Tests, Aspire.Hosting.EntityFrameworkCore.Tests, Aspire.Hosting.Foundry.Tests, Aspire.Hosting.Garnet.Tests, Aspire.Hosting.GitHub.Models.Tests, Aspire.Hosting.Go.Tests, Aspire.Hosting.Java.Tests, Aspire.Hosting.JavaScript.Tests, Aspire.Hosting.Kafka.Tests, Aspire.Hosting.Keycloak.Tests, Aspire.Hosting.Kubernetes.Tests, Aspire.Hosting.Maui.Tests, Aspire.Hosting.Milvus.Tests, Aspire.Hosting.MongoDB.Tests, Aspire.Hosting.MySql.Tests, Aspire.Hosting.Nats.Tests, Aspire.Hosting.OpenAI.Tests, Aspire.Hosting.Oracle.Tests, Aspire.Hosting.Orleans.Tests, Aspire.Hosting.PostgreSQL.Tests, Aspire.Hosting.Python.Tests, Aspire.Hosting.Qdrant.Tests, Aspire.Hosting.RabbitMQ.Tests, Aspire.Hosting.Radius.Tests, Aspire.Hosting.Redis.Tests, Aspire.Hosting.RemoteHost.Tests, Aspire.Hosting.Rust.Tests, Aspire.Hosting.Seq.Tests, Aspire.Hosting.SqlServer.Tests, Aspire.Hosting.Testing.Tests, Aspire.Hosting.Tests, Aspire.Hosting.Valkey.Tests, Aspire.Hosting.Yarp.Tests, Aspire.Playground.Tests

Selected PR jobs (4)

cli-starter-validation, extension-e2e, polyglot, typescript-api-compat

Advisory workflow impact (3)

  • Aspire.Deployment.EndToEnd.Tests (deployment workflow-only)
  • Aspire.EndToEnd.Tests (outerloop-only)
  • deployment-e2e (schedule/dispatch-only)

How these were chosen — grouped by what changed

⚠️ 48 of the 52 selected test projects come from a single change — src/Aspire.Hosting/Aspire.Hosting.csproj.

🔧 src/Aspire.Hosting/Aspire.Hosting.csproj (changed source)
→ 48 via the project graph

show 48

Aspire.Hosting.Analyzers.Tests (2 hops), Aspire.Hosting.Azure.Kubernetes.Tests (2 hops), Aspire.Hosting.Azure.Kusto.Tests (2 hops), Aspire.Hosting.Azure.Tests, Aspire.Hosting.Blazor.Tests (2 hops), Aspire.Hosting.Browsers.Tests (2 hops), Aspire.Hosting.CodeGeneration.Go.Tests, Aspire.Hosting.CodeGeneration.Java.Tests, Aspire.Hosting.CodeGeneration.Python.Tests, Aspire.Hosting.CodeGeneration.Rust.Tests, Aspire.Hosting.CodeGeneration.TypeScript.Tests, Aspire.Hosting.Containers.Tests (2 hops), Aspire.Hosting.DevTunnels.Tests (2 hops), Aspire.Hosting.Docker.Tests (2 hops), Aspire.Hosting.Dotnet.Tests (2 hops), Aspire.Hosting.DotnetTool.Tests (2 hops), Aspire.Hosting.EntityFrameworkCore.Tests (2 hops), Aspire.Hosting.Foundry.Tests (2 hops), Aspire.Hosting.Garnet.Tests (2 hops), Aspire.Hosting.GitHub.Models.Tests (2 hops), Aspire.Hosting.Go.Tests (2 hops), Aspire.Hosting.Java.Tests (2 hops), Aspire.Hosting.JavaScript.Tests (2 hops), Aspire.Hosting.Kafka.Tests (2 hops), Aspire.Hosting.Keycloak.Tests (2 hops), Aspire.Hosting.Kubernetes.Tests (2 hops), Aspire.Hosting.Maui.Tests, Aspire.Hosting.Milvus.Tests (2 hops), Aspire.Hosting.MongoDB.Tests (2 hops), Aspire.Hosting.MySql.Tests (2 hops), Aspire.Hosting.Nats.Tests (2 hops), Aspire.Hosting.OpenAI.Tests (2 hops), Aspire.Hosting.Oracle.Tests (2 hops), Aspire.Hosting.Orleans.Tests (2 hops), Aspire.Hosting.PostgreSQL.Tests (2 hops), Aspire.Hosting.Python.Tests (2 hops), Aspire.Hosting.Qdrant.Tests (2 hops), Aspire.Hosting.RabbitMQ.Tests (2 hops), Aspire.Hosting.Redis.Tests (2 hops), Aspire.Hosting.RemoteHost.Tests, Aspire.Hosting.Rust.Tests (2 hops), Aspire.Hosting.Seq.Tests (2 hops), Aspire.Hosting.SqlServer.Tests (2 hops), Aspire.Hosting.Testing.Tests (2 hops), Aspire.Hosting.Tests (2 hops), Aspire.Hosting.Valkey.Tests (2 hops), Aspire.Hosting.Yarp.Tests (2 hops), Aspire.Playground.Tests

📦 affected project Aspire.Hosting
→ 1 test: Aspire.EndToEnd.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/BicepPostProcessor.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/Constructs/ContainerEnvVarConstruct.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/Constructs/LegacyApplicationEnvironmentConstruct.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/Constructs/LegacyRecipeEntryConstruct.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/Constructs/RadiusContainerConstruct.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/Constructs/RadiusResourceTypeConstruct.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/Constructs/RadiusSecuritySecretConstruct.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/Constructs/RecipeEntryConstruct.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/RadiusBackingConnections.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/RadiusCommandRunner.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/RadiusDeploymentPipelineStep.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/RadiusInfrastructureBuilder.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/RadiusInfrastructureOptions.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/RadiusPublishAnnotations.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/RadiusUnresolvableValueException.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/RadiusWorkspaceKubeContext.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Publishing/SealedSecretApplyStep.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/RadiusBackingResourceProjectionException.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/RadiusBicepExtension.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/RadiusEnvironmentResource.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/ResourceMapping/RadiusResourceTypes.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/ResourceMapping/ResourceTypeMapper.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Secrets/KubernetesName.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Secrets/RadiusSecretStoreType.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting.Radius/Secrets/RadiusSecuritySecretKinds.cs (changed source)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/Helpers/KubernetesDeployTestHelpers.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/Helpers/KubernetesE2EVersions.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/RadiusDeployTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/RadiusPublishTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Deployment.EndToEnd.Tests/RadiusAzureResourcesDeploymentTests.cs (changed test)
→ 1 directly: Aspire.Deployment.EndToEnd.Tests

🧪 tests/Aspire.Deployment.EndToEnd.Tests/RadiusStarterDeploymentTests.cs (changed test)
→ 1 directly: Aspire.Deployment.EndToEnd.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Deployment/ControlPlaneVersionGateTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/DeploymentE2E/DeployEndToEndTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Publishing/BackingResourceContractTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Publishing/BackingResourceProjectionTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Publishing/BackingResourceValueResolutionTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Publishing/BicepGenerationMultiResourceTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Publishing/BicepSyntaxValidationTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Publishing/ConfigureRadiusInfrastructureTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Publishing/ContainerSecretEnvironmentTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Publishing/LegacyFallbackEmissionTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Publishing/PostCallbackSecretValidationTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Publishing/RadiusDeployParametersTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/RadiusEnvironmentResourceTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Recipes/RecipePackParametersBicepTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/RecordingLogger.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/ResourceMapping/ResourceTypeMapperTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Secrets/SealedSecretApplyStepTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Snapshots/BackingResourceProjectionTests.AllBackingResourceTypes_ProjectRecipeOutputs.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Snapshots/BackingResourceProjectionTests.CallbackRenamingBackingResource_RewiresProjectedEnvironmentValues.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Snapshots/BackingResourceProjectionTests.DirectEndpointPropertyReference_ProjectsRecipeOutputs.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Snapshots/BackingResourceProjectionTests.UnauthenticatedBackingResource_DoesNotLeakAspireGeneratedPasswordParameter.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Snapshots/BackingResourceValueResolutionTests.UserNameParameter_IsProjectedFromRecipeOutputs.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Snapshots/LegacyFallbackEmissionTests.LegacyAndUdt_ShareResourceNameAndUseDistinctParents.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Snapshots/LegacyFallbackEmissionTests.LegacyOnly_EmitsLegacyParentsAndNoUdtResources.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Snapshots/LegacyFallbackEmissionTests.MixedLegacyAndUdt_EmitsBothParentPairs.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Snapshots/LegacyFallbackEmissionTests.RedisOnly_EmitsLegacyParentsAndNoUdtResources.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

🧪 tests/Aspire.Hosting.Radius.Tests/Snapshots/LegacyFallbackEmissionTests.UdtOnly_DoesNotEmitLegacyParents.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Radius.Tests

Job reasons

Job Triggered by
cli-starter-validation affected project Aspire.Hosting.PostgreSQL
deployment-e2e • tests/Aspire.Deployment.EndToEnd.Tests/RadiusAzureResourcesDeploymentTests.cs, tests/Aspire.Deployment.EndToEnd.Tests/RadiusStarterDeploymentTests.cs
• affected project Aspire.Hosting.Azure
extension-e2e • src/Aspire.Hosting.Radius/Publishing/BicepPostProcessor.cs, src/Aspire.Hosting.Radius/Publishing/Constructs/ContainerEnvVarConstruct.cs, src/Aspire.Hosting.Radius/Publishing/Constructs/LegacyApplicationEnvironmentConstruct.cs, src/Aspire.Hosting.Radius/Publishing/Constructs/LegacyRecipeEntryConstruct.cs, src/Aspire.Hosting.Radius/Publishing/Constructs/RadiusContainerConstruct.cs, src/Aspire.Hosting.Radius/Publishing/Constructs/RadiusResourceTypeConstruct.cs, src/Aspire.Hosting.Radius/Publishing/Constructs/RadiusSecuritySecretConstruct.cs, src/Aspire.Hosting.Radius/Publishing/Constructs/RecipeEntryConstruct.cs, src/Aspire.Hosting.Radius/Publishing/RadiusBackingConnections.cs, src/Aspire.Hosting.Radius/Publishing/RadiusCommandRunner.cs, src/Aspire.Hosting.Radius/Publishing/RadiusDeploymentPipelineStep.cs, src/Aspire.Hosting.Radius/Publishing/RadiusInfrastructureBuilder.cs, src/Aspire.Hosting.Radius/Publishing/RadiusInfrastructureOptions.cs, src/Aspire.Hosting.Radius/Publishing/RadiusPublishAnnotations.cs, src/Aspire.Hosting.Radius/Publishing/RadiusUnresolvableValueException.cs, src/Aspire.Hosting.Radius/Publishing/RadiusWorkspaceKubeContext.cs, src/Aspire.Hosting.Radius/Publishing/SealedSecretApplyStep.cs, src/Aspire.Hosting.Radius/RadiusBackingResourceProjectionException.cs, src/Aspire.Hosting.Radius/RadiusBicepExtension.cs, src/Aspire.Hosting.Radius/RadiusEnvironmentResource.cs, src/Aspire.Hosting.Radius/ResourceMapping/RadiusResourceTypes.cs, src/Aspire.Hosting.Radius/ResourceMapping/ResourceTypeMapper.cs, src/Aspire.Hosting.Radius/Secrets/KubernetesName.cs, src/Aspire.Hosting.Radius/Secrets/RadiusSecretStoreType.cs, src/Aspire.Hosting.Radius/Secrets/RadiusSecuritySecretKinds.cs, src/Aspire.Hosting/Aspire.Hosting.csproj, tests/Aspire.Cli.EndToEnd.Tests/Helpers/KubernetesDeployTestHelpers.cs, tests/Aspire.Cli.EndToEnd.Tests/Helpers/KubernetesE2EVersions.cs, tests/Aspire.Cli.EndToEnd.Tests/RadiusDeployTests.cs, tests/Aspire.Cli.EndToEnd.Tests/RadiusPublishTests.cs
• affected project Aspire.Hosting.Radius
polyglot affected project Aspire.Hosting.Java
typescript-api-compat affected project Aspire.Hosting.Radius

Selection computed for commit 3fd328b.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ CI Failure Analysis: Possible Flaky Test(s)

The CI build failed due to test failure(s) that appear unrelated to the PR changes. These may be flaky tests.

Suspected flaky test(s):

  • Aspire dynamic debug configuration E2E "after each" hook for "does not launch an AppHost when the ambiguous AppHost picker is dismissed" in job Tests / Run VS Code extension E2E tests / VS Code extension E2E (Windows, dynamic-debug-configuration)
    • Error: Dynamic debug configuration E2E teardown failed.
  1. Error: EBUSY: resource busy or locked, rmdir 'C:\Users\runneradmin\AppData\Local\Temp\aev-3HHrS5\workspace.e2e-dynamic-debug\ambiguous'
  • Stack Trace (first frames):
AggregateError: Dynamic debug configuration E2E teardown failed.
1. Error: EBUSY: resource busy or locked, rmdir 'C:\Users\runneradmin\AppData\Local\Temp\aev-3HHrS5\workspace\.e2e-dynamic-debug\ambiguous'
    at runE2eTeardown (out\test-e2e\test-e2e\helpers\fixtures.js:217:15)
    at async Context.<anonymous> (out\test-e2e\test-e2e\dynamicDebugConfiguration.e2e.test.js:62:9)
  • Why likely flaky: The failure occurs in test teardown (rmdir of a temp workspace directory) due to a Windows file-locking race condition, not in the actual test assertions. The PR does not touch any VS Code extension or E2E test fixture code, and this exact EBUSY/rmdir/fixtures.js:217:15 pattern has recurred many times across unrelated PRs, confirming it is a known flaky infrastructure/timing issue in the E2E harness's teardown on Windows runners.

Suggested actions:

  • Re-run the failed CI jobs to confirm if the failure is intermittent
  • If the test continues to fail, consider quarantining it using /quarantine-test <test name> <issue URL>
  • Search existing issues to see if this test is already known to be flaky

You can re-run the failed jobs from the workflow run page.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-integrations Issues pertaining to Aspire Integrations packages breaking-change Issue or PR that represents a breaking API or functional change over a prerelease.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Radius: backing resources (Redis/Postgres/Mongo/etc.) emit {name}-{name} service discovery that doesn't match the recipe's Service

4 participants