Skip to content

[release/13.4] Reference Foundry project from hosted agent target#17704

Merged
davidfowl merged 4 commits into
release/13.4from
backport/pr-17687-to-release/13.4
May 30, 2026
Merged

[release/13.4] Reference Foundry project from hosted agent target#17704
davidfowl merged 4 commits into
release/13.4from
backport/pr-17687-to-release/13.4

Conversation

@aspire-repo-bot
Copy link
Copy Markdown
Contributor

@aspire-repo-bot aspire-repo-bot Bot commented May 29, 2026

Backport of #17687 to release/13.4

/cc @davidfowl @tommasodotNET

Customer Impact

Customers deploying Foundry hosted agents in publish mode could miss the Foundry project connection environment annotations on the actual deployment target, causing the generated/existing container target to be deployed without the Foundry project connection configuration it needs.

Testing

Source PR validation ran ./restore.sh and dotnet test --project tests/Aspire.Hosting.Foundry.Tests/Aspire.Hosting.Foundry.Tests.csproj --no-launch-profile -- --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true". Additional targeted validation was run for Aspire.Hosting.Azure.Tests.FoundryExtensionsTests and AsHostedAgent_InPublishMode_AddsProjectReferenceToDeploymentTarget.

Risk

Low. The change is localized to Foundry hosted-agent publish-mode reference placement and related tests; run-mode behavior and public API are unchanged.

Regression?

Unknown - no linked issue or explicit regression statement in the source PR.

@aspire-repo-bot aspire-repo-bot Bot requested a review from sebastienros as a code owner May 29, 2026 23:24
Copilot AI review requested due to automatic review settings May 29, 2026 23:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

🚀 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 -- 17704

Or

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

@aspire-repo-bot aspire-repo-bot Bot force-pushed the backport/pr-17687-to-release/13.4 branch from 194f27b to 74ea592 Compare May 30, 2026 00:04
tommasodotNET and others added 4 commits May 30, 2026 00:13
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Seed Foundry project outputs in tests that directly invoke hosted-agent environment resolution, matching the provisioning state available during deployment.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot aspire-repo-bot Bot force-pushed the backport/pr-17687-to-release/13.4 branch from 74ea592 to b7ac7c1 Compare May 30, 2026 00:13
@davidfowl davidfowl enabled auto-merge (squash) May 30, 2026 01:42
@github-actions
Copy link
Copy Markdown
Contributor

CLI E2E Tests unknown — 110 passed, 0 failed, 2 unknown (commit b7ac7c1)

View all recordings
Status Test Recording Job Artifacts
AddPackageInteractiveWhileAppHostRunningDetached Recording #78613841417 Logs
AddPackageWhileAppHostRunningDetached Recording #78613841417 Logs
AgentCommands_AllHelpOutputs_AreCorrect Recording #78613841734 Logs
AgentInitCommand_DefaultSelection_InstallsDefaultSkills Recording #78613841734 Logs
AgentInitCommand_MigratesDeprecatedConfig Recording #78613841734 Logs
AgentInitCommand_NonInteractive_BundleOnlySkillsBeyondCliCatalog_AreInstallable Recording #78613841734 Logs
AgentMcpListStructuredLogsReturnsLogsFromStarterApp Recording #78613841561 Logs
AgentMcpListStructuredLogsReturnsLogsFromStarterApp_DevLocalhost Recording #78613841561 Logs
AgentMcpListStructuredLogsReturnsLogsFromStarterApp_Isolated Recording #78613841561 Logs
AllPublishMethodsBuildDockerImages Recording #78613841819 Logs
AspireAddAndStartWorkAgainstLegacyAppHostTs Recording #78613841318 Logs
AspireAddPackageVersionToDirectoryPackagesProps Recording #78613841541 Logs
AspireInitSingleFileAppHostRunsViaDotnetRunAppHost Recording #78613841573 Logs
AspireInitWithExistingAppHostDirRecreatesMissingNuGetConfigAndPreservesFiles Recording #78613841306 Logs
AspireInitWithSolutionFileGeneratesAppHostThatBuildsAgainstChannelHive Recording #78613841306 Logs
AspireStartUpdatesStaleTypeScriptAppHostPath Recording #78613841510 Logs
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps Recording #78613841541 Logs
AspireUpdateRemovesOrphanAppHostPackageVersionWhenSdkAlreadyCurrent Recording #78613841541 Logs
Banner_DisplayedOnFirstRun Recording #78613841355 Logs
Banner_DisplayedWithExplicitFlag Recording #78613841355 Logs
Banner_NotDisplayedWithNoLogoFlag Recording #78613841355 Logs
CertificatesClean_RemovesCertificates Recording #78613841303 Logs
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate Recording #78613841303 Logs
CertificatesTrust_WithUntrustedCert_TrustsCertificate Recording #78613841303 Logs
ConfigSetGet_CreatesNestedJsonFormat Recording #78613841523 Logs
CreateAndRunAspireStarterProject Recording #78613841557 Logs
CreateAndRunAspireStarterProjectWithBundle Recording #78613841701 Logs
CreateAndRunEmptyAppHostProject Recording #78613841590 Logs
CreateAndRunJavaEmptyAppHostProject Recording #78613841594 Logs
CreateAndRunJsReactProject Recording #78613841565 Logs
CreateAndRunPolyglotAppHostWithDevLocalhostUrls Recording #78613841557 Logs
CreateAndRunPythonReactProject Recording #78613841347 Logs
CreateAndRunTypeScriptEmptyAppHostProject Recording #78613841392 Logs
CreateAndRunTypeScriptStarterProject Recording #78613841606 Logs
CreateJavaAppHostWithViteApp Recording #78613841559 Logs
CreateTypeScriptAppHostWithViteApp_AllowsGuestAppPackageManagerToDiffer Recording #78613841560 Logs
CreateTypeScriptAppHostWithViteApp_UsesConfiguredToolchain Recording #78613841560 Logs
DashboardRunWithAgentMcpListTracesReturnsNoTraces Recording #78613841584 Logs
DashboardRunWithAgentMcpListTracesReturnsNoTraces_DevLocalhost Recording #78613841584 Logs
DashboardRunWithOtelTracesReturnsNoTraces Recording #78613841584 Logs
DashboardRunWithOtelTracesReturnsNoTraces_DevLocalhost Recording #78613841584 Logs
DeployK8sBasicApiService Recording #78613841569 Logs
DeployK8sWithExternalHelmChart Recording #78613841387 Logs
DeployK8sWithGarnet Recording #78613841653 Logs
DeployK8sWithMongoDB Recording #78613841411 Logs
DeployK8sWithMySql Recording #78613841356 Logs
DeployK8sWithPostgres Recording #78613841532 Logs
DeployK8sWithRabbitMQ Recording #78613841719 Logs
DeployK8sWithRedis Recording #78613841552 Logs
DeployK8sWithSqlServer Recording #78613841805 Logs
DeployK8sWithValkey Recording #78613841831 Logs
DeployTypeScriptAppToKubernetes Recording #78613841427 Logs
DescribeCommandResolvesReplicaNames Recording #78613841609 Logs
DescribeCommandShowsRunningResources Recording #78613841609 Logs
DetachFormatJsonProducesValidJson Recording #78613841273 Logs
DetachFormatJsonProducesValidJsonWhenRestartingExistingInstance Recording #78613841273 Logs
DoPublishAndDeployListStepsWork Recording #78613841436 Logs
DocsCommand_RendersInteractiveMarkdownFromLocalSource Recording #78613841581 Logs
DoctorCommand_DetectsDeprecatedAgentConfig Recording #78613841734 Logs
DoctorCommand_TypeScriptAppHostReportsMissingConfiguredToolchain Recording #78613841221 Logs
DoctorCommand_WithSslCertDir_ShowsTrusted Recording #78613841221 Logs
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted Recording #78613841221 Logs
GatewayWithoutExternalEndpoint_FailsPublishWithGuidance Recording #78613841545 Logs
GeneratedAspireDevScript_StartsWatchMode_WithConfiguredToolchain Recording #78613841560 Logs
GlobalMigration_HandlesCommentsAndTrailingCommas Recording #78613841523 Logs
GlobalMigration_HandlesMalformedLegacyJson Recording #78613841523 Logs
GlobalMigration_PreservesAllValueTypes Recording #78613841523 Logs
GlobalMigration_SkipsWhenNewConfigExists Recording #78613841523 Logs
GlobalSettings_MigratedFromLegacyFormat Recording #78613841523 Logs
IngressWithoutExternalEndpoint_FailsPublishWithGuidance Recording #78613841545 Logs
InitTypeScriptAppHost_AugmentsExistingViteRepoInWorkspaceSubdirectory Recording #78613841560 Logs
InteractiveCSharpInitCreatesExpectedFiles Recording #78613841743 Logs
InvalidAppHostPathWithComments_IsHealedOnRun Recording #78613841504 Logs
JavaScriptHostingApisRunFromTypeScriptAppHost Recording #78613841819 Logs
LatestCliCanStartStableChannelAppHost Recording #78613841557 Logs
LatestCliCanStartStableChannelTypeScriptAppHost Recording #78613841557 Logs
LegacySettingsMigration_AdjustsRelativeAppHostPath Recording #78613841510 Logs
LogsCommandShowsResourceLogs Recording #78613841548 Logs
OtelLogsReturnsStructuredLogsFromStarterApp Recording #78613841583 Logs
OtelLogsReturnsStructuredLogsFromStarterAppIsolated Recording #78613841583 Logs
PsCommandListsRunningAppHost Recording #78613841405 Logs
PsFormatJsonOutputsOnlyJsonToStdout Recording #78613841405 Logs
PublishJavaScriptPatternsGeneratesExpectedDockerComposeArtifacts Recording #78613841764 Logs
PublishWithConfigureEnvFileUpdatesEnvOutput Recording #78613841764 Logs
PublishWithDockerComposeServiceCallbackSucceeds Recording #78613841764 Logs
PublishWithoutOutputPathUsesAppHostDirectoryDefault Recording #78613841764 Logs
ResourceCommand_FailedExecution_DisplaysAppHostLogPathAndLogContainsEntries Recording #78613841272 Logs
ResourceCommand_SetAndDeleteParameterUpdatesDescribeOutput Recording #78613841272 Logs
RestoreGeneratesSdkFiles Recording #78613841309 Logs
RestoreGeneratesSdkFiles_WithConfiguredToolchain Recording #78613841580 Logs
RestoreRefreshesGeneratedSdkAfterAddingIntegration Recording #78613841580 Logs
RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes Recording #78613841721 Logs
RunFromParentDirectory_UsesExistingConfigNearAppHost Recording #78613841308 Logs
RunReportsSyntaxErrorsForDotNetAppHost Recording #78613841767 Logs
RunReportsSyntaxErrorsForTypeScriptAppHost Recording #78613841767 Logs
SecretCrudOnDotNetAppHost Recording #78613841376 Logs
SecretCrudOnTypeScriptAppHost Recording #78613841691 Logs
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels Recording #78613841371 Logs
StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets Recording #78613841607 Logs
StartReportsSyntaxErrorsForDotNetAppHost Recording #78613841767 Logs
StartReportsSyntaxErrorsForTypeScriptAppHost Recording #78613841767 Logs
StopAllAppHostsFromAppHostDirectory Recording #78613841627 Logs
StopJavaPolyglotAppHostUsingApphostDirectory Recording #78613841658 Logs
StopNonInteractiveSingleAppHost Recording #78613841627 Logs
StopTypeScriptPolyglotAppHostUsingApphostDirectory Recording #78613841546 Logs
StopWithNoRunningAppHostExitsSuccessfully Recording #78613841417 Logs
TypeScriptAppHostRunDoesNotDeadlockWhenLazyOptionsInvokeAsyncCallback Recording #78613841392 Logs
UnAwaitedChainsCompileWithAutoResolvePromises Recording #78613841580 Logs
UpdateProjectChannelToStable_CSharpEmptyAppHost_PreservesAspireConfigChannel Recording #78613841327 Logs
UpdateProjectChannelToStable_CSharpSingleFileInit_PreservesAspireConfigChannel Recording #78613841327 Logs
UpdateProjectChannelToStable_TypeScriptSingleFileInit_PreservesAspireConfigChannel Recording #78613841327 Logs
UpdateProjectChannelToStable_TypeScript_PreviewsStablePackagesAndPreservesChannel Recording #78613841327 Logs

