Skip to content

docs: define native Helm release lifecycle - #2846

Open
Mikhail Shirkov (shirkevich) wants to merge 11 commits into
mainfrom
codex/helm-lifecycle-prd
Open

docs: define native Helm release lifecycle#2846
Mikhail Shirkov (shirkevich) wants to merge 11 commits into
mainfrom
codex/helm-lifecycle-prd

Conversation

@shirkevich

@shirkevich Mikhail Shirkov (shirkevich) commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

what

  • Define the product requirements for native Helm release lifecycle controls in Atmos.
  • Specify configuration precedence, inheritance, Helm 4 SDK mappings, migration behavior, failure semantics, cancellation, observability, and deterministic integration coverage.
  • Establish the completion contract for native Helm components participating in dependency-ordered execution.

This is 1 of 4 in the native Helm lifecycle stack:

  1. docs: define native Helm release lifecycle #2846 — PRD and public contract
  2. feat: implement native Helm release lifecycle controls #2847 — lifecycle model, schema, CLI, and Helm actions
  3. feat: propagate component execution context #2848 — execution context and cancellation propagation
  4. feat: add Helm lifecycle reporting and integration coverage #2849 — operational reporting, documentation, and integration coverage

why

  • Native Helm currently exposes install, upgrade, and delete operations without a complete release-lifecycle policy surface.
  • Apply dry-run propagation, readiness selection, rollback, cleanup, history retention, hooks, CRDs, and cancellation need one reviewed contract before their implementation is released.
  • A documented contract keeps Atmos behavior aligned with Helm 4 while preserving Atmos stack inheritance and dependency execution conventions.

validation

  • Compared the design with the current native Helm implementation and Helm 4.2.1 SDK fields.
  • Followed existing Atmos PRD structure and repository coding conventions.
  • Kept related links limited to documents and pull requests already present in the repository.

references

Summary by CodeRabbit

  • Documentation
    • Added a draft product requirements document for configurable native Helm release lifecycle behavior.
    • Documented options for waiting, timeouts, rollbacks, cleanup, history limits, CRD handling, dry runs, cancellation, validation, observability, compatibility, and testing.
    • Defined configuration precedence, command-line overrides, operation applicability, external-target handling, action mappings, and DAG completion behavior.
    • Outlined implementation phases, success criteria, risks, and deferred work.

@atmos-pro

atmos-pro Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@github-actions github-actions Bot added the size/m Medium size PR label Jul 31, 2026
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@shirkevich

Copy link
Copy Markdown
Collaborator Author

CodeRabbit (@coderabbitai) full review

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PRD defines configurable native Helm release lifecycle behavior, including configuration, resolution, execution semantics, command interfaces, validation, testing, implementation phases, and deferred work.

Changes

Native Helm release lifecycle

Layer / File(s) Summary
Lifecycle configuration model
docs/prd/native-helm-release-lifecycle.md
Defines lifecycle scopes, fields, aliases, defaults, Helm mappings, validation rules, and compatibility semantics.
Lifecycle resolution and execution semantics
docs/prd/native-helm-release-lifecycle.md
Defines wait strategies, precedence, target applicability, DAG completion, timeout handling, cancellation, and dependent-node behavior.
Helm operations and command interfaces
docs/prd/native-helm-release-lifecycle.md
Defines dry-run behavior, failure recovery, lifecycle structures, action mappings, command flags, summaries, compatibility, and security constraints.
Validation and delivery plan
docs/prd/native-helm-release-lifecycle.md
Defines test coverage, implementation phases, risks, success criteria, and deferred capabilities.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: no-release

Suggested reviewers: aknysh

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the PRD that defines native Helm release lifecycle behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/helm-lifecycle-prd

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/prd/native-helm-release-lifecycle.md`:
- Line 5: Update the “Last Updated” metadata in the native Helm release
lifecycle PRD to the actual date this PRD was most recently changed, ensuring it
is not a future date relative to the review date.
- Line 348: Fix whitespace in docs/prd/native-helm-release-lifecycle.md by
replacing tab indentation in the Go example around lines 420-433 with spaces and
correcting the padding on the diagram line containing helm/dependent-release,
while preserving the diagram alignment and example formatting.
- Around line 360-373: Update the Helm action mapping documentation around
releaseLifecycle and the action mapping table to explicitly state whether
dry-run remains outside releaseLifecycle, while documenting its required
propagation for apply and delete. Extend the mapping to cover rollback and align
each install, upgrade, rollback, and uninstall command with its provider
operation and Helm action timeout recovery behavior.
- Around line 176-185: Update the lifecycle CLI examples in the PRD to use only
currently supported flag syntax, or first add the corresponding lifecycle flag
builders and tests under the existing Boolean flag contract. Ensure examples do
not prescribe `=false` forms unless those flags explicitly support consuming
boolean values, including `--rollback-on-failure`, `--wait-for-jobs`, and
`--disable-chart-hooks`.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0e9e5e11-25a4-43b1-89db-7f1c138a2313

📥 Commits

Reviewing files that changed from the base of the PR and between 4706634 and 2979415.

📒 Files selected for processing (1)
  • docs/prd/native-helm-release-lifecycle.md

Comment thread docs/prd/native-helm-release-lifecycle.md Outdated
Comment thread docs/prd/native-helm-release-lifecycle.md Outdated
Comment thread docs/prd/native-helm-release-lifecycle.md Outdated
@shirkevich

Copy link
Copy Markdown
Collaborator Author

CodeRabbit (@coderabbitai) full review

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 34 minutes.

@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.76%. Comparing base (c14ce82) to head (63475cf).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2846      +/-   ##
==========================================
+ Coverage   82.75%   82.76%   +0.01%     
==========================================
  Files        1860     1860              
  Lines      180240   180240              
==========================================
+ Hits       149150   149175      +25     
+ Misses      23306    23283      -23     
+ Partials     7784     7782       -2     
Flag Coverage Δ
unittests 82.76% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shirkevich

Copy link
Copy Markdown
Collaborator Author

CodeRabbit (@coderabbitai) full review

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/prd/native-helm-release-lifecycle.md`:
- Around line 375-390: The Context and Cancellation section must not promise
cancellation of in-flight Helm SDK actions unless implementation owns and waits
for their worker goroutines. Update the PRD’s Helm propagation and rollback
requirements to state that caller cancellation stops waiting and prevents or
cancels rollback attempts, while an already-running Install or Upgrade action
may continue; alternatively require explicit worker ownership and waiting before
returning.
- Line 482: Update the dry-run propagation requirement in the
command-to-provider path: map apply/deploy operations to Helm’s
Install.DryRunStrategy or Upgrade.DryRunStrategy fields, and map delete
operations to Uninstall.DryRun. Remove references to the non-existent
Install.DryRun and Upgrade.DryRun fields while keeping dry-run independent of
releaseLifecycle.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0d02114b-9e50-4a64-8907-bbe880171e52

📥 Commits

Reviewing files that changed from the base of the PR and between 4706634 and 1b7cf18.

📒 Files selected for processing (1)
  • docs/prd/native-helm-release-lifecycle.md

Comment thread docs/prd/native-helm-release-lifecycle.md Outdated
Comment thread docs/prd/native-helm-release-lifecycle.md Outdated
@shirkevich

Copy link
Copy Markdown
Collaborator Author

CodeRabbit (@coderabbitai) full review

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

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

🧹 Nitpick comments (1)
docs/prd/native-helm-release-lifecycle.md (1)

587-588: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Add a direct test for internal rollback mapping.

The Helm action table has a separate rollback row at Line 488, but the unit-test requirements at Lines 587-588 name only install, upgrade, and delete mappings.

