Skip to content

Add TypeScript Azure Functions app support - #17980

Merged
Mitch Denny (mitchdenny) merged 17 commits into
mainfrom
davidfowl/functions-languages-poc
Oct 13, 2026
Merged

Mitch Denny (mitchdenny) merged 17 commits into
mainfrom
davidfowl/functions-languages-poc

Conversation

@davidfowl

@davidfowl David Fowler (davidfowl) commented Jun 6, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This adds a proof-of-concept path for Azure Functions apps that are not .NET projects, starting with TypeScript and JavaScript on the Node worker. The goal is to let a TypeScript AppHost model, run, publish, and deploy a TypeScript Azure Functions app the same way it models the rest of a distributed app.

The change introduces a directory-based Azure Functions app resource, local Core Tools launch behavior, and deterministic Dockerfile publishing for TypeScript/JavaScript Functions containers.

VS Code debugger support was split into the stacked follow-up #20943 so the hosting and deployment support can land independently.

A new playground sample demonstrates the scenario end to end: a TypeScript AppHost, TypeScript Azure Function, Azure Storage dependency, and Vite TypeScript frontend. Locally, the frontend proxies /api to the Aspire-modeled Functions endpoint. In Azure Container Apps, the frontend is published as a static site with /api routed to the Functions container.

Related to #17979

User-facing usage

TypeScript AppHost:

const functions = await builder
    .addAzureFunctionsApp("functions", "../Functions", AzureFunctionsLanguage.TypeScript)
    .withExternalHttpEndpoints()
    .withReference(samples).waitFor(samples);

await builder
    .addViteApp("frontend", "../Frontend")
    .withEnvironment("FUNCTIONS_BASE_URL", functions.getEndpoint("http"))
    .waitFor(functions)
    .publishAsStaticWebsite({
        apiPath: "/api",
        apiTarget: functions
    })
    .withExternalHttpEndpoints();

Generated TypeScript Functions Dockerfile publish uses the official Functions Node host image shape, builds TypeScript during container build, and exposes container port 80 for ACA kind: functionapp deployment.

Security considerations

This change adds support for launching Node-based Azure Functions apps locally and publishing them as containers. The sample frontend adds a static-site reverse proxy route from /api to the Functions resource. Security review has not been completed yet because this is a POC.

Validation

  • Passed: ./restore.sh
  • Passed (67 tests): dotnet test --project tests/Aspire.Hosting.Azure.Tests/Aspire.Hosting.Azure.Tests.csproj --no-launch-profile -- --filter-class "*.AzureFunctionsTests" --filter-class "*.FunctionsPublicApiTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"
  • Passed: dotnet build tests/Aspire.Deployment.EndToEnd.Tests/Aspire.Deployment.EndToEnd.Tests.csproj --no-restore --nologo
  • Clean isolated local aspire start for the TypeScript AppHost
  • aspire wait functions and aspire wait frontend
  • Local frontend /api/storageHttpTrigger?name=Frontend call wrote a blob to the modeled samples container
  • aspire publish emitted Functions and frontend container artifacts, including ACA Bicep, Functions kind: 'functionapp', target port 80, frontend YARP static-site routing, and storage role assignments
  • Real aspire deploy to ACA in rg-aspire-ts-functions-poc succeeded
  • Deployed frontend /api/storageHttpTrigger?name=ACAFrontend returned HTTP 200 and wrote a blob
  • Passed: git diff --check

Fixes # (issue)

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

@github-actions

github-actions Bot commented Jun 6, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

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

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17980

Or

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

Remove the modeled Node inspector endpoint from directory-based Azure Functions apps and keep inspector setup inside VS Code debug launches. The extension now allocates a per-session loopback inspector port, injects the documented Functions worker argument only for debug, and attaches with js-debug.

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

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 2 jobs were identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

Matched test failure patterns (1 test)
  • Aspire.Cli.EndToEnd.Tests.KubernetesDeployWithHelmChartTests.DeployK8sWithExternalHelmChart — Unable to access container registry during publish

David Fowler (davidfowl) and others added 3 commits June 6, 2026 22:57
Make the Azure Functions Node debugger test expect the same path separator normalization used by path.join so it passes on Windows and Unix.

Co-authored-by: Copilot <[email protected]>
Expose host storage for directory-based Functions apps to polyglot AppHosts, avoid requiring global Core Tools for TypeScript apps that run through npm, refine Node debug source-map defaults, and document the JS/TS Functions path.

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

# Conflicts:
#	src/Aspire.Hosting.Azure.Functions/README.md
@github-actions

Copy link
Copy Markdown
Contributor

❓ CLI E2E Tests unknown — 113 passed, 0 failed, 2 unknown (commit 5f0f62a)

View all recordings
- Test Detail
✅ AddPackageInteractiveWhileAppHostRunningDetached Recording · Job · CLI logs
✅ AddPackageWhileAppHostRunningDetached Recording · Job · CLI logs
✅ AgentCommands_AllHelpOutputs_AreCorrect Recording · Job · CLI logs
✅ AgentInitCommand_DefaultSelection_InstallsDefaultSkills Recording · Job · CLI logs
✅ AgentInitCommand_MigratesDeprecatedConfig Recording · Job · CLI logs
✅ AgentInit_NonInteractive_BundleOnlySkillsNotInCatalog Recording · Job · CLI logs
✅ AgentMcpListStructuredLogsReturnsLogsFromStarterApp Recording · Job · CLI logs
✅ AgentMcpListStructuredLogsReturnsLogsFromStarterApp_DevLocalhost Recording · Job · CLI logs
✅ AgentMcpListStructuredLogsReturnsLogsFromStarterApp_Isolated Recording · Job · CLI logs
✅ AllPublishMethodsBuildDockerImages Recording · Job · CLI logs
✅ AspireAddAndStartWorkAgainstLegacyAppHostTs Recording · Job · CLI logs
✅ AspireAddPackageVersionToDirectoryPackagesProps Recording · Job · CLI logs
✅ AspireInitSingleFileAppHostRunsViaDotnetRunAppHost Recording · Job · CLI logs
✅ AspireInit_ExistingAppHostDir_RecreatesNuGetConfigKeepsFiles Recording · Job · CLI logs
❔ AspireInit_SolutionFile_BuildsAgainstChannelHive Recording · Job · CLI logs
✅ AspireStartUpdatesStaleTypeScriptAppHostPath Recording · Job · CLI logs
✅ AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps Recording · Job · CLI logs
✅ AspireUpdateRemovesOrphanAppHostPackageVersionWhenSdkAlreadyCurrent Recording · Job · CLI logs
✅ Banner_DisplayedOnFirstRun Recording · Job · CLI logs
✅ Banner_DisplayedWithExplicitFlag Recording · Job · CLI logs
✅ Banner_NotDisplayedWithNoLogoFlag Recording · Job · CLI logs
✅ CertificatesClean_RemovesCertificates Recording · Job · CLI logs
✅ CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate Recording · Job · CLI logs
✅ CertificatesTrust_WithUntrustedCert_TrustsCertificate Recording · Job · CLI logs
✅ ConfigSetGet_CreatesNestedJsonFormat Recording · Job · CLI logs
✅ CreateAndRunAspireStarterProject Recording · Job · CLI logs
✅ CreateAndRunAspireStarterProjectWithBundle Recording · Job · CLI logs
✅ CreateAndRunEmptyAppHostProject Recording · Job · CLI logs
✅ CreateAndRunJavaEmptyAppHostProject Recording · Job · CLI logs
✅ CreateAndRunJsReactProject Recording · Job · CLI logs
✅ CreateAndRunPolyglotAppHostWithDevLocalhostUrls Recording · Job · CLI logs
✅ CreateAndRunPythonReactProject Recording · Job · CLI logs
✅ CreateAndRunTypeScriptEmptyAppHostProject Recording · Job · CLI logs
✅ CreateAndRunTypeScriptStarterProject Recording · Job · CLI logs
✅ CreateJavaAppHostWithViteApp Recording · Job · CLI logs
✅ CreateTypeScriptAppHostWithViteApp_UsesConfiguredToolchain Recording · Job · CLI logs
✅ DashboardRunWithAgentMcpListTracesReturnsNoTraces Recording · Job · CLI logs
✅ DashboardRunWithAgentMcpListTracesReturnsNoTraces_DevLocalhost Recording · Job · CLI logs
✅ DashboardRunWithOtelTracesReturnsNoTraces Recording · Job · CLI logs
✅ DashboardRunWithOtelTracesReturnsNoTraces_DevLocalhost Recording · Job · CLI logs
✅ DeployK8sBasicApiService Recording · Job · CLI logs
✅ DeployK8sWithExternalHelmChart Recording · Job · CLI logs
✅ DeployK8sWithGarnet Recording · Job · CLI logs
✅ DeployK8sWithMongoDB Recording · Job · CLI logs
✅ DeployK8sWithMySql Recording · Job · CLI logs
✅ DeployK8sWithPostgres Recording · Job · CLI logs
✅ DeployK8sWithRabbitMQ Recording · Job · CLI logs
✅ DeployK8sWithRedis Recording · Job · CLI logs
✅ DeployK8sWithSqlServer Recording · Job · CLI logs
✅ DeployK8sWithValkey Recording · Job · CLI logs
✅ DeployTypeScriptAppToKubernetes Recording · Job · CLI logs
✅ DescribeCommandResolvesReplicaNames Recording · Job · CLI logs
✅ DescribeCommandShowsRunningResources Recording · Job · CLI logs
✅ DetachFormatJsonProducesValidJson Recording · Job · CLI logs
✅ DetachFormatJsonProducesValidJsonWhenRestartingExistingInstance Recording · Job · CLI logs
✅ DoPublishAndDeployListStepsWork Recording · Job · CLI logs
✅ DocsCommand_RendersInteractiveMarkdownFromLocalSource Recording · Job · CLI logs
✅ DoctorCommand_DetectsDeprecatedAgentConfig Recording · Job · CLI logs
✅ DoctorCommand_TypeScriptAppHostReportsMissingConfiguredToolchain Recording · Job · CLI logs
✅ DoctorCommand_WithSslCertDir_ShowsTrusted Recording · Job · CLI logs
✅ DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted Recording · Job · CLI logs
✅ DotNetRunFileBasedAppHostUsesAspireCliBundle Recording · Job · CLI logs
✅ DotNetRunProjectAppHostUsesAspireCliBundle Recording · Job · CLI logs
✅ GatewayWithoutExternalEndpoint_FailsPublishWithGuidance Recording · Job · CLI logs
✅ GeneratedAspireDevScript_StartsWatchMode_WithConfiguredToolchain Recording · Job · CLI logs
✅ GlobalMigration_HandlesCommentsAndTrailingCommas Recording · Job · CLI logs
✅ GlobalMigration_HandlesMalformedLegacyJson Recording · Job · CLI logs
✅ GlobalMigration_PreservesAllValueTypes Recording · Job · CLI logs
✅ GlobalMigration_SkipsWhenNewConfigExists Recording · Job · CLI logs
✅ GlobalSettings_MigratedFromLegacyFormat Recording · Job · CLI logs
✅ IngressWithoutExternalEndpoint_FailsPublishWithGuidance Recording · Job · CLI logs
✅ InitTypeScriptAppHost_AugmentsExistingViteRepoInWorkspaceSubdirectory Recording · Job · CLI logs
✅ InteractiveCSharpInitCreatesExpectedFiles Recording · Job · CLI logs
✅ InvalidAppHostPathWithComments_IsHealedOnRun Recording · Job · CLI logs
✅ JavaScriptHostingApisRunFromTypeScriptAppHost Recording · Job · CLI logs
✅ LatestCliCanStartStableChannelAppHost Recording · Job · CLI logs
✅ LatestCliCanStartStableChannelTypeScriptAppHost Recording · Job · CLI logs
✅ LegacySettingsMigration_AdjustsRelativeAppHostPath Recording · Job · CLI logs
✅ LogsCommandShowsResourceLogs Recording · Job · CLI logs
✅ OtelLogsReturnsStructuredLogsFromStarterApp Recording · Job · CLI logs
✅ OtelLogsReturnsStructuredLogsFromStarterAppIsolated Recording · Job · CLI logs
✅ ProcessCommandCallbackReceivesCliArguments Recording · Job · CLI logs
✅ PsCommandListsRunningAppHost Recording · Job · CLI logs
✅ PsFormatJsonOutputsOnlyJsonToStdout Recording · Job · CLI logs
✅ PublishJavaScriptPatternsGeneratesExpectedDockerComposeArtifacts Recording · Job · CLI logs
✅ PublishWithConfigureEnvFileUpdatesEnvOutput Recording · Job · CLI logs
✅ PublishWithDockerComposeServiceCallbackSucceeds Recording · Job · CLI logs
✅ PublishWithoutOutputPathUsesAppHostDirectoryDefault Recording · Job · CLI logs
✅ ResourceCommand_FailedExec_ShowsLogPathAndLogHasEntries Recording · Job · CLI logs
✅ ResourceCommand_SetAndDeleteParameterUpdatesDescribeOutput Recording · Job · CLI logs
✅ RestoreGeneratesSdkFiles Recording · Job · CLI logs
✅ RestoreGeneratesSdkFiles_WithConfiguredToolchain Recording · Job · CLI logs
✅ RestoreRefreshesGeneratedSdkAfterAddingIntegration Recording · Job · CLI logs
✅ RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes Recording · Job · CLI logs
✅ RunFromParentDirectory_UsesExistingConfigNearAppHost Recording · Job · CLI logs
✅ RunReportsSyntaxErrorsForDotNetAppHost Recording · Job · CLI logs
✅ RunReportsSyntaxErrorsForTypeScriptAppHost Recording · Job · CLI logs
✅ SecretCrudOnDotNetAppHost Recording · Job · CLI logs
✅ SecretCrudOnTypeScriptAppHost Recording · Job · CLI logs
✅ StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels Recording · Job · CLI logs
✅ StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets Recording · Job · CLI logs
✅ StartReportsSyntaxErrorsForDotNetAppHost Recording · Job · CLI logs
✅ StartReportsSyntaxErrorsForTypeScriptAppHost Recording · Job · CLI logs
✅ StopAllAppHostsFromAppHostDirectory Recording · Job · CLI logs
✅ StopJavaPolyglotAppHostUsingApphostDirectory Recording · Job · CLI logs
✅ StopNonInteractiveSingleAppHost Recording · Job · CLI logs
✅ StopTypeScriptPolyglotAppHostUsingApphostDirectory Recording · Job · CLI logs
✅ StopWithNoRunningAppHostExitsSuccessfully Recording · Job · CLI logs
✅ TypeScriptAppHostRunDoesNotDeadlockWhenLazyOptionsInvokeAsyncCallback Recording · Job · CLI logs
✅ TypeScriptAppHostWithVite_AllowsDifferentGuestPkgManager Recording · Job · CLI logs
✅ UnAwaitedChainsCompileWithAutoResolvePromises Recording · Job · CLI logs
❔ UpdateToStable_CSharpEmptyAppHost_KeepsConfigChannel Recording · Job · CLI logs
✅ UpdateToStable_CSharpSingleFileInit_KeepsConfigChannel Recording · Job · CLI logs
✅ UpdateToStable_TypeScriptSingleFileInit_KeepsConfigChannel Recording · Job · CLI logs
✅ UpdateToStable_TypeScript_PreviewsStablePkgsAndKeepsChannel Recording · Job · CLI logs

