Skip to content

fix(hooks): user-defined hooks now fire under bulk dispatch - #2736

Merged
Andriy Knysh (aknysh) merged 7 commits into
mainfrom
osterman/create-pr-v1
Jul 14, 2026
Merged

Andriy Knysh (aknysh) merged 7 commits into
mainfrom
osterman/create-pr-v1

Conversation

@osterman

@osterman Erik Osterman (Cloud Posse) (osterman) commented Jul 12, 2026 •

Copy link
Copy Markdown
Member

what

  • Component hooks: (the user-defined hooks.RunAll engine) now fire for atmos terraform apply/plan/deploy under --all, --affected, --components, and --query — previously they silently never ran in these bulk modes, only for single-component invocations.
  • Adds a schema.ComponentNodeHooks interface (Before/After) wired into the scheduler's TerraformDispatcher.Dispatch — the one choke point shared by every bulk dispatch path — via a new pkg/hooks.RunPerComponentHooks helper.
  • A before-hook failure now aborts that component's execution before Terraform ever runs; an after-hook failure fails that component even if Terraform itself succeeded. Both respect each hook's existing on_failure: fail|warn|ignore setting rather than introducing new failure semantics.
  • Helmfile gets the same ComponentNodeHooks wiring, which is actually its first user-defined hook support of any kind (it previously had none, single- or multi-component).
  • A second commit removes ~2,260 net lines of confirmed-dead legacy sequential executor code and its now-orphaned tests (terraform_executor.go, terraform_affected_graph.go, the associated _test.go files, and orphaned helpers in terraform_utils.go/terraform_affected.go) that predated the scheduler-based dispatch path and had no live (non-test) callers left.

why

  • A before.terraform.apply hook (e.g. zipping a Lambda handler before apply) worked correctly under atmos terraform apply <component> -s <stack> but silently never ran under atmos terraform deploy --all -s <stack> for the identical component/stack/hook config — the subsequent apply then failed because the hook's output never existed. This is exactly how CI normally invokes Atmos, so any hook-dependent component broke the moment it moved from manual single-component testing to a real pipeline run.
  • Root cause: bulk dispatch only ever wired a CI-reporting callback (hooks.RunCIHooks), never the user-defined hook engine (hooks.RunAll), and had no "before" seam of any kind — the code itself documented this as a known, unfixed limitation.
  • The dead-code removal is split into its own commit so the behavior change stays independently bisectable from the pure deletion; both were confirmed dead via call-graph analysis before removal (only test-file callers remained).

references

  • N/A

Deletes internal/exec/terraform_executor.go and
terraform_affected_graph.go, plus the orphaned processTerraformComponent/
executeTerraformAffectedComponentInDepOrder/executeAffectedComponents chain
in terraform_utils.go and terraform_affected.go. Confirmed via call-graph
grep: none of these have had a live (non-test) caller since the terraform
scheduler migration — every --all/--affected/--query path already routes
through pkg/scheduler/adapters instead. extractAffectedNodeIDs is relocated
(it's still used by the live ExecuteTerraformAffectedWithContext).

Split out from the hooks bulk-dispatch fix in this same PR so the behavior
change stays independently bisectable from this pure deletion.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
…mfile dispatch

Component `hooks:` never fired for atmos terraform apply/plan/deploy --all,
--affected, --components, or --query — only for single-component invocations
— because bulk dispatch only ever wired the CI-reporting hook callback, never
the user-defined hooks.RunAll engine, and had no "before" seam at all.

Adds a schema.ComponentNodeHooks interface (Before/After) wired into the
scheduler's TerraformDispatcher.Dispatch — the single choke point shared by
--all/--affected/--query — via pkg/hooks.RunPerComponentHooks. A before-hook
failure aborts that node; an after-hook failure fails it even if Terraform
itself succeeded, both respecting each hook's existing on_failure (fail/warn/
ignore) semantics rather than inventing new ones. Helmfile gets the same
ComponentNodeHooks wiring, giving it its first user-defined hook support
(it previously had none, single-component or otherwise).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@atmos-pro

atmos-pro Bot commented Jul 12, 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.

@osterman Erik Osterman (Cloud Posse) (osterman) added the patch A minor, backward compatible change label Jul 12, 2026
@coderabbitai

coderabbitai Bot commented Jul 12, 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 PR replaces per-component callback hooks with structured before/after node hooks across Terraform and Helmfile, adds shared hook dispatch and error handling, routes affected Terraform execution through scheduler node selection, and updates or removes corresponding tests and execution helpers.

Changes

Per-component hook lifecycle