📹 Recordings uploaded automatically from CI run #26668769663

@davidfowl davidfowl disabled auto-merge May 30, 2026 02:12
@davidfowl davidfowl merged commit 64efcef into release/13.4 May 30, 2026
613 of 619 checks passed
@davidfowl davidfowl deleted the backport/pr-17687-to-release/13.4 branch May 30, 2026 02:12
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 13.4 milestone May 30, 2026
aspire-repo-bot Bot added a commit to microsoft/aspire.dev that referenced this pull request May 30, 2026
…r hosted agents

Documents that in publish mode, Aspire automatically injects Foundry
project connection environment variables into the deployment container
(the actual workload). Previously the docs only mentioned container
registry publishing; this adds the connection injection behavior
fixed by microsoft/aspire#17704.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot
Copy link
Copy Markdown
Contributor Author

Pull request created: #1133

Generated by PR Documentation Check

@aspire-repo-bot
Copy link
Copy Markdown
Contributor Author

📝 Documentation has been drafted in microsoft/aspire.dev#1133 targeting release/13.4.

Updated src/frontend/src/content/docs/integrations/cloud/azure/azure-ai-foundry/azure-ai-foundry-host.mdx to clarify that in publish mode, Aspire automatically injects Foundry project connection environment variables (including ConnectionStrings__<project-name> and the project endpoint) into the deployment container. This documents the bug fix from #17704 where the Foundry project reference was incorrectly applied to the AzureHostedAgentResource wrapper instead of the actual deployment target container.

Note

This draft PR needs human review before merging.

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.

3 participants