📹 Recordings uploaded automatically from CI run #27258145192

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.

Copilot review overview

🔵 Needs a closer look

The draft spans public API, production containers, deployment, and debugging while retaining unresolved API, image, and end-to-end coverage concerns.

Review tier: Balanced (auto)
Findings: 3 Medium severity · 2 Low severity

Note

Copilot is running an experiment and ran this review at Balanced.

Open findings (5)
What changed in this PR

Adds proof-of-concept TypeScript/JavaScript Azure Functions support across Aspire hosting, Azure Container Apps publishing, VS Code debugging, and an end-to-end playground.

Changes:

  • Adds directory-based Node Functions resources, storage integration, and Dockerfile publishing.
  • Adds VS Code Node inspector launch/attach support.
  • Adds hosting tests, documentation, and a storage-backed TypeScript sample.
File Description
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.Functions/​TypeScript/​apphost.mts Exercises the exported TypeScript API.
tests/​Aspire.Hosting.Azure.Tests/​PublicApiTests/​FunctionsPublicApiTests.cs Tests public API validation.
tests/​Aspire.Hosting.Azure.Tests/​AzureFunctionsTests.cs Tests hosting, publishing, and ACA modeling.
src/​Aspire.Hosting.Azure.Functions/​README.md Documents directory-based Functions apps.
src/​Aspire.Hosting.Azure.Functions/​AzureFunctionsResource.cs Defines language and app resource types.
src/​Aspire.Hosting.Azure.Functions/​AzureFunctionsProjectResourceExtensions.cs Implements launching, storage, debugging, and publishing.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​Functions/​tsconfig.json Configures Functions TypeScript compilation.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​Functions/​src/​index.ts Registers sample functions.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​Functions/​src/​functions/​storageHttpTrigger.ts Adds a blob-writing HTTP trigger.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​Functions/​src/​functions/​enqueueBackgroundWork.ts Adds a queue-producing HTTP trigger.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​Functions/​src/​functions/​backgroundWorkQueueTrigger.ts Processes queued work into blobs.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​Functions/​src/​backgroundWork.ts Defines shared queue metadata.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​Functions/​package.json Defines Functions dependencies and scripts.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​Functions/​package-lock.json Locks Functions dependencies.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​Functions/​host.json Configures the Functions host.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​Frontend/​vite.config.ts Proxies local API requests.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​Frontend/​tsconfig.json Configures frontend TypeScript.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​Frontend/​src/​styles.css Styles the sample UI.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​Frontend/​src/​main.ts Implements sample API interactions.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​Frontend/​package.json Defines frontend build dependencies.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​Frontend/​index.html Hosts the frontend application.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​aspire.config.json Registers the TypeScript AppHost and packages.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​AppHost/​tsconfig.json Configures AppHost TypeScript compilation.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​AppHost/​package.json Defines AppHost scripts and dependencies.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​AppHost/​package-lock.json Locks AppHost dependencies.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​AppHost/​apphost.run.json Defines local launch URLs.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​AppHost/​apphost.mts Models Functions, storage, and frontend resources.
playground/​TypeScriptApps/​AzureFunctionsWithStorage/​.vscode/​launch.json Adds the Aspire launch configuration.
extension/​src/​types/​extensionApi.ts Adds an E2E DCP information command.
extension/​src/​test/​azureFunctionsNodeDebugger.test.ts Unit-tests Node Functions debugger configuration.
extension/​src/​test-e2e/​packageSurface.e2e.test.ts Verifies packaged debugger capability exposure.
extension/​src/​extension.ts Exposes DCP information to E2E tests.
extension/​src/​debugger/​languages/​azureFunctions.ts Implements Node Functions launch and attach.
extension/​src/​debugger/​debuggerExtensions.ts Registers the new debugger extension.
extension/​src/​dcp/​types.ts Defines the Node Functions launch contract.
extension/​src/​capabilities.ts Advertises Node Functions support.
extension/​.vscode-test.mjs Isolates VS Code test user data.
Files not reviewed (3)
  • playground/TypeScriptApps/AzureFunctionsWithStorage/AppHost/package-lock.json: Generated file
  • playground/TypeScriptApps/AzureFunctionsWithStorage/Frontend/package-lock.json: Generated file
  • playground/TypeScriptApps/AzureFunctionsWithStorage/Functions/package-lock.json: Generated file

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

Copilot-Session: 9758c021-6791-46c1-81f0-c31dd977b996
@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.

Copilot review overview

🟡 Changes recommended

Input validation, inspector-port concurrency, localization, documentation, and deployment-test retry issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review tier: Balanced (auto)
Findings: 2 Medium severity · 2 Low severity

Note

Copilot is running an experiment and ran this review at Balanced.

Open (4)
Resolved since last review (5)
Files not reviewed (3)
  • playground/TypeScriptApps/AzureFunctionsWithStorage/AppHost/package-lock.json: Generated file
  • playground/TypeScriptApps/AzureFunctionsWithStorage/Frontend/package-lock.json: Generated file
  • playground/TypeScriptApps/AzureFunctionsWithStorage/Functions/package-lock.json: Generated file

Validate directory inputs, isolate deployment retry budgets, localize inspector allocation failures, and make experimental examples explicit. Register the Node Functions proof independently in the CI matrix.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 9758c021-6791-46c1-81f0-c31dd977b996
@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.

Copilot review overview

🔵 Needs a closer look

Clean run-mode apps do not install Node dependencies, and the public resource constructor does not correctly validate its directory argument.

Review tier: Balanced (auto)
Findings: None

Note

Copilot is running an experiment and ran this review at Balanced.

Resolved since last review (4)
Files not reviewed (3)
  • playground/TypeScriptApps/AzureFunctionsWithStorage/AppHost/package-lock.json: Generated file
  • playground/TypeScriptApps/AzureFunctionsWithStorage/Frontend/package-lock.json: Generated file
  • playground/TypeScriptApps/AzureFunctionsWithStorage/Functions/package-lock.json: Generated file
