Skip to content

fix: disable YAML function processing in list instances - #2170

Merged
Andriy Knysh (aknysh) merged 1 commit into
mainfrom
fix/list-instances-disable-functions
Mar 12, 2026
Merged

Andriy Knysh (aknysh) merged 1 commit into
mainfrom
fix/list-instances-disable-functions

Conversation

@milldr

@milldr Dan Miller (milldr) commented Mar 11, 2026 •

Copy link
Copy Markdown
Member

What

Disable YAML function processing (processYamlFunctions) in atmos list instances while keeping template processing enabled.

Why

atmos list instances calls ExecuteDescribeStacks with processYamlFunctions: true, which triggers execution of YAML functions like !terraform.output and atmos.Component(). These shell out to tofu/terraform, causing failures when those binaries aren't in $PATH — even though listing instances doesn't need to resolve function values.

Template processing is kept enabled because templates can create additional stacks and components that should be included as instances.

Ref

  • Reported in Slack: atmos list instances fails with exec: "tofu": executable file not found in $PATH
  • The tree-format code path in the same file already correctly disables both flags

Summary by CodeRabbit

  • Changes

    • YAML functions in template processing have been disabled while maintaining support for core template operations and stack handling.
    • Updated how stacks are processed and described to reflect this change.
  • Tests

    • Updated multiple test cases to reflect the modified template processing behavior and stack validation logic.

@milldr
Dan Miller (milldr) requested a review from a team as a code owner March 11, 2026 23:06
@github-actions github-actions Bot added the size/s Small size PR label Mar 11, 2026
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@milldr Dan Miller (milldr) added the patch A minor, backward compatible change label Mar 11, 2026
@coderabbitai

coderabbitai Bot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 890e8916-1301-4ab2-94a1-4f33b072c467

📥 Commits

Reviewing files that changed from the base of the PR and between 5e87975 and 4d9d624.

📒 Files selected for processing (2)
  • pkg/list/list_instances.go
  • pkg/list/list_instances_process_test.go

📝 Walkthrough

Walkthrough

The changes disable YAML functions in stack description processing by modifying the ExecuteDescribeStacks call parameters. Template processing remains enabled. Test cases are updated to reflect this behavioral shift, with corresponding dependency updates in go.mod.

Changes

Cohort / File(s) Summary
Stack Description Processing
pkg/list/list_instances.go
Modified ExecuteDescribeStacks call to disable YAML functions (3rd/4th boolean flags) while keeping template processing enabled, removing dependency on external binaries.
Test Updates
pkg/list/list_instances_process_test.go
Updated multiple test calls to ExecuteDescribeStacks by switching the 8th boolean argument from true to false, aligning tests with the new behavior.
Dependencies
go.mod
Dependency updates with minor version adjustments.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

patch

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: disabling YAML function processing in the list instances command, which matches the primary objective of the PR.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/list-instances-disable-functions

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 and usage tips.

@codecov

codecov Bot commented Mar 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.18%. Comparing base (5e87975) to head (4d9d624).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2170   +/-   ##
=======================================
  Coverage   77.17%   77.18%           
=======================================
  Files         953      953           
  Lines       90403    90403           
=======================================
+ Hits        69771    69780    +9     
+ Misses      16556    16552    -4     
+ Partials     4076     4071    -5     
Flag Coverage Δ
unittests 77.18% <100.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
pkg/list/list_instances.go 83.12% <100.00%> (ø)

... and 5 files with indirect coverage changes

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

@aknysh
Andriy Knysh (aknysh) merged commit 42605ff into main Mar 12, 2026
63 of 64 checks passed
@aknysh
Andriy Knysh (aknysh) deleted the fix/list-instances-disable-functions branch March 12, 2026 03:49
Igor Rodionov (goruha) added a commit that referenced this pull request Mar 12, 2026
…se/atmos into goruha/native-ci-terraform-plan

* 'goruha/native-ci-terraform-plan' of github.com:cloudposse/atmos:
  fix: disable YAML function processing in list instances to avoid requiring tofu/terraform in PATH (#2170)
@github-actions

Copy link
Copy Markdown

These changes were released in v1.210.0-test.12.

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/s Small size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants