mirror of https://github.com/helm/helm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3.4 KiB
3.4 KiB
PLAN.md — worktree/1: HIP-0025 Subchart Sequencing (Full Stack)
Context
HIP-0025 introduces native resource and subchart sequencing to Helm v4. This worktree implements the complete subchart sequencing pipeline: chart metadata, DAG engine, CLI flag, action layer integration, and release storage.
Spec source: hip-0025/hip-0025.md, hip-0025/subchart-sequencing.md
Delivered
Phase 2: Chart Metadata Extension — DONE
DependsOn []stringfield on v2 + v3Dependencystruct- Sanitization in
Validate() - Files:
pkg/chart/v2/dependency.go,internal/chart/v3/dependency.go
Phase 3: DAG Construction & Topo Sort — DONE
- DAG struct: AddNode, AddEdge, DetectCycles, TopologicalSort, Batches
BuildSubchartDAGcombines DependsOn field + annotation parsingParseDependsOnSubchartsforhelm.sh/depends-on/subchartsannotation- Annotation constants for resource-group sequencing (future use)
- Files:
pkg/chart/v2/util/dag.go,pkg/chart/v2/util/sequencing.go(+ v3 mirrors)
Phase 4: WaitStrategy Extension — DONE
OrderedStrategy WaitStrategy = "ordered"constant- Delegates to StatusWatcher for readiness checks
- CLI accepts
--wait=ordered - Files:
pkg/kube/client.go,pkg/cmd/flags.go
Phase 5: Action System Integration — DONE
performOrderedInstall: deploy resources in DAG batch orderSplitManifestsBySubchart: partition manifest by# Source:commentsBuildInstallBatches: compute ordered batches from chart metadatacreateAndWaitResources: extracted helper for create+wait- Falls back to all-at-once when no sequencing metadata exists
- Files:
pkg/action/install.go,pkg/action/sequencing.go
Phase 6: CLI Integration — DONE (bundled with Phase 4)
--wait=orderedaccepted alongside watcher/hookOnly/legacy- Error messages updated to include ordered option
Phase 7: Release Storage — DONE
SequencingMetadatastruct: enabled, strategy, batches- Persisted in
Release.Sequencingduring ordered install - Enables rollback/uninstall to reconstruct deployment order
- Files:
pkg/release/v1/release.go
Test Coverage
- 10 DAG unit tests (empty, single, linear, diamond, parallel, cycles, self-dep, orphans, complex)
- 7 annotation parsing tests (nil, empty, valid, invalid JSON, etc.)
- 6 BuildSubchartDAG tests (HIP-0025 example, aliases, cycles, unknown refs)
- 7 action sequencing tests (manifest splitting, batch construction, circular deps)
- All existing tests pass — zero regressions
Commits
01fdc96b feat(chart): add DependsOn field and DAG engine for HIP-0025
c8a23f04 feat(kube): add OrderedStrategy WaitStrategy for HIP-0025
1e79330b feat(action): implement ordered subchart install for HIP-0025
7550e729 feat(release): store sequencing metadata in Release
Remaining (future worktrees)
- Resource-group sequencing (within single chart)
- Custom readiness evaluation (helm.sh/readiness-success/failure + JSONPath)
- Upgrade ordered sequencing
- Uninstall/rollback reverse-order logic
helm templateordered output with START/END resource-group comments- Readiness timeout flag (--readiness-timeout)
bd Issues
| ID | Phase | Status |
|---|---|---|
| helm-btq | Phase 2: Chart Metadata | done |
| helm-ed3 | Phase 3: DAG Construction | done |
| helm-40n | Phase 4: WaitStrategy | done |
| helm-fby | Phase 5: Action System | done |
| helm-0d5 | Phase 6: CLI | done |
| helm-7an | Phase 7: Release Storage | done |