Previously missed (2)

In code that hasn't changed since last review

Medium severity Install Node dependencies before starting the Functions app

src/​Aspire.Hosting.Azure.Functions/​AzureFunctionsProjectResourceExtensions.cs:309

WithRequiredCommand only checks that npm exists; it does not install the app's packages. On a clean checkout, the documented TypeScript path runs npm run start, whose prestart/start scripts require local typescript and azure-functions-core-tools, and JavaScript apps likewise need their @azure/functions dependency. The new sample therefore cannot run until the user manually runs npm install, unlike AddJavaScriptApp, which creates an installer resource and waits for it. Add an npm install setup dependency (or an equivalent explicit package-install lifecycle) before launching the Functions resource.

Medium severity Validate the public appDirectory constructor argument

src/​Aspire.Hosting.Azure.Functions/​AzureFunctionsResource.cs:80

The public constructor renames the base workingDirectory parameter to appDirectory but passes it through without validation. ExecutableResource permits an empty working directory, and a null value throws with ParamName == "workingDirectory", which does not name any parameter on this API (the new test currently locks in that mismatch). Validate appDirectory before passing it to the base constructor so null/empty values report appDirectory, matching AddAzureFunctionsApp.

@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

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

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.

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

Copilot-Session: ba624858-8d8b-431c-afa7-b672f0c74ac2
@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.

🟡 Changes recommended

The generated image can include .npmrc credentials, and the README advertises debugger support deferred to another PR.

1 open finding
3 resolved since last review
Files not reviewed (3)
  • playground/TypeScriptApps/AzureFunctionsWithStorage/AppHost/package-lock.json: Generated file
  • playground/TypeScriptApps/AzureFunctionsWithStorage/Frontend/package-lock.json: Generated file
  • playground/TypeScriptApps/AzureFunctionsWithStorage/Functions/package-lock.json: Generated file
Previously missed (1)

In code that hasn't changed since last review

Low severity Document current Node Functions debugger limitation

src/​Aspire.Hosting.Azure.Functions/​README.md:131

This documents Node Functions debugger behavior that is not present in this PR: the description explicitly says it was split into #20943, and the current extension has no azure-functions-node/languageWorkers__node__arguments implementation. As merged independently, users would be promised a VS Code attach flow that does not exist. Document the current limitation until the follow-up lands.

🧠 Review effort: Balanced

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

Copilot-Session: ba624858-8d8b-431c-afa7-b672f0c74ac2
@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot October 13, 2026 01:24
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #17980...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@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.

🔵 Needs a closer look

Documentation discrepancies and an insufficient deployment-test timeout remain unresolved.

0 open findings

1 resolved since last review
Files not reviewed (3)
  • playground/TypeScriptApps/AzureFunctionsWithStorage/AppHost/package-lock.json: Generated file
  • playground/TypeScriptApps/AzureFunctionsWithStorage/Frontend/package-lock.json: Generated file
  • playground/TypeScriptApps/AzureFunctionsWithStorage/Functions/package-lock.json: Generated file
Previously missed (3)

In code that hasn't changed since last review

Medium severity Increase outer timeout to cover all test phases

tests/​Aspire.Deployment.EndToEnd.Tests/​AzureFunctionsDeploymentTests.cs:32

The 45-minute outer cancellation is shorter than this test's own permitted phases: bundle installation can take 5 minutes, init and three package adds allow 11 minutes, deploy allows 30 minutes, and verification allows 12 minutes. A valid slow deployment can therefore be canceled by the outer token before any individual phase times out. Increase the outer budget to cover those phases plus cleanup margin.

Low severity Fix snippet to use the declared blobs connection

playground/​TypeScriptApps/​AzureFunctionsWithStorage/​AppHost/​apphost.mts:20

The PR's user-facing snippet uses withReference(samples), but the included Functions code declares its storage binding with connection blobs. A blob-container resource does not provide the Functions-specific blobs__blobServiceUri configuration, so copying the documented snippet with this app will fail at runtime. Update the PR description to reference blobs as this implementation does, while waiting for samples separately.

Low severity Document Node Functions debugger support as unavailable

src/​Aspire.Hosting.Azure.Functions/​README.md:131

The PR explicitly says Node Functions debugger support was split into follow-up #20943, but this README describes that extension behavior as available now. Until the follow-up lands, users following this documentation will expect an automatic inspector launch and attach flow that this change does not provide. Document the current limitation instead.

🧠 Review effort: Balanced

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

Copilot-Session: ba624858-8d8b-431c-afa7-b672f0c74ac2
@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot October 13, 2026 01:38
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #17980...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

3 / 99 PR test projects · 3 PR jobs, from 28 changed files.

Selected PR test projects (3 / 99)

Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Tests, Aspire.Playground.Tests

Selected PR jobs (3)

extension-e2e, polyglot, typescript-api-compat


How these were chosen — grouped by what changed

🔧 src/Aspire.Hosting.Azure.Functions/AzureFunctionsProjectResourceExtensions.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests
→ 1 via the project graph: Aspire.Playground.Tests (2 hops)

