Repository navigation
Fix Java, PowerShell, and Go workload setup - #5801
Merged
Merged
Conversation
Include both language stacks in setup planning, interactive selection, and feature hints so setup checks cannot overlook missing stack workloads. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Daniel Castro (castrodd)
approved these changes
Oct 28, 2026
Map configured native projects to the go setup feature before planning dependencies and profile constraints. Preserve the native runtime used by the Functions host. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
sarah (satvu)
commented
Oct 28, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the expanded setup workloads and Go runtime-resolution changes.
No open issues 🎉
What changed in this PR
Addresses #5777 by making func setup include the Java and PowerShell stack workloads and correctly resolve Go projects configured with the native worker runtime.
Changes:
- Adds Java and PowerShell to setup planning, interactive choices, help, hints, and local debug-workload mappings.
- Maps configured
nativeruntimes to Go during setup without changing the runtime passed to the Functions host. - Adds regression coverage for dependency installation,
--check, profile constraints, and JSON output, plus updated setup documentation.
| File | Description |
|---|---|
| test/Func.Tests/Commands/Setup/SetupRunnerTests.cs | Covers Java, PowerShell, and Go installation and dependency checks. |
| test/Func.Tests/Commands/Setup/SetupFeatureCatalogTests.cs | Tests Java and PowerShell package and runtime hints. |
| test/Func.Tests/Commands/Setup/SetupDefaultHintTests.cs | Tests dependency planning from Java and PowerShell local settings. |
| test/Func.Tests/Commands/Setup/SetupCommandTests.cs | Verifies Java and PowerShell appear in feature help. |
| test/Func.Tests/Commands/Setup/SetupAutomationContractTests.cs | Updates expected interactive stack choices and fixtures. |
| src/Func/Commands/Setup/SetupTypes.cs | Adds Java and PowerShell stack package mappings. |
| src/Func/Commands/Setup/SetupFeatureResolver.cs | Normalizes configured native runtimes to the Go feature. |
| src/Func/Commands/Setup/SetupFeatureCatalog.cs | Reuses the planner’s supported-stack list for hints. |
| src/Func/Commands/Setup/SetupCommand.cs | Includes Java and PowerShell in feature help. |
| README.md | Documents language setup, checks, and debug-script features. |
| eng/scripts/debug-workloads.ps1 | Adds Java and PowerShell debug-workload mappings. |
| docs/cli-architecture.md | Explains setup-only Go runtime normalization. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue describing the changes in this PR
Resolves #5777 for Java, PowerShell, and Go.
func setuppreviously installed the Java/PowerShell worker and extension bundle without planning the corresponding stack workload. For Go projects configured withFUNCTIONS_WORKER_RUNTIME=native, setup requested an unpublishednativeworker instead of the Go stack and worker. Setup could report success, including under--check, whilefunc runcould not recognize the project.Pull request checklist
func setupreports success for Java/PowerShell projects but does not install the stack workload, sofunc runcannot recognize the project #5777; README setup guidance, Go architecture documentation, and local debug-script documentation are updated here.release_notes.mdAdditional information
User-visible behavior changes
--featuresor inferred from the project's configured runtime.nativeto the canonicalgofeature before planning the Go stack/worker and applying profile supported-runtime and worker-version constraints. Matching is case-insensitive and trims whitespace. Explicit--features goremains unchanged.native.--checkfails for missing required stack workloads and for missing Go worker versions available in the catalog; complete installations pass without installing anything.The setup hint catalog reuses the planner's supported-stack list instead of maintaining a duplicate allowlist. Regression coverage includes explicit/configured selection, local-settings runtime projection, installation dependencies, missing/installed/unpublished stack checks, JSON results, interactive choices, feature hints, native-to-Go normalization, supported/unsupported Go profiles, and Go worker-version constraints. The former Java test for unmapped stacks now uses
customto preserve that existing behavior.Validation on the combined branch
dotnet build test\Func.Tests\Func.Tests.csproj -c Release --no-restore -p:CI=true --verbosity quiet— passed, 0 warnings and 0 errors.dotnet test test\Func.Tests\Func.Tests.csproj -c Release --no-build --no-restore --filter "FullyQualifiedName~Commands.Setup|FullyQualifiedName~FunctionsProjectResolverTests|FullyQualifiedName~LocalSettingsConfigurationProviderTests|FullyQualifiedName~BundleHintBuilderTests|FullyQualifiedName~WorkloadInstallCommandTests" --verbosity quiet— passed, 340 tests.git diff --check— passed.Before the Java/PowerShell product fix,
dotnet test test\Func.Tests\Func.Tests.csproj --no-restore --filter "FullyQualifiedName~JavaOrPowerShell" --verbosity quietfailed all 20 new regression cases as expected.Go validation before integration
The Go subagent ran these checks on original commit
306da522, cherry-picked here as5e9a2b7d:dotnet test .\test\Workloads\Stacks\Go.Tests\Workloads.Go.Tests.csproj --no-restore -c Release --verbosity minimal -p:TreatWarningsAsErrors=true— passed, 38 tests, including assertions that the resolved host worker runtime remainsnative.local.settings.jsonwithFUNCTIONS_WORKER_RUNTIME=nativeand no.func/config,setup --yes --install-policy if-needed --checkfirst exited 1 naming all four missing dependencies. Actual setup installed host, Go worker, Go stack, and extension bundle and exited 0; a repeated check exited 0.func startperformed realgo mod tidy/build, launched managed Azurite, resolved worker runtimenative, and served GET and POST/api/hellowith HTTP 200 andHello from Go Worker!.func init <path> --stack go --name ...project also passed setup checking and startup/GET/POST; native-project init adoption passed.Go E2E environment: Go 1.27.3, worker SDK
github.com/azure/azure-functions-golang-workerv0.7.0-preview, host 4.1054.200-preview.3.dev, Go stack 1.0.0-preview.2.dev, Go worker 1.0.0-preview.1.dev, and stable extension bundle 4.35.0. The test processes and local feed were stopped afterward. This validates current source/local packages, not older shipped preview artifacts.No live-feed Java/PowerShell installation or host execution was performed; their regression tests exercise the real setup services with substituted catalog/store/installer boundaries.