Add a deterministic test that verifies internal rollback receives the documented timeout and wait configuration. Also verify that successful recovery still returns the original upgrade failure.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/prd/native-helm-release-lifecycle.md` around lines 587 - 588, Add a
deterministic unit test for the internal rollback path described by the Helm
action table, verifying rollback receives the documented timeout and wait
configuration. Make the upgrade fail, confirm rollback succeeds with those
mapped options, and assert the overall operation still returns the original
upgrade error rather than the rollback result.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/prd/native-helm-release-lifecycle.md`:
- Around line 587-588: Add a deterministic unit test for the internal rollback
path described by the Helm action table, verifying rollback receives the
documented timeout and wait configuration. Make the upgrade fail, confirm
rollback succeeds with those mapped options, and assert the overall operation
still returns the original upgrade error rather than the rollback result.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 078e5902-8766-4dcd-b290-7ef67601cf81

📥 Commits

Reviewing files that changed from the base of the PR and between 4706634 and a743f12.

📒 Files selected for processing (1)
  • docs/prd/native-helm-release-lifecycle.md

@shirkevich

Copy link
Copy Markdown
Collaborator Author

CodeRabbit (@coderabbitai) full review

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 42 minutes.

@shirkevich

Copy link
Copy Markdown
Collaborator Author