Layer / File(s) Summary
Hook contracts and dispatch
pkg/schema/schema.go, pkg/hooks/*, errors/errors.go, internal/exec/stack_processor_*
Introduces ComponentNodeHooks, reusable per-component dispatch, centralized status logging, ErrPerComponentHookFailed, and Helmfile hook support.
Terraform node lifecycle
cmd/terraform/*, pkg/scheduler/adapters/terraform*, internal/exec/terraform_query*
Wires Terraform before/after hooks through node dispatch, maps command events, forwards execution errors and exit codes, and validates failure behavior.
Helmfile node lifecycle
cmd/helmfile/*, internal/exec/helmfile*
Runs Helmfile node hooks around delivery and subprocess execution, maps before events, and preserves after-hook handling during early failures.
Affected Terraform scheduler migration
internal/exec/terraform_affected*, internal/exec/terraform_*, internal/exec/describe_affected_utils_2.go
Selects affected Terraform nodes through scheduler IDs and removes obsolete recursive execution, graph, executor, and related test helpers.

Estimated code review effort: 4 (Complex) | ~60 minutes

Suggested reviewers: shirkevich, aknysh, zack-is-cool

Sequence Diagram(s)

sequenceDiagram
  participant TerraformDispatcher
  participant terraformNodeHooks
  participant TerraformExecutor
  TerraformDispatcher->>terraformNodeHooks: Before component node
  terraformNodeHooks-->>TerraformDispatcher: hook result
  TerraformDispatcher->>TerraformExecutor: execute node
  TerraformExecutor-->>TerraformDispatcher: output and execution error
  TerraformDispatcher->>terraformNodeHooks: After component node
  terraformNodeHooks-->>TerraformDispatcher: updated outcome
Loading
sequenceDiagram
  participant helmfileRun
  participant ExecuteHelmfile
  participant helmfileNodeHooks
  participant HelmfileProcess
  helmfileRun->>ExecuteHelmfile: run with NodeHooks
  ExecuteHelmfile->>helmfileNodeHooks: Before component
  helmfileNodeHooks-->>ExecuteHelmfile: hook result
  ExecuteHelmfile->>HelmfileProcess: execute Helmfile
  HelmfileProcess-->>ExecuteHelmfile: output and execution error
  ExecuteHelmfile->>helmfileNodeHooks: After component
  helmfileNodeHooks-->>ExecuteHelmfile: hook result
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 70.59% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: enabling user-defined hooks during bulk dispatch.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch osterman/create-pr-v1

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.

@github-actions github-actions Bot added the size/l Large size PR label Jul 12, 2026
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@github-actions

Copy link
Copy Markdown

Resource Changes Found for bucket in test

Atmos CI

create

Plan: 4 to add, 0 to change, 0 to destroy.
To reproduce this locally, run:

atmos terraform plan bucket -s test

Create

+ aws_s3_bucket.checkov_target
+ aws_s3_bucket.this
+ aws_s3_bucket.trivy_target
+ aws_s3_bucket_public_access_block.trivy_target
Terraform Plan Summary
  # aws_s3_bucket.checkov_target will be created
  + resource "aws_s3_bucket" "checkov_target" {
      + acceleration_status         = (known after apply)
      + acl                         = (known after apply)
      + arn                         = (known after apply)
      + bucket                      = "atmos-native-ci-e2e-checkov-test"
      + bucket_domain_name          = (known after apply)
      + bucket_prefix               = (known after apply)
      + bucket_regional_domain_name = (known after apply)
      + force_destroy               = false
      + hosted_zone_id              = (known after apply)
      + id                          = (known after apply)
      + object_lock_enabled         = (known after apply)
      + policy                      = (known after apply)
      + region                      = (known after apply)
      + request_payer               = (known after apply)
      + tags_all                    = (known after apply)
      + website_domain              = (known after apply)
      + website_endpoint            = (known after apply)

      + cors_rule (known after apply)

      + grant (known after apply)

      + lifecycle_rule (known after apply)

      + logging (known after apply)

      + object_lock_configuration (known after apply)

      + replication_configuration (known after apply)

      + server_side_encryption_configuration (known after apply)

      + versioning (known after apply)

      + website (known after apply)
    }

  # aws_s3_bucket.this will be created
  + resource "aws_s3_bucket" "this" {
      + acceleration_status         = (known after apply)
      + acl                         = (known after apply)
      + arn                         = (known after apply)
      + bucket                      = "atmos-native-ci-e2e-test"
      + bucket_domain_name          = (known after apply)
      + bucket_prefix               = (known after apply)
      + bucket_regional_domain_name = (known after apply)
      + force_destroy               = false
      + hosted_zone_id              = (known after apply)
      + id                          = (known after apply)
      + object_lock_enabled         = (known after apply)
      + policy                      = (known after apply)
      + region                      = (known after apply)
      + request_payer               = (known after apply)
      + tags                        = {
          + "AtmosFixture" = "native-ci-e2e"
          + "Stage"        = "test"
        }
      + tags_all                    = {
          + "AtmosFixture" = "native-ci-e2e"
          + "Stage"        = "test"
        }
      + website_domain              = (known after apply)
      + website_endpoint            = (known after apply)

      + cors_rule (known after apply)

      + grant (known after apply)

      + lifecycle_rule (known after apply)

      + logging (known after apply)

      + object_lock_configuration (known after apply)

      + replication_configuration (known after apply)

      + server_side_encryption_configuration (known after apply)

      + versioning (known after apply)

      + website (known after apply)
    }

  # aws_s3_bucket.trivy_target will be created
  + resource "aws_s3_bucket" "trivy_target" {
      + acceleration_status         = (known after apply)
      + acl                         = (known after apply)
      + arn                         = (known after apply)
      + bucket                      = "atmos-native-ci-e2e-trivy-test"
      + bucket_domain_name          = (known after apply)
      + bucket_prefix               = (known after apply)
      + bucket_regional_domain_name = (known after apply)
      + force_destroy               = false
      + hosted_zone_id              = (known after apply)
      + id                          = (known after apply)
      + object_lock_enabled         = (known after apply)
      + policy                      = (known after apply)
      + region                      = (known after apply)
      + request_payer               = (known after apply)
      + tags_all                    = (known after apply)
      + website_domain              = (known after apply)
      + website_endpoint            = (known after apply)

      + cors_rule (known after apply)

      + grant (known after apply)

      + lifecycle_rule (known after apply)

      + logging (known after apply)

      + object_lock_configuration (known after apply)

      + replication_configuration (known after apply)

      + server_side_encryption_configuration (known after apply)

      + versioning (known after apply)

      + website (known after apply)
    }

  # aws_s3_bucket_public_access_block.trivy_target will be created
  + resource "aws_s3_bucket_public_access_block" "trivy_target" {
      + block_public_acls       = true
      + block_public_policy     = true
      + bucket                  = (known after apply)
      + id                      = (known after apply)
      + ignore_public_acls      = true
      + restrict_public_buckets = true
    }

Plan: 4 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + bucket_name = "atmos-native-ci-e2e-test"

@codecov

codecov Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.38202% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.84%. Comparing base (965e5f3) to head (d6c6cd1).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/exec/helmfile.go 53.84% 6 Missing ⚠️
cmd/terraform/utils.go 94.73% 3 Missing ⚠️
pkg/hooks/hooks.go 93.75% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2736      +/-   ##
==========================================
+ Coverage   81.68%   81.84%   +0.16%     
==========================================
  Files        1653     1651       -2     
  Lines      156045   155930     -115     
==========================================
+ Hits       127458   127615     +157     
+ Misses      21614    21327     -287     
- Partials     6973     6988      +15     
Flag Coverage Δ
unittests 81.84% <94.38%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cmd/helmfile/helmfile.go 98.61% <100.00%> (+5.54%) ⬆️
errors/errors.go 100.00% <ø> (ø)
internal/exec/describe_affected_utils_2.go 79.58% <ø> (-0.24%) ⬇️
internal/exec/stack_processor_merge.go 80.99% <100.00%> (-0.05%) ⬇️
...ack_processor_process_stacks_helpers_extraction.go 79.39% <100.00%> (+0.10%) ⬆️
internal/exec/terraform_affected.go 84.73% <100.00%> (-0.70%) ⬇️
internal/exec/terraform_query.go 91.04% <100.00%> (-8.96%) ⬇️
internal/exec/terraform_utils.go 79.78% <ø> (+7.39%) ⬆️
pkg/scheduler/adapters/terraform.go 79.82% <100.00%> (+0.57%) ⬆️
pkg/schema/schema.go 86.42% <ø> (ø)
... and 3 more

... and 16 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Codecov flagged this branch's patch coverage at 79.31% (target 80%) with 36
lines missing across cmd/terraform/utils.go, cmd/helmfile/helmfile.go,
internal/exec/helmfile.go, internal/exec/terraform_query.go, pkg/hooks/hooks.go,
and pkg/scheduler/adapters/terraform.go. Adds tests targeting the exact
uncovered branches (config-init-failure paths, empty-event guards, RunCIHooks
error paths, errors.Join behavior, and the NodeHooks Before/After wiring in
ExecuteHelmfile/executeTerraformQueryComponent) identified from local coverage
profiles.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

@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

🧹 Nitpick comments (2)
internal/exec/terraform_affected_test.go (1)

16-42: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use one table for the node-ID scenarios.

The empty, single, and multiple-entry cases can share one input/output table and one assertion.

As per coding guidelines, “Use table-driven tests for testing multiple scenarios in Go.”

🤖 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 `@internal/exec/terraform_affected_test.go` around lines 16 - 42, The
TestExtractAffectedNodeIDs test currently duplicates subtests for scenarios that
can use a single table-driven test. Replace the separate “empty list,” “single
affected,” and “multiple affected” cases with one table of inputs and expected
node-ID slices, then iterate over it and assert each result with one assertion
pattern.

Source: Coding guidelines

pkg/hooks/hooks_test.go (1)

607-638: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Make the on_failure cases table-driven.

The three cases differ only by mode and expected error; a table removes repeated fixture and invocation logic.

As per coding guidelines, “Use table-driven tests for testing multiple scenarios in Go.”

🤖 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 `@pkg/hooks/hooks_test.go` around lines 607 - 638, Convert the three on_failure
subtests in the relevant test function into a table-driven test with fields for
the failure mode and expected error outcome. Iterate over the cases, create each
fixture using the table’s mode, invoke RunPerComponentHooks with the shared
options, and assert error or no error based on the expected result.

Source: Coding guidelines

🤖 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 `@internal/exec/terraform_query_test.go`:
- Line 467: Update the test setup around t.Chdir to construct the fixture path
with filepath.Join using separate path elements, preserving the existing
../../examples/demo-stacks location while making it cross-platform. Ensure the
filepath package is imported if needed.

In `@pkg/schema/schema.go`:
- Around line 799-804: Update the exported After method comment in the relevant
hook interface to remove the claim that it runs after a Before failure. Document
it as running after the component executor completes successfully or with an
error, and preserve the existing behavior that Before failures prevent After
from running.

---

Nitpick comments:
In `@internal/exec/terraform_affected_test.go`:
- Around line 16-42: The TestExtractAffectedNodeIDs test currently duplicates
subtests for scenarios that can use a single table-driven test. Replace the
separate “empty list,” “single affected,” and “multiple affected” cases with one
table of inputs and expected node-ID slices, then iterate over it and assert
each result with one assertion pattern.

In `@pkg/hooks/hooks_test.go`:
- Around line 607-638: Convert the three on_failure subtests in the relevant
test function into a table-driven test with fields for the failure mode and
expected error outcome. Iterate over the cases, create each fixture using the
table’s mode, invoke RunPerComponentHooks with the shared options, and assert
error or no error based on the expected result.
🪄 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

Run ID: 2d4d24c1-79e7-4469-8fa5-5900c72fbba4

📥 Commits

Reviewing files that changed from the base of the PR and between 28c1489 and e68dc8a.

📒 Files selected for processing (24)
  • cmd/helmfile/ci_helpers_test.go
  • cmd/helmfile/helmfile.go
  • cmd/helmfile/helmfile_test.go
  • cmd/terraform/utils.go
  • cmd/terraform/utils_hooks_test.go
  • errors/errors.go
  • internal/exec/describe_affected_utils_2.go
  • internal/exec/helmfile.go
  • internal/exec/helmfile_test.go
  • internal/exec/terraform_affected.go
  • internal/exec/terraform_affected_graph.go
  • internal/exec/terraform_affected_graph_test.go
  • internal/exec/terraform_affected_test.go
  • internal/exec/terraform_executor.go
  • internal/exec/terraform_executor_test.go
  • internal/exec/terraform_query.go
  • internal/exec/terraform_query_test.go
  • internal/exec/terraform_utils.go
  • internal/exec/terraform_utils_test.go
  • pkg/hooks/hooks.go
  • pkg/hooks/hooks_test.go
  • pkg/scheduler/adapters/terraform.go
  • pkg/scheduler/adapters/terraform_test.go
  • pkg/schema/schema.go
💤 Files with no reviewable changes (7)
  • internal/exec/terraform_affected_graph_test.go
  • internal/exec/terraform_executor.go
  • internal/exec/terraform_affected_graph.go
  • internal/exec/terraform_executor_test.go
  • internal/exec/describe_affected_utils_2.go
  • internal/exec/terraform_utils.go
  • internal/exec/terraform_utils_test.go

Comment thread internal/exec/terraform_query_test.go Resolved
Comment thread pkg/schema/schema.go Resolved
Corrects the ComponentNodeHooks.After docstring, which implied After runs
following a Before failure — TestExecuteHelmfileNodeHooks_BeforeErrorAbortsExecution
proves it does not. Also builds test fixture paths with filepath.Join instead of
hardcoded forward-slash strings, per the repo's cross-platform test-path rule.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

@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: 1

🤖 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 `@cmd/helmfile/helmfile_test.go`:
- Around line 170-175: Extend TestHelmfileRun_NodeHooksFallbackOnEarlyFailure to
install or inject an observable after-hook that records invocation and the
received error, then assert it runs when helmfileRun fails during diff. Keep the
existing require.Error assertion and verify the hook receives the same failure
rather than only checking that the command returns an error.
🪄 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

Run ID: 994d4370-6f1b-4c5d-ad85-a16856c760d4

📥 Commits

Reviewing files that changed from the base of the PR and between e68dc8a and 51c0a51.

📒 Files selected for processing (4)
  • cmd/helmfile/ci_helpers_test.go
  • cmd/helmfile/helmfile_test.go
  • internal/exec/terraform_query_test.go
  • pkg/schema/schema.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • pkg/schema/schema.go
  • internal/exec/terraform_query_test.go
  • cmd/helmfile/ci_helpers_test.go

Comment thread cmd/helmfile/helmfile_test.go Resolved
CodeRabbit asked for TestHelmfileRun_NodeHooksFallbackOnEarlyFailure to prove
the fallback after-hook actually runs, not just that helmfileRun returns an
error. Making that assertion real (a hooks: entry that writes an observable
marker file) surfaced a pre-existing bug: supportsComponentHooks() never
included HelmfileComponentType, and stack_processor_merge.go only assigned
comp[hooks] inside the Terraform/Kubernetes/Helm-specific blocks. So the
hooks: section was silently dropped during stack processing for helmfile
components, and GetHooks always found nothing — meaning this PR's stated goal
("fire hooks.RunAll for components under bulk terraform/helmfile dispatch")
did not actually work end-to-end for helmfile until now.

Fixes:
- supportsComponentHooks now includes HelmfileComponentType.
- Consolidated the three duplicated `comp[cfg.HooksSectionName] =
  finalComponentHooks` assignments (one per gated type block) into a single
  supportsComponentHooks-gated line, so a future hooks-capable type only
  needs the one flag flipped.
- Updated the stale TestSupportsComponentTypeHelpers truth-table entry that
  had pinned the old (incorrect) helmfile=false behavior.
- cmd/helmfile/testmain_test.go: adds a cross-platform "write a marker file"
  test-binary trick (mirroring pkg/hooks' _ATMOS_TEST_WRITE_OUTPUT), used by
  the rewritten fallback test to prove the hook fired for real.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 13, 2026
@mergify

mergify Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏

@mergify mergify Bot added the conflict This PR has conflicts label Jul 13, 2026
# Conflicts:
#	pkg/scheduler/adapters/terraform_test.go

@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)
pkg/scheduler/adapters/terraform.go (1)

428-428: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use terraformSubCommandApply here. The constant already exists in this package, so this branch can match the destroy case instead of hardcoding "apply".

🤖 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 `@pkg/scheduler/adapters/terraform.go` at line 428, Update the subcommand check
in the Terraform adapter to use the existing terraformSubCommandApply constant
instead of the hardcoded "apply" string, while preserving the existing
terraformSubCommandDestroy comparison and nil guard.
🤖 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 `@pkg/scheduler/adapters/terraform.go`:
- Line 428: Update the subcommand check in the Terraform adapter to use the
existing terraformSubCommandApply constant instead of the hardcoded "apply"
string, while preserving the existing terraformSubCommandDestroy comparison and
nil guard.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 69bec733-ca34-460c-b92a-efbd9c852f12

📥 Commits

Reviewing files that changed from the base of the PR and between 91b3ad8 and d6c6cd1.

📒 Files selected for processing (4)
  • cmd/terraform/utils.go
  • errors/errors.go
  • pkg/scheduler/adapters/terraform.go
  • pkg/schema/schema.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • pkg/schema/schema.go
  • cmd/terraform/utils.go

@aknysh
Andriy Knysh (aknysh) merged commit 666190e into main Jul 14, 2026
83 checks passed
@aknysh
Andriy Knysh (aknysh) deleted the osterman/create-pr-v1 branch July 14, 2026 16:25
@atmos-pro

atmos-pro Bot commented Jul 14, 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

Copy link
Copy Markdown

These changes were released in v1.223.0-rc.11.

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

Labels

patch A minor, backward compatible change size/l Large size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants