Skip to content
Open
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
678c287
docs: document Helm release lifecycle
shirkevich Jul 31, 2026
bd6b390
test: cover Helm release lifecycle in k3s
shirkevich Jul 31, 2026
d51e32b
fix: validate rendered Helm fixtures correctly
shirkevich Aug 1, 2026
b961c24
test: use shared Helm history default
shirkevich Aug 1, 2026
e0735f5
test: streamline Helm lifecycle k3s fixtures
shirkevich Aug 1, 2026
490635b
test: make Helm lifecycle assertions deterministic
shirkevich Aug 1, 2026
edd277a
fix: address Helm lifecycle integration review
shirkevich Aug 1, 2026
94a7a9d
test: assert Helm error context metadata
shirkevich Aug 1, 2026
bf895b8
test: distinguish Helm resource absence errors
shirkevich Aug 1, 2026
879d38e
docs: explain Helm defaults and overrides
shirkevich Aug 1, 2026
1db8f07
test: preload Helm k3s workload images
shirkevich Aug 1, 2026
8ef57a1
test: verify Helm dry-run release state
shirkevich Aug 1, 2026
9c64690
test: cover Helm hooks dependencies and tpl values
shirkevich Aug 1, 2026
db83db5
test: group Helm lifecycle imports
shirkevich Aug 1, 2026
2040723
test: assert Helm lifecycle timeout failure
shirkevich Aug 1, 2026
aa75a3e
test: pin Helm toolchain dependency build
shirkevich Aug 1, 2026
5f0fd28
test: use provisioned Helm for dependency build
shirkevich Aug 1, 2026
da35278
test: remove redundant Helm tool dependencies
shirkevich Aug 1, 2026
405c913
test: disable color in lifecycle error assertion
shirkevich Aug 1, 2026
3efa0a0
docs: clarify Helm cleanup-on-fail behavior
shirkevich Aug 1, 2026
e635b57
test: tighten Helm lifecycle failure coverage
shirkevich Aug 1, 2026
d465197
docs: exercise opt-in Helm dependency updates
shirkevich Aug 1, 2026
20a1821
docs: clarify Helm example wait strategy
shirkevich Aug 1, 2026
ed2331a
test: tolerate wrapped Helm timeout details
shirkevich Aug 1, 2026
80ac62b
test: verify failed Helm upgrade cause
shirkevich Aug 1, 2026
fbf7b9c
test: fail Helm dry-run check on query errors
shirkevich Aug 1, 2026
ad6b34d
docs: document Helm apply dry-run
shirkevich Aug 1, 2026
0cc088d
test: keep Helm release query logs separate
shirkevich Aug 1, 2026
c7b6cba
test: stabilize macOS Helm lifecycle smoke
shirkevich Aug 1, 2026
746fdad
docs: align Helm smoke test budgets
shirkevich Aug 1, 2026
7b5c1ba
test: verify Helm lifecycle map ownership
shirkevich Aug 1, 2026
08d8262
test: extend macOS Helm smoke budget
shirkevich Aug 1, 2026
d8004af
test: bound k3s diagnostics and cleanup
shirkevich Aug 1, 2026
4c0ee8b
test: cover helm lifecycle summaries
shirkevich Aug 1, 2026
dd26fbc
test: strengthen helm lifecycle fixtures
shirkevich Aug 1, 2026
3fe8b43
test: tighten helm lifecycle coverage
shirkevich Aug 1, 2026
7bf6eea
test: allow macos rollout convergence
shirkevich Aug 2, 2026
57b5764
test: preserve offline helm rendering
shirkevich Aug 2, 2026
a955957
test: distinguish helm query failures
shirkevich Aug 2, 2026
ace29d4
test: assert helm summary lifecycle rows
shirkevich Aug 2, 2026
9df4757
test: cover Helm install lifecycle summary
shirkevich Aug 2, 2026
ead8862
feat: add aggregate Helm CI summaries
shirkevich Aug 2, 2026
2014df0
test: validate Helm DAG deployment readiness
shirkevich Aug 3, 2026
571e853
refactor: extract Helm CI collector setup
shirkevich Aug 3, 2026
b6b7c90
fix: harden Helm aggregate failure reporting
shirkevich Aug 3, 2026
a5894a7
fix: address final Helm lifecycle review findings
shirkevich Aug 3, 2026
323180c
docs: adopt Helm on_failure actions
shirkevich Aug 3, 2026
008d6e7
docs: align Helm examples with release hierarchy
shirkevich Aug 4, 2026
187ceec
fix: report effective Helm timeout source
shirkevich Aug 4, 2026
03d7f99
fix: harden aggregate Helm result reporting
shirkevich Aug 4, 2026
2a4a77a
fix: preserve Helm timeout error context
shirkevich Aug 5, 2026
a4e3bde
fix: track native Helm values files as affected
shirkevich Aug 5, 2026
c9ca2c2
fix: report Helm lifecycle and reverse delete order
shirkevich Aug 5, 2026
2be60fd
test: address Helm lifecycle review feedback
shirkevich Aug 6, 2026
fec8503
test: cover portable Helm smoke paths
shirkevich Aug 6, 2026
63d870f
docs: align Helm lifecycle review details
shirkevich Aug 6, 2026
8dee762
fix: keep Helm lifecycle tables lintable
shirkevich Aug 6, 2026
1c61fde
test: cover typed Helm values file lists
shirkevich Aug 6, 2026
63ff5bd
test: stabilize Helm Job teardown
shirkevich Aug 6, 2026
ad465c1
test: stabilize k3s Helm teardown strategy
shirkevich Aug 6, 2026
784d37a
test: allow Helm timeout recovery to finish
shirkevich Aug 6, 2026
ed44f4a
refactor: isolate Helm lifecycle test scenario
shirkevich Aug 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,10 @@ jobs:
- demo-helmfile
- helm

timeout-minutes: 60
# The macOS matrix may spend up to 45 minutes starting Colima, followed by
# two bounded 45-minute test attempts. Keep the job ceiling above those
# nested budgets so the second retry can finish and emit diagnostics.
timeout-minutes: 180
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down Expand Up @@ -644,23 +647,36 @@ jobs:
}

cleanup_k3s() {
atmos emulator down kubernetes -s dev || true
docker rm -f atmos-dev-emulator-kubernetes >/dev/null 2>&1 || true
run_with_timeout 60 atmos emulator down kubernetes -s dev || true
run_with_timeout 30 docker rm -f atmos-dev-emulator-kubernetes >/dev/null 2>&1 || true
}

diagnose_k3s() {
if ! run_with_timeout 15 docker inspect atmos-dev-emulator-kubernetes >/dev/null 2>&1; then
return
fi

echo "::group::k3s workload diagnostics"
run_with_timeout 30 docker exec atmos-dev-emulator-kubernetes kubectl get pods,jobs,deployments -A -o wide || true
run_with_timeout 30 docker exec atmos-dev-emulator-kubernetes kubectl get events -A --sort-by=.lastTimestamp || true
run_with_timeout 30 docker exec atmos-dev-emulator-kubernetes ctr --namespace k8s.io images list || true
echo "::endgroup::"
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.

# macOS k3s jobs can occasionally hang in the Docker/Colima stack.
# Bound each attempt so the matrix can retry instead of consuming the
# whole job timeout and cancelling the required aggregate check.
attempt_timeout=1500
if [ "${{ matrix.flavor.target }}" = "macos" ]; then
attempt_timeout=900
attempt_timeout=2700
fi

trap cleanup_k3s EXIT
for attempt in 1 2; do
run_with_timeout "${attempt_timeout}" atmos test && exit 0
status=$?
echo "atmos test failed (attempt ${attempt}/2, status ${status})" >&2
diagnose_k3s
Comment thread
coderabbitai[bot] marked this conversation as resolved.
cleanup_k3s
[ "${attempt}" -lt 2 ] && sleep 15
done
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ repos:
stages: [pre-commit]
exclude: ^(vendor/|tests/test-cases/|tests/testdata/|tests/snapshots/|.*\.svg|website/src/components/Screengrabs/)
- id: check-yaml
exclude: ^(vendor/|tests/test-cases/|tests/testdata/|tests/snapshots/|tests/fixtures/)
exclude: ^(vendor/|tests/test-cases/|tests/testdata/|tests/snapshots/|tests/fixtures/|examples/helm/components/helm/demo/templates/)
args: [--allow-multiple-documents, --unsafe]
- id: check-added-large-files
stages: [pre-commit]
Expand Down
36 changes: 36 additions & 0 deletions docs/fixes/2026-07-31-native-helm-release-lifecycle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Native Helm release lifecycle

**Date:** 2026-07-31

Native Helm cluster operations now expose Helm 4 wait, timeout, recovery,
history, hook, and CRD controls through stack configuration and explicit command
flags. Apply and delete dry runs now reach the Helm SDK without persisting release
state. Caller cancellation propagates through direct and dependency-ordered
execution into install and upgrade actions and into delete wait and hook phases;
Helm 4 does not expose a context-aware uninstall request.

Atmos reports the selected action and effective release policy before the Helm
action begins, including any `hookOnly` to `watcher` promotion required by
failure recovery. Bulk delete uses reverse dependency order so dependents are
removed before the releases they consume.

## Migration notes

- An omitted `release.timeout` remains `0s` (unbounded) for one minor release and emits a
warning. The omitted default becomes `5m` in the following minor. Configure
`release.timeout: 0s` explicitly to keep unbounded behavior without the warning.
- An omitted `release.history.max` retains ten upgrade revisions, matching the
Helm CLI. Configure `release.history.max: 0` to retain unlimited history.
- Failure recovery is operation-specific: use `release.install.on_failure: uninstall`
for failed first installs and `release.upgrade.on_failure: rollback` for failed
upgrades. Upgrade cleanup is controlled independently by
`release.upgrade.cleanup_on_failure`.
- Boolean `--wait=true` and `--wait=false` remain accepted temporarily; use
`--wait=watcher` and `--wait=hookOnly`.
- Explicit lifecycle flags cannot be combined with a non-Kubernetes provision
target. Stored lifecycle configuration is intentionally bypassed for external
delivery and is identified as such in the execution summary.
- Chart-loading commands do not fetch missing dependencies unless
`--dependency-update` is explicitly supplied. The opt-in follows Helm's
dependency-update behavior and may access repositories and mutate the chart's
`charts/` directory and lock file.
4 changes: 1 addition & 3 deletions docs/prd/native-helm-release-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ These gaps force users migrating from Helm or Helmfile to choose between depende
- Fix apply dry-run propagation as a release-blocking safety prerequisite, then correctly propagate delete dry-run, cancellation, and deadlines through cluster operations.
- Validate configuration before chart download or cluster mutation.
- Keep template and diff complete by including Helm chart hook resources alongside the ordinary release manifest.
- Allow callers to opt into fetching missing chart dependencies with Helm-compatible `--dependency-update` semantics.
- Keep the design compatible with future pre-rollback diagnostics without requiring another public configuration rename.
- Follow Atmos schema, stack-processing, command parsing, provider, error, logging, and testing conventions.

Expand Down Expand Up @@ -240,8 +239,6 @@ atmos helm delete demo-api -s example-prod \

`template`, `diff`, and `plan` do not register release-lifecycle flags because they do not perform a release operation.

All chart-loading operations (`template`, `diff`, `plan`, `apply`, and `deploy`) accept `--dependency-update`. Atmos invokes Helm's dependency manager only when a declared dependency is missing. The flag is intentionally invocation-scoped: without it, Atmos does not access dependency repositories or mutate the chart directory and instead reports both the equivalent `helm dependency build <chart>` command and the opt-in flag.

## Configuration Contract

### Release-Wide Defaults
Expand Down Expand Up @@ -372,6 +369,7 @@ The following rules apply:
- A release that fails and is successfully rolled back still returns failure to the scheduler.
- A rollback or uninstall failure preserves the original release failure and adds the recovery failure.
- Dependents never run after timeout, failed readiness, failed hooks, failed rollback, or cancellation.
- Bulk delete traverses the selected graph in reverse topological order so dependents are removed before their dependencies.
- A future mixed-kind scheduler consumes the same provider result; it must not reinterpret Helm readiness.

## Timeout Semantics
Expand Down
1 change: 1 addition & 0 deletions errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,7 @@ var (
ErrHelmReleaseHistory = errors.New("failed to inspect helm release history")
ErrHelmReleaseUpgrade = errors.New("failed to upgrade helm release")
ErrHelmReleaseUninstall = errors.New("failed to uninstall helm release")
ErrHelmReleaseOperation = errors.New("helm release operation failed")
)

// Stack dependency (`depends_on`) resolution errors.
Expand Down
22 changes: 19 additions & 3 deletions examples/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ Run the local chart workflow end to end:

```shell
atmos validate stacks
atmos helm template demo -s dev
atmos helm template demo -s dev --dependency-update
atmos emulator up kubernetes -s dev
atmos helm diff demo -s dev --identity local-k3s
atmos helm apply demo -s dev --identity local-k3s
atmos helm apply demo -s dev --identity local-k3s --dry-run
atmos helm apply demo -s dev --identity local-k3s --on-failure=uninstall --wait=watcher --timeout=2m
atmos emulator exec kubernetes -s dev -- kubectl -n demo get deployment demo
atmos emulator exec kubernetes -s dev -- kubectl -n demo get service demo
atmos helm delete demo -s dev --identity local-k3s --dry-run --wait=watcher --timeout=2m
atmos helm delete demo -s dev --identity local-k3s
atmos emulator down kubernetes -s dev
```
Expand All @@ -33,7 +35,7 @@ this same lifecycle.
## Render (no cluster, no credentials)

```shell
atmos helm template demo -s dev
atmos helm template demo -s dev --dependency-update

# Render the same chart through a declarative Helm repository.
HELM_DEMO_REPO_URL=http://127.0.0.1:8080 atmos helm template demo-repo -s dev
Expand Down Expand Up @@ -69,6 +71,20 @@ atmos emulator up kubernetes -s dev
atmos helm apply demo -s dev --identity local-k3s
```

The stack sets `release.wait.strategy: watcher`, `release.timeout: 4m`,
`release.history.max: 10`, and `release.install.crds: skip` as native Helm type
defaults. The `demo` component overrides the wait strategy to `legacy`, uses
install uninstall-on-failure, and enables upgrade rollback with independent
failed-upgrade cleanup. The `atmos test` workflow
covers non-mutating apply and delete dry runs, ordinary Job waiting, chart-hook
suppression, CRD skipping, weighted hook ordering, retained hook resources,
install and upgrade rollback, failed-upgrade cleanup, timeout handling, and
dependency-gated Helm releases. Rendering also verifies opt-in acquisition of a
missing `file://` library dependency, hook manifests, and a Helm `tpl` expression
preserved in stack values.
The intentionally slow resources are observed
with bounded Kubernetes readiness checks rather than fixed-delay assertions.

## Helm Repositories

The `demo-repo` component shows the declarative Helm repository path:
Expand Down
Loading
Loading