🧪 tests/Aspire.Hosting.Azure.Tests/AzureFunctionsTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests
→ 1 via the project graph: Aspire.Hosting.Azure.Kubernetes.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/AppHost/apphost.mts (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/AppHost/apphost.run.json (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/AppHost/package-lock.json (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/AppHost/package.json (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/AppHost/tsconfig.json (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/Frontend/index.html (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/Frontend/package-lock.json (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/Frontend/package.json (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/Frontend/src/main.ts (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/Frontend/src/styles.css (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/Frontend/tsconfig.json (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/Frontend/vite.config.ts (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/Functions/host.json (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/Functions/package-lock.json (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/Functions/package.json (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/Functions/src/backgroundWork.ts (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/Functions/src/functions/backgroundWorkQueueTrigger.ts (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/Functions/src/functions/enqueueBackgroundWork.ts (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/Functions/src/functions/storageHttpTrigger.ts (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/Functions/src/index.ts (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/Functions/tsconfig.json (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/TypeScriptApps/AzureFunctionsWithStorage/aspire.config.json (changed)
→ 1 directly: Aspire.Playground.Tests

🔧 src/Aspire.Hosting.Azure.Functions/AzureFunctionsResource.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/PublicApiTests/FunctionsPublicApiTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

Job reasons

Job Triggered by
extension-e2e • src/Aspire.Hosting.Azure.Functions/AzureFunctionsProjectResourceExtensions.cs, src/Aspire.Hosting.Azure.Functions/AzureFunctionsResource.cs
• affected project Aspire.Hosting.Azure.Functions
polyglot • tests/PolyglotAppHosts/Aspire.Hosting.Azure.Functions/TypeScript/apphost.mts
• affected project Aspire.Hosting.Azure.Functions
typescript-api-compat affected project Aspire.Hosting.Azure.Functions

Selection computed for commit cf59bd0.

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.

🟡 Changes recommended

Clean-checkout local startup lacks dependency restoration, and the README documents debugger support deferred to another PR.

1 open finding
Files not reviewed (3)
  • playground/TypeScriptApps/AzureFunctionsWithStorage/AppHost/package-lock.json: Generated file
  • playground/TypeScriptApps/AzureFunctionsWithStorage/Frontend/package-lock.json: Generated file
  • playground/TypeScriptApps/AzureFunctionsWithStorage/Functions/package-lock.json: Generated file
Previously missed (1)

In code that hasn't changed since last review

Low severity Remove Node debugger claims until debugger support is implemented

src/​Aspire.Hosting.Azure.Functions/​README.md:131

This documents automatic Node inspector setup and debugger attachment, but the PR description explicitly says that VS Code debugger support was split into follow-up #20943 so this hosting change can land independently. If this PR lands first, users will be promised behavior that is not present. Remove the Node-debugging claims here (or state that automatic debugging is not included) until the follow-up lands.

🧠 Review effort: Balanced

@mitchdenny
Mitch Denny (mitchdenny) merged commit da9f076 into main Oct 13, 2026
107 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.0 milestone Oct 13, 2026
aspire-repo-bot Bot added a commit to microsoft/aspire.dev that referenced this pull request Oct 13, 2026
- Document AddAzureFunctionsApp, AzureFunctionsAppResource, and
  AzureFunctionsLanguage for directory-based TypeScript/JavaScript
  Functions apps in the Azure Functions Hosting integration page.
- Add the ASPIREAZUREFUNCTIONS001 diagnostic reference page and
  register it in the reference sidebar.
- Document directory-based Functions app Dockerfile publishing and
  Azure Container Apps functionapp kind deployment behavior.

Documents changes from microsoft/aspire#17980

Co-authored-by: Copilot <[email protected]>
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Pull request created: #1878

Generated by PR Documentation Check · copilot · auto · 140.2 AIC · ⌖ 15.9 AIC · ⊞ 20.4K

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

📝 Documentation has been drafted in microsoft/aspire.dev#1878 targeting release/17.0.

Documents the new TypeScript/JavaScript Azure Functions app support added in #17980 (triggered signals: new_public_type — AzureFunctionsLanguage enum; experimental_attribute_added — [Experimental("ASPIREAZUREFUNCTIONS001")] on the new app resource/APIs; integration_readme_changed and diagnostic_documentation_changed — README and docs/list-of-diagnostics.md both updated; pr_body_has_user_facing_section/pr_body_has_cli_flag_mention — the PR body's "User-facing usage" section shows addAzureFunctionsApp/AddAzureFunctionsApp).

Changes:

  • integrations/cloud/azure/azure-functions/azure-functions-host.mdx: new "TypeScript and JavaScript Functions apps" section documenting AddAzureFunctionsApp/addAzureFunctionsApp, AzureFunctionsLanguage, host storage, and the experimental-API opt-in; new "Deploying TypeScript and JavaScript Functions apps" subsection documenting generated Dockerfile behavior and the ACA functionapp container kind; a pointer note added to the existing "Add Azure Functions resource" section.
  • diagnostics/aspireazurefunctions001.mdx (new): reference page for the new ASPIREAZUREFUNCTIONS001 experimental diagnostic, mirroring the existing ASPIREDURABLETASK001/ASPIREDOCKERFILEBUILDER001 pages.
  • config/sidebar/reference.topics.ts: registers the new diagnostic page in the sidebar.

Note

This draft PR needs human review before merging.

Mitch Denny (mitchdenny) added a commit that referenced this pull request Oct 14, 2026
## Description

Adds the VS Code extension debugger follow-up split from #17980 so
TypeScript and JavaScript Azure Functions apps can be launched under
Core Tools and attached with the Node debugger.

The parent #17980 has merged. This PR targets `main` and preserves the
parent's final constructor validation, deployment subscription handling,
and `.npmrc` build-context exclusion.

Restores effective environment propagation, inspector-port reservation
through task launch, separate Node Functions E2E prerequisites,
handled-exception diagnostics, documentation, and tests.

The external-consumer Node Functions E2E fixture uses
`Microsoft.NET.Sdk`, `AspireUseCliBundle`, and matching PR-built
`Aspire.Hosting.AppHost` and `Aspire.Hosting.Azure.Functions` packages.
It does not reference the repository project, avoiding mixed
repository-central and external transitive Azure Storage versions. The
fixture gets its package version from the E2E runner instead of assuming
the generated template contains the now-deprecated `Aspire.AppHost.Sdk`
directive.

### User-facing usage

With the Aspire VS Code extension installed, debugging an AppHost
containing a TypeScript or JavaScript Azure Functions app starts Azure
Functions Core Tools, reserves a loopback Node inspector port until task
launch, attaches `pwa-node`, and stops the task when the debug session
ends.

The playground launch configuration demonstrates the scenario with
`AzureFunctionsWithStorage`.

Screenshots are not useful evidence for this debugger-orchestration
change. The [passing live Node Functions E2E
proof](https://github.com/microsoft/aspire/actions/runs/38341117446/job/115117157380)
installs real source breakpoints, sends an HTTP request, verifies the
`pwa-node` stack frame, and verifies Core Tools and the inspector are
cleaned up.

### Validation

[CI run
38341117446](https://github.com/microsoft/aspire/actions/runs/38341117446)
passed for head `2ea2231f0fae7f3cd2c3d89a614a06fc7de3cb51`, including
the live Node Functions debugger E2E and final results gate. All 104
visible PR checks finished successfully or were intentionally skipped;
none remain pending or failing.

Local validation after the package-based fixture fix:

- Passed: `cd extension && corepack yarn run compile-e2e`
- Passed: `cd extension && corepack yarn run compile-tests`
- Passed: `cd extension && corepack yarn run lint`
- Passed (170 tests): `cd extension && corepack yarn run unit-test
--grep "Azure Functions|E2E launch profile|E2E shard matrix"`

Earlier post-rebase validation:

- Passed (3,665 tests; 16 pending, plus compile and lint): `cd extension
&& corepack yarn test`
- Passed (1 test, including project build): `export
PATH="$PWD/.dotnet:$PATH" && dotnet test --project
tests/Aspire.Hosting.Azure.Tests/Aspire.Hosting.Azure.Tests.csproj
--no-launch-profile -- --filter-method
"*.AddAzureFunctionsApp_DoesNotModelNodeDebugEndpoint"
--filter-not-trait "quarantined=true" --filter-not-trait
"outerloop=true"`

Initial validation also passed `./restore.sh` and `export
PATH="$PWD/.dotnet:$PATH" && dotnet build
src/Aspire.Hosting.Azure.Functions/Aspire.Hosting.Azure.Functions.csproj
/p:SkipNativeBuild=true --no-restore`.

Host limitation: an initial combined build attempt encountered
Xcode-dependent CLI/dashboard targets on this macOS host, which has
Command Line Tools rather than full Xcode. Local targeted validations
passed independently, and the current CI run passed its selected builds
and tests.

Fixes # (issue)

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] 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
  - [x] 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
  - [x] No

---------

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 36c01d16-3dc7-4ef2-80cc-1a0f40c862ca
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 12, 2026

This branch was previously deployed

1 inactive deployment
deployment-testing — cf59bd07 Deployed Oct 13, 2026 by mitchdenny via Deploy (Deployment.EndToEnd-AzureFunctionsDeploymentTests) #861
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants