Reference Foundry project from hosted agent target#17687
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17687Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17687" |
There was a problem hiding this comment.
Pull request overview
This PR moves Foundry project references in publish-mode hosted agents onto the resolved deployment target so container deployment processing can consume the target’s Foundry connection annotations.
Changes:
- Adds publish-mode helper to attach the Foundry project reference to the deployment target.
- Keeps the hosted-agent wrapper relationship to its target while removing the direct project reference from the wrapper.
- Adds a regression test for target-level project reference placement.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Aspire.Hosting.Foundry/HostedAgent/HostedAgentBuilderExtension.cs |
Moves Foundry project reference attachment from the hosted-agent wrapper to the resolved deployment target. |
tests/Aspire.Hosting.Foundry.Tests/HostedAgentExtensionTests.cs |
Adds coverage for project reference placement on the hosted-agent deployment target. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9655bc6 to
694f515
Compare
|
/backport to release/13.4 |
|
Started backporting to |
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>
|
/backport to release/13.4 |
1 similar comment
|
/backport to release/13.4 |
|
Started backporting to |
|
Started backporting to |
|
@davidfowl an error occurred while backporting to |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/backport to release/13.4 |
|
Started backporting to |
|
Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
|
Description
Publish-mode hosted agents now attach the Microsoft Foundry project reference to the actual deployment target resource after the target is resolved, instead of attaching it to the hosted-agent wrapper resource. This ensures the generated or existing container target has the Foundry project connection environment annotations before container build/deployment processing consumes the target resource.
This keeps run-mode behavior unchanged and preserves the hosted-agent wrapper's reference relationship to the deployment target. A regression test verifies the Foundry project reference is on
AzureHostedAgentResource.Targetand not only on the hosted-agent resource.Validation:
Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?