Skip to content

Lower minimum Helm version to 4.0.0 - #21590

Merged
David Fowler (davidfowl) merged 1 commit into
mainfrom
davidfowl/lower-helm-minimum-20533
Oct 31, 2026
Merged

David Fowler (davidfowl) merged 1 commit into
mainfrom
davidfowl/lower-helm-minimum-20533

Conversation

@davidfowl

Copy link
Copy Markdown
Collaborator

Description

Lowers HelmVersionValidator.MinimumHelmVersion from 4.2.0 to 4.0.0, so Helm 4.1.x (preinstalled on GitHub-hosted windows-2025-vs2026 runners) is no longer rejected by the check-helm-prereqs-{env} step.

Fixes #20533

Root cause

#17491 added the validator and chose 4.2.0 because it was "the latest stable at the time of writing". No Helm 4.2-specific feature required it. The real requirement is Helm 4 itself: Helm 4 accepts a string for --server-side, uses --force-replace instead of --force, and removes --client. Helm 3.x is still rejected.

I built Helm v4.0.0 and v4.1.4 from source and checked every flag Aspire passes. All of them exist in both versions:

Command Flags 4.0.0 4.1.4
helm upgrade --install --namespace --create-namespace --kubeconfig --wait --server-side=true --force-conflicts --take-ownership --values --set --set-string --set-file --version ✅ ✅
helm uninstall --namespace --wait ✅ ✅
helm version --short ✅ ✅

Changes

  • HelmVersionValidator.MinimumHelmVersion: 4.2.0 → 4.0.0, with remarks explaining the choice.
  • Aspire.Hosting.Kubernetes and Aspire.Hosting.Azure.Kubernetes READMEs: prerequisite updated to v4.0.0 or later.
  • deployment-tests.yml: comment updated. The CI pin stays at v4.2.0.
  • Tests:
    • New EnsureMinimumVersionAsync_AnyHelm4Release_Passes covers v4.0.0, v4.1.0, v4.1.4 (the GitHub runner build) and v4.2.0.
    • New MinimumHelmVersion_IsFirstHelm4Release.
    • AtMinimum now uses 4.0.0.
    • The too-old cases are now Helm 3.x only.

Evidence

Regression tests: without the fix, 5 tests fail (AtMinimum_Passes, MinimumHelmVersion_IsFirstHelm4Release, and AnyHelm4Release_Passes for v4.0.0/v4.1.0/v4.1.4). With the fix, all 426 tests in Aspire.Hosting.Kubernetes.Tests pass.

E2E with a real apphost: I used a temporary playground apphost (playground/Helm20533, not committed) with AddKubernetesEnvironment("k8s").WithDashboard(false) and an nginx:alpine container. I deployed it with the locally built aspire CLI to a kind cluster (Kubernetes v1.33.1), using Helm built from source.

Before (main 6a8f531, Helm 4.1.4):

(check-helm-prereqs-k8s) ✗ Step 'check-helm-prereqs-k8s' failed: Helm 4.1.4 was detected, but Aspire requires Helm 4.2.0 or later to deploy Kubernetes resources. Upgrade Helm from https://helm.sh/docs/intro/install/.
✗ Pipeline failed

After (this PR, Helm 4.1.4):

(check-helm-prereqs-k8s) ✓ check-helm-prereqs-k8s completed successfully
(helm-deploy-k8s) ✓ Helm release production deployed to namespace default (3.5s)
✓ 17/17 steps succeeded

$ helm list -A
production  default  1  deployed  helm20533-apphost-0.1.0
$ kubectl get pods
web-deployment-5f746487ff-c26hz   1/1   Running

$ aspire destroy --yes
(destroy-helm-k8s) ✓ Helm release production uninstalled from namespace default
✓ 8/8 steps succeeded

After (this PR, Helm 4.0.0): the same flow passed. check-helm-prereqs ✓, helm-deploy-k8s ✓ (17/17 steps), the pod became Ready, and aspire destroy succeeded (8/8 steps).

There are no UI changes, so there are no screenshots.

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
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No

🤖 Posted by AspireAgent (AI Agent)

Aspire required Helm 4.2.0 only because it was the latest stable release when the
check was added. Every flag Aspire passes to helm exists from Helm 4.0.0, so the
check rejected working installs such as Helm 4.1.4 preinstalled on GitHub-hosted
Windows runners.

Fixes #20533

Co-authored-by: Copilot <[email protected]>
@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 -- 21590

Or

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

@github-actions github-actions Bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

8 / 100 PR test projects · 2 PR jobs, from 3 changed files.

Selected PR test projects (8 / 100)

Aspire.Cli.EndToEnd.Tests, Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.CodeGeneration.Python.Tests, Aspire.Hosting.CodeGeneration.TypeScript.Tests, Aspire.Hosting.Docker.Tests, Aspire.Hosting.Kubernetes.Tests, Aspire.Hosting.RemoteHost.Tests, Infrastructure.Tests

Selected PR jobs (2)

polyglot, typescript-api-compat


How these were chosen — grouped by what changed

🔧 src/Aspire.Hosting.Kubernetes/Deployment/HelmVersionValidator.cs (changed source)
→ 1 directly: Aspire.Hosting.Kubernetes.Tests
→ 5 via the project graph: Aspire.Hosting.Azure.Kubernetes.Tests (2 hops), Aspire.Hosting.CodeGeneration.Python.Tests (2 hops), Aspire.Hosting.CodeGeneration.TypeScript.Tests, Aspire.Hosting.Docker.Tests, Aspire.Hosting.RemoteHost.Tests (2 hops)

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

📄 .github/workflows/deployment-tests.yml (changed)
→ 1 directly: Infrastructure.Tests

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

Job reasons

Job Triggered by
polyglot • affected project Aspire.Hosting.Kubernetes
• affected project Aspire.Hosting.Azure.Provisioning.ContainerService
typescript-api-compat affected project Aspire.Hosting.Kubernetes

Selection computed for commit 96af4a7.

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.

🟢 Approval recommended

No active review issues remain for the change lowering the minimum supported Helm version to 4.0.0.

No open issues 🎉

What changed in this PR

Lowers Aspire’s minimum Helm version from 4.2.0 to 4.0.0, addressing #20533 by accepting Helm 4.1.x on GitHub-hosted Windows runners while continuing to reject Helm 3.x.

Changes:

  • Updates the minimum version and documents its rationale.
  • Adds regression coverage for supported Helm 4 releases and retains Helm 3 rejection cases.
  • Aligns both integration READMEs and the deployment workflow comment; the CI Helm pin remains at 4.2.0.
File Description
tests/​Aspire.Hosting.Kubernetes.Tests/​HelmVersionValidatorTests.cs Tests the 4.0.0 minimum, Helm 4 acceptance, and Helm 3 rejection.
src/​Aspire.Hosting.Kubernetes/​README.md Updates the Helm prerequisite to 4.0.0 or later.
src/​Aspire.Hosting.Kubernetes/​Deployment/​HelmVersionValidator.cs Lowers the minimum version and explains compatibility.
src/​Aspire.Hosting.Azure.Kubernetes/​README.md Updates the Azure Kubernetes Helm prerequisite.
.github/​workflows/​deployment-tests.yml Updates the explanatory comment without changing the Helm pin.

Review effort: Balanced

@davidfowl
David Fowler (davidfowl) marked this pull request as ready for review October 31, 2026 13:10
@davidfowl
David Fowler (davidfowl) merged commit 5c2e185 into main Oct 31, 2026
180 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.0 milestone Oct 31, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Pull request created: #2012

Generated by PR Documentation Check · copilot · auto · 22.5 AIC · ⌖ 1.15 AIC · ⊞ 7.1K

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

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

Updated the Helm minimum version from v4.2.0 to v4.0.0 in 4 docs pages. Triggered signals: integration_readme_changed (Kubernetes READMEs), pr_body_has_cli_flag_mention (--server-side, --force-replace).

Note

This draft PR needs human review before merging.

David Fowler (davidfowl) added a commit that referenced this pull request Nov 1, 2026
## Description

This PR unquarantines
`AppHostServerSessionTests.GetRpcClientAsync_WhenServerExitsBeforeSocketIsAvailable_FailsWithoutWaitingForConnectionTimeout`.
It changes no assertions.

### Why the original failures no longer apply

- **The real failures were Windows-only and old.** They happened on
2026-08-07 and 2026-08-11: `GetRpcClientAsync` took about 15s, past the
5s limit, to notice that the server process had exited.
- **That latency came from post-exit waits that have since been
bounded.** The time was spent in ChildProcess/ProcessExecution after
exit: draining output and verifying termination. The process rewrite
(#17079 and follow-ups) bounded every one of those waits with
`TerminationTimeout`, and the separate Windows IsolatedProcess path is
gone.
- **The 2026-08-17 ubuntu occurrence linked on the issue is
misattributed.** That job failed in `Aspire.Hosting.Tests`, not in this
test.

### Evidence

- **Scheduled Quarantined Tests workflow.** It runs quarantined tests on
all three OSes every 2h. I scanned 119 runs from 2026-10-21 to
2026-10-31: 317 `Aspire.Cli.Tests` jobs (108 Windows, 108 Ubuntu, 101
macOS). This test **never failed**. Every failure in those jobs came
from other quarantined tests:
`ProcessGuestLauncherTests.LaunchAsync_WithGracefulServices_BlockingSignalerDoesNotConsumeGracefulBudget`
(311 jobs) and `RpcCancellationReachesServer` (17 jobs).
- **Local loop.** I ran the `AppHostServerSessionTests` class 20 times
on Linux: 20/20 runs green, with 19 tests and 0 failures each time.
- **Real process.** The test itself is functional: it spawns a real
`dotnet --version` server process and asserts that the RPC connect fails
promptly with the exit code.

### Limitations

- **No fails-before repro.** The failure was Windows-only, and the code
paths involved have been rewritten since, so it can't be reproduced on
current code. This PR removes stale quarantine; it doesn't change
product code.
- **Branch base.** The branch is based on 8c74492, 2 commits behind
`main`. The fork token can't push the workflow-file change in #21590,
and neither skipped commit touches the CLI.

Fixes #19150

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes (existing test, no longer quarantined)
- Did you add public API?
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [x] No
- Does the change require an update in our Aspire docs?
  - [x] No

**🤖 Posted by AspireAgent (AI Agent)**

Co-authored-by: davidfowl <[email protected]>
Co-authored-by: Copilot <[email protected]>
Sébastien Ros (sebastienros) pushed a commit to microsoft/aspire.dev that referenced this pull request Nov 13, 2026
Documents changes from microsoft/aspire#21590

Author: ``@sebastienros-reviewed``; PR author mention: ```@davidfowl```

Targeting `release/17.0` based on the source PR milestone `17.0` (exact
match).

## Why
The source PR lowers the minimum required Helm version from 4.2.0 to
4.0.0 (any Helm 4 release is accepted; Helm 3.x is still rejected). The
docs still said v4.2.0.

## Changes (updated existing pages)
- `src/frontend/src/content/docs/deployment/kubernetes.mdx`
- `src/frontend/src/content/docs/deployment/kubernetes/clusters.mdx`
- `src/frontend/src/content/docs/deployment/kubernetes/aks.mdx`
- `src/frontend/src/content/docs/integrations/compute/kubernetes.mdx`

> Generated by [PR Documentation
Check](https://github.com/microsoft/aspire/actions/runs/41234250645) for
#21590 · copilot · auto · 22.5 AIC · ⌖ 1.15 AIC · ⊞ 7.1K ·
[◷](https://github.com/search?q=repo%3Amicrosoft%2Faspire.dev+%22gh-aw-workflow-id%3A+pr-docs-check%22&type=pullrequests)

<!-- gh-aw-agentic-workflow: PR Documentation Check, engine: copilot,
model: auto, id: 41234250645, workflow_id: pr-docs-check, run:
https://github.com/microsoft/aspire/actions/runs/41234250645 -->

<!-- gh-aw-workflow-id: pr-docs-check -->
<!-- gh-aw-workflow-call-id: microsoft/aspire/pr-docs-check -->

Co-authored-by: aspire-repo-bot[bot] <268009190+aspire-repo-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minimum Required Hem version is incompatible with github windows images

3 participants