CodeRabbit (@coderabbitai) full review

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

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

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/prd/native-helm-release-lifecycle.md`:
- Line 297: Update the cleanup_on_fail behavior and upgrade-architecture
descriptions to state that cleanup is applied when configured, independently of
rollback_on_failure. Ensure failed new resources are cleaned up with both
rollback enabled and disabled, and add coverage for both scenarios.
- Around line 291-300: Update the upgrade summary example to use the canonical
disable_chart_hooks and skip_crds fields, and remove install_crds because
skip_crds is not applicable to upgrades. Alternatively, change the example to an
install operation where skip_crds applies, or explicitly define any derived
report keys and their applicability.
- Around line 213-219: The release lifecycle documentation must not claim delete
remains bounded when timeout: 0s disables Helm’s uninstall timeout and the SDK
lacks context propagation. Update the timeout requirements and corresponding
guidance around the timeout behavior section and the referenced delete section
to either reject zero for delete, define a separate bounded caller cancellation,
or explicitly document and test the unbounded-wait limitation.
- Around line 360-373: Update the “Timeout Semantics” documentation to
explicitly exclude installed CRD installation and readiness waiting from the
release timeout guarantee, or define a separate CRD-readiness timeout if the
implementation supports one. Clarify the distinction from Helm’s
install/upgrade/delete operation timeout and add a test using the existing CRD
fixture to verify the documented behavior.
- Around line 275-285: Update the native Helm boolean flag documentation around
the precedence and flag table to define how users explicitly set every lifecycle
boolean to false, including supported negative flags or an explicit =false form.
Ensure the documented behavior allows command-line false values to override
stack-level true settings, and add coverage for each Boolean lifecycle flag.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 44fa9626-d336-4d56-8531-70386aa28b7d

📥 Commits

Reviewing files that changed from the base of the PR and between 00784e4 and 7bb44fc.

📒 Files selected for processing (1)
  • docs/prd/native-helm-release-lifecycle.md

Comment thread docs/prd/native-helm-release-lifecycle.md Outdated
Comment thread docs/prd/native-helm-release-lifecycle.md Outdated
Comment thread docs/prd/native-helm-release-lifecycle.md Outdated
Comment thread docs/prd/native-helm-release-lifecycle.md Outdated
Comment thread docs/prd/native-helm-release-lifecycle.md
@shirkevich

Copy link
Copy Markdown
Collaborator Author

CodeRabbit (@coderabbitai) full review

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 48 minutes.

@shirkevich

Copy link
Copy Markdown
Collaborator Author

CodeRabbit (@coderabbitai) full review

@shirkevich
Mikhail Shirkov (shirkevich) marked this pull request as ready for review August 3, 2026 13:20
@shirkevich
Mikhail Shirkov (shirkevich) requested a review from a team as a code owner August 3, 2026 13:20
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 3, 2026
Comment thread docs/prd/native-helm-release-lifecycle.md Outdated
Comment thread docs/prd/native-helm-release-lifecycle.md Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 3, 2026
@shirkevich

Copy link
Copy Markdown
Collaborator Author

Erik Osterman (Cloud Posse) (@osterman), the two on_failure conversations are implemented and resolved on the current head. The PRD now uses on_failure: [rollback, cleanup], and the contract has been propagated through the implementation stack. Could you please re-review the PRD when convenient?

@osterman

Copy link
Copy Markdown
Member

CodeRabbit (@coderabbitai) here's what I propose. What do you think?

The shape of the lifecycle configuration

I want to agree on the shape of this configuration before we merge the PRD.

The current design puts ten lifecycle fields directly on the component. These fields are siblings of chart and namespace. This is a flat namespace. A flat namespace cannot show which operation each field controls.

The PRD shows this problem in two places:

  1. The Operation Applicability table. This table is prose. It tells the reader that cleanup_on_fail applies only to upgrade. It tells the reader that skip_crds applies only to install. The schema cannot enforce these rules.
  2. The Alias Resolution section. This section gives precedence rules for atomic and for wait. A hierarchy removes the need for most of these rules.

The field names show the same problem. We must use the name cleanup_on_fail, because the name cleanup does not tell the reader when the cleanup occurs. We must use the name disable_chart_hooks, because Atmos components already have a hooks section.

Terminology and structure are different

The Design Principles section says that Helm 4 terminology is canonical. I agree with this rule for the names. I do not agree with this rule for the structure.

Helm has a flat structure because Helm is a command-line program. Command-line flags cannot have a hierarchy. Atmos configuration is YAML, and YAML has a hierarchy.

We can keep the Helm names. We can also reject the Helm structure. Please make this difference clear in the Design Principles section.

The proposed structure

Flux solves the same problem in the HelmRelease resource. Flux groups the fields by operation. Each operation has its own timeout, hook control, and failure policy. Flux keeps the release-wide fields, such as maxHistory, at the top level.

I propose the same approach for Atmos:

components:
  helm:
    demo-api:
      chart: oci://registry.invalid/charts/demo-api
      version: 1.2.3
      namespace: demo

      release:
        # Release-wide defaults. Each operation section inherits these values.
        timeout: 10m
        chart_hooks: true
        wait:
          strategy: watcher       # watcher | hookOnly | legacy
          jobs: true
        history:
          max: 10

        install:
          crds: create            # create | replace | skip
          on_failure: uninstall   # uninstall | keep

        upgrade:
          timeout: 30m
          on_failure: rollback    # rollback | uninstall | keep
          cleanup_on_failure: true

        rollback:
          timeout: 5m
          cleanup_on_failure: true

        delete:
          timeout: 5m
          chart_hooks: false

Stack-level defaults keep the usual component short:

helm:
  release:
    timeout: 10m
    wait:
      strategy: watcher
    history:
      max: 10
    upgrade:
      on_failure: rollback

components:
  helm:
    demo-api:
      chart: charts/demo-api
      namespace: demo
      release:
        upgrade:
          timeout: 30m

This structure is still a component-owned field. It does not use settings.helm. The rule in the Design Principles section stays correct.

The effects of this change

  • The Operation Applicability table becomes the schema. The field crds occurs only in the install section. The field cleanup_on_failure occurs only in the upgrade and rollback sections. Atmos can reject an incorrect field. Atmos does not ignore it.
  • The field on_failure becomes an enum. The section supplies the scope, so a list is not necessary. The value uninstall applies to a failed install. The value rollback applies to a failed upgrade.
  • The names become simple. Use chart_hooks in place of disable_chart_hooks. Use crds in place of skip_crds. Both names are positive, and neither name is a double negative.
  • The aliases atomic and wait are not necessary in YAML. Keep these aliases for the command-line flags only, where Helm parity is important.
  • The deferred fields have a location. Add delete.keep_history, upgrade.force, and install.create_namespace later. These additions do not break the existing configuration.

Three questions for the PRD

  1. Flag precedence. The apply command does not know if the operation is an install or an upgrade until Atmos reads the release state. Therefore a flag cannot select a section. I propose this rule: a flag overrides the release-level default, but an explicit section value overrides the flag. Please write the selected rule in the Precedence section.
  2. Merge order. Atmos must resolve stack inheritance for the full release tree first. Atmos must then apply each section value over the release-level default. An abstract component can set release.timeout, and a concrete component can set release.upgrade.timeout. The PRD must give the result for this case.
  3. Rollback configuration. The current design has no configuration for the rollback operation. The rollback uses the timeout of the upgrade. A 30-minute timeout is too long for a rollback during an incident. Flux gives the rollback its own section. I recommend that we do the same.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

prd="$(fd -a '^native-helm-release-lifecycle\.md$' docs 2>/dev/null | head -n1)"
if [ -z "$prd" ]; then
  echo "PRD file not found"
  exit 0
fi

echo "== PRD =="
echo "$prd"
echo
echo "== Outline =="
ast-grep outline "$prd" --lang markdown --items all 2>/dev/null || true
echo
echo "== Relevant headings and configuration terms =="
rg -n -i -C 3 \
  '^(#{1,6} )|cleanup_on_fail|skip_crds|disable_chart_hooks|on_failure|atomic|wait|precedence|inherit|rollback|timeout|max_history|history|flag|install|upgrade|uninstall|delete|CRD|Helm.*4|action\.' \
  "$prd"

echo
echo "== Repository references to lifecycle config or Helm action options =="
rg -n -i -C 2 \
  'cleanup_on_fail|skip_crds|disable_chart_hooks|on_failure|native Helm|HelmRelease|WaitStrategy|Upgrade.*Options|Install.*Options|Rollback.*Options|Uninstall.*Options' \
  -g '!docs/prd/native-helm-release-lifecycle.md' \
  . || true

Length of output: 201283


🏁 Script executed:

#!/bin/bash
set -euo pipefail

prd="docs/prd/native-helm-release-lifecycle.md"

echo "== PRD headings =="
rg -n '^#{1,6} ' "$prd"

echo
echo "== PRD: configuration through precedence =="
sed -n '1,360p' "$prd"

echo
echo "== PRD: operation mapping, compatibility, and implementation sections =="
sed -n '360,760p' "$prd"

echo
echo "== Native Helm inherited field keys =="
sed -n '285,345p' internal/exec/stack_processor_process_stacks_helpers_extraction.go

echo
echo "== Current Helm action configuration =="
sed -n '55,190p' pkg/component/helm/client.go

echo
echo "== Apply operation selection =="
sed -n '175,225p' pkg/component/helm/executor.go

Length of output: 57102


@osterman I support the release tree.

It is a better public contract than the current flat fields. It makes the operation scope visible in configuration and enforceable in the schema. It also gives deferred fields stable locations.

I recommend these decisions:

  1. Use release with operation sections.
    Keep release-wide fields at release.*. Put operation-specific fields only in release.install, release.upgrade, release.rollback, and release.delete.

  2. State the design rule explicitly.
    Helm terminology is canonical for concepts and values. Atmos uses a hierarchical YAML structure because it is a declarative configuration API, not a CLI flag surface.

  3. Use positive YAML names.
    chart_hooks and crds are clearer than disable_chart_hooks and skip_crds. The schema prevents conflict with Atmos hooks, because chart_hooks exists only under release.

  4. Resolve configuration in two stages.

    • First, perform normal Atmos deep merge on the complete release tree across type defaults, inheritance, and the concrete component.
    • Then, resolve the selected operation by overlaying release.<operation> onto the merged release-wide defaults.

    Therefore, this configuration resolves timeout to 30m for an upgrade:

    release:
      timeout: 10m
      upgrade:
        timeout: 30m
  5. Keep CLI flags highest priority.
    A generic --timeout does not need to choose install or upgrade before state lookup. Atmos can select the operation first, resolve its effective policy, and then apply explicit CLI flags.

    I would retain this order:

    built-in defaults
    < stack and component merged release tree
    < selected operation section
    < explicit CLI flags
    

    The proposed inverse rule, where an operation section overrides a flag, makes an emergency CLI override unreliable. It also conflicts with the current PRD principle that flags override one invocation.

  6. Do not add an independently effective rollback section unless R1 performs an explicit rollback action.
    The current PRD maps Upgrade.RollbackOnFailure to Helm-managed recovery. That rollback inherits the upgrade action configuration. A release.rollback.timeout: 5m cannot change that internal rollback timeout by itself.

    There are two valid contracts:

    • R1: omit release.rollback and state that built-in rollback uses the effective upgrade settings.
    • Later release: add release.rollback only with Atmos-managed rollback, including its own context, timeout, wait strategy, reporting, and failure behavior.

    I recommend the first option for this PRD. It avoids publishing a setting that has no effect.

  7. Define on_failure per operation, but constrain each enum to supported behavior.
    install.on_failure: uninstall | keep is clear. upgrade.on_failure: rollback | keep is clear. Keep upgrade.cleanup_on_failure as a separate Boolean because Helm exposes it independently from rollback.

    I would not include upgrade.on_failure: uninstall unless Atmos explicitly implements that recovery path and documents its release-history behavior. The current Helm action mapping only provides rollback-on-failure and upgrade cleanup.

  8. Retain no YAML aliases for atomic or wait.
    The tree removes the need for them. Keep Helm-compatible forms only on the CLI if they remain useful.

One additional schema rule is needed: each operation object must reject unknown keys with additionalProperties: false. Otherwise, the hierarchy improves readability but does not enforce applicability.

This direction should replace the flat contract before merge. The only part I would defer is the effective rollback section until the implementation owns rollback as a separate operation.

You are interacting with an AI system.

@shirkevich

Mikhail Shirkov (shirkevich) commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

Erik Osterman (Cloud Posse) (@osterman), I updated the PRD through 3cddb26 to adopt the proposed release hierarchy, with the two amendments from the follow-up analysis:

  • normal Atmos deep merge of the full tree, then selected-operation overlay, then explicit CLI flags last;
  • no release.rollback in R1 because Helm-managed Upgrade.RollbackOnFailure inherits the effective upgrade action settings.

The contract now has release-wide defaults plus install, upgrade, and delete sections; per-operation timeouts; positive chart_hooks/crds names; scoped on_failure enums; independent upgrade cleanup; strict nested schemas; and install.crds: create | skip only.

Flux provides the relevant operation-scoped controller precedent. The POC-specific need is represented generically as a 60-minute first install, 10-minute cached upgrade, and 5-minute delete. Rendering, values, hooks, !include.raw, and dependency handling remain unchanged below this layer.

Prettier and git diff --check pass. Could you rereview the revised contract? I have not retriggered CodeRabbit.

@shirkevich

Copy link
Copy Markdown
Collaborator Author

Erik Osterman (Cloud Posse) (@osterman), the revised release-policy proposal is ready for rereview at 3cddb26. It incorporates your hierarchical release model, keeps explicit CLI overrides highest, and defers release.rollback until Atmos owns rollback as a separate action. The examples and rationale have also been tightened to the Flux precedent and generic POC requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-release Do not create a new release (wait for additional code changes) size/m Medium size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants