-
-
Notifications
You must be signed in to change notification settings - Fork 133
Add --dependents-stack
flag to atmos describe affected
and atmos describe dependents
commands
#1477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Important Cloud Posse Engineering Team Review RequiredThis pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes. To expedite this process, reach out to us on Slack in the |
📝 WalkthroughWalkthroughAdds a new CLI flag Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant CLI as CLI (describe affected)
participant Exec as Exec Layer
participant Dep as Describe Dependents
participant Stacks as Describe Stacks
User->>CLI: atmos describe affected --include-dependents [--dependents-stack <S>]
CLI->>Exec: ExecuteDescribeAffected(args{DependentsStack: S})
alt includeDependents
Exec->>Dep: ExecuteDescribeDependents(component, stack, ..., dependentsStack=S)
Dep->>Stacks: ExecuteDescribeStacks(filter stack=S)
Stacks-->>Dep: Filtered stacks
Dep->>Dep: Exclude abstract / disabled components
Dep-->>Exec: Dependents (stack-scoped)
Exec->>Exec: Recursively attach dependents using S
end
Exec-->>User: Affected YAML
sequenceDiagram
autonumber
actor User
participant CLI2 as CLI (describe dependents)
participant Dep2 as Describe Dependents
participant Stacks2 as Describe Stacks
User->>CLI2: atmos describe dependents <component> -s <stack> [--dependents-stack <S>]
CLI2->>Dep2: ExecuteDescribeDependents(..., dependentsStack=S)
Dep2->>Stacks2: ExecuteDescribeStacks(filter stack=S)
Stacks2-->>Dep2: Filtered stacks
Dep2->>Dep2: Exclude abstract/disabled components
Dep2-->>User: Dependents list
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. ✨ Finishing touches
🧪 Generate unit tests
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
internal/exec/describe_dependents_test.go (1)
1-804
: Add missing Viper env binding fordependents-stack
Bind thedependents-stack
flag toATMOS_DEPENDENTS_STACK
in cmd/describe_dependents.go (e.g.viper.BindEnv("dependents-stack", "ATMOS_DEPENDENTS_STACK")
). The flag is defined (line 136) and passed intoDescribeDependentsExecProps.DependentsStack
(line 78), but the env alias isn’t yet bound.internal/exec/describe_affected_test.go (1)
1-1016
: Signature updates verified; enable ATMOS_DEPENDENTS_STACK env bindingNo stale ExecuteDescribeDependents calls; all addDependentsToAffected invocations include the new dependentsStack param; the --dependents-stack flag is registered in both describe-affected and describe-dependents commands.
The ATMOS_DEPENDENTS_STACK environment variable isn’t bound—add a viper.BindEnv("dependents-stack", "ATMOS_DEPENDENTS_STACK") (or enable AutomaticEnv/SetEnvKeyReplacer/SetEnvPrefix) in pkg/config/load.go to support it.
🧹 Nitpick comments (30)
website/docs/cli/commands/packer/packer-output.mdx (2)
22-57
: Reorder sections to match docs standard (Usage → Examples → Arguments → Flags).Move “Examples” above “Arguments”, and keep “Flags” last.
## Usage ... -## Arguments -... -## Flags -... -## Examples +## Examples ... +## Arguments +... +## Flags +...Also applies to: 59-68
103-104
: Nit: quote the colon in the title snippet for consistency with the command.Title shows split(:)[1] while the command shows split(":")[1].
-<Terminal title="atmos packer output aws/bastion -s nonprod -q '.builds[0].artifact_id | split(:)[1]'"> +<Terminal title="atmos packer output aws/bastion -s nonprod -q '.builds[0].artifact_id | split(\":\" )[1]'">Also applies to: 108-108
website/docs/cli/commands/packer/packer-init.mdx (1)
20-66
: Reorder sections to match docs standard (Usage → Examples → Arguments → Flags).## Usage ... -## Arguments -... -## Flags -... -## Examples +## Examples ... +## Arguments +... +## Flags +...demo/screengrabs/Makefile (1)
5-8
: Make install resilient when no artifacts exist.Current cp will fail if artifacts/* is empty. Guard the copy.
install: @echo "Installing screengrabs to $(INSTALL_PATH)" @mkdir -p $(INSTALL_PATH) - @cp -a artifacts/* $(INSTALL_PATH) + @if ls artifacts/* >/dev/null 2>&1; then \ + cp -a artifacts/* $(INSTALL_PATH); \ + else \ + echo "No artifacts to install"; \ + fiwebsite/docs/cli/commands/packer/packer-inspect.mdx (1)
21-67
: Reorder sections to match docs standard (Usage → Examples → Arguments → Flags).## Usage ... -## Arguments -... -## Flags -... -## Examples +## Examples ... +## Arguments +... +## Flags +...website/docs/cli/commands/packer/usage.mdx (2)
13-16
: Nit: standardize the “purpose” admonition casing.Other pages use
:::note purpose
. Align casing for consistency.-:::note Purpose +:::note purpose
20-31
: Order tweak to align with convention.Prefer “Examples” before “Flags” on command pages.
## Usage ... -## Atmos Flags -... -## Examples +## Examples ... +## Atmos Flags +...Also applies to: 55-82
website/docs/cli/commands/describe/describe-dependents.mdx (1)
242-250
: Examples read well; add one stack-filtered YAML example for parity.Optional, but having a stack-filtered YAML example helps parity with other commands.
Apply:
atmos describe dependents <component> -s <stack> atmos describe dependents <component> -s <stack> --format yaml atmos describe dependents <component> -s <stack> -f yaml atmos describe dependents <component> -s <stack> --file dependents.json atmos describe dependents <component> -s <stack> --format yaml --file dependents.yaml atmos describe dependents <component> -s <stack> --query <yq-expression> +atmos describe dependents <component> -s <stack> --dependents-stack <stack> --format yaml atmos describe dependents <component> -s <stack> --dependents-stack <stack>
go.mod (1)
27-27
: Minor: run mod tidy after bumps.Just to keep go.mod/go.sum minimal and deterministic post-upgrades.
cmd/describe_affected.go (2)
33-33
: Add shell completion for --dependents-stack.Match the --stack completion to improve UX.
Example (adjust to your helper names):
AddStackCompletion(describeAffectedCmd) +// Reuse the same stack completer for dependents-stack. +_ = describeAffectedCmd.RegisterFlagCompletionFunc("dependents-stack", StacksArgCompletion)
65-73
: Warn if --dependents-stack is provided without --include-dependents.Prevents confusion when the filter is ignored.
Apply:
// Handle the deprecated `--verbose` flag. if cmd.Flags().Changed("verbose") { log.Warn("The --verbose flag is deprecated. Please use the --logs-level flag instead", "example", "atmos describe affected --logs-level=Debug") if props.Verbose { log.SetLevel(log.DebugLevel) props.CLIConfig.Logs.Level = u.LogLevelDebug } } + + // Nudge: --dependents-stack only works with --include-dependents. + if props.DependentsStack != "" && !props.IncludeDependents { + log.Warn("Ignoring --dependents-stack without --include-dependents. Use: atmos describe affected --include-dependents --dependents-stack <stack>.") + }cmd/describe_dependents.go (1)
136-137
: Add shell completion for --dependents-stack.Provide the same stack completion as --stack.
Apply:
describeDependentsCmd.PersistentFlags().StringSlice("skip", nil, "Skip executing a YAML function when processing Atmos stack manifests") describeDependentsCmd.PersistentFlags().String("dependents-stack", "", "Filter the dependent components by a specific stack") +_ = describeDependentsCmd.RegisterFlagCompletionFunc("dependents-stack", StacksArgCompletion)
internal/exec/atmos.go (1)
114-114
: Consider honoring--dependents-stack
in TUI.You’re always passing an empty filter here, so the TUI cannot leverage the new flag. Optionally default to the selected stack or expose a TUI prompt.
Example if you want the TUI to scope to the selected stack by default:
- data, err := ExecuteDescribeDependents(&atmosConfig, selectedComponent, selectedStack, false, true, true, nil, "") + data, err := ExecuteDescribeDependents(&atmosConfig, selectedComponent, selectedStack, false, true, true, nil, selectedStack)internal/exec/describe_dependents_test.go (9)
40-45
: Assert the new parameter flows (baseline: empty).Add an assertion for
dependentsStack
to prevent regressions.- mockExecuteDescribeDependents := func(config *schema.AtmosConfiguration, component, stack string, includeSettings bool, processTemplates bool, processFunctions bool, skip []string, dependentsStack string) ([]schema.Dependent, error) { + mockExecuteDescribeDependents := func(config *schema.AtmosConfiguration, component, stack string, includeSettings bool, processTemplates bool, processFunctions bool, skip []string, dependentsStack string) ([]schema.Dependent, error) { assert.Equal(t, "test-component", component) assert.Equal(t, "test-stack", stack) assert.False(t, includeSettings) + assert.Equal(t, "", dependentsStack) return dependents, nil }
105-111
: Also assertdependentsStack
in the query path.- executeDescribeDependents: func(atmosConfig *schema.AtmosConfiguration, component, stack string, includeSettings bool, processTemplates bool, processFunctions bool, skip []string, dependentsStack string) ([]schema.Dependent, error) { - return dependents, nil - }, + executeDescribeDependents: func(atmosConfig *schema.AtmosConfiguration, component, stack string, includeSettings bool, processTemplates bool, processFunctions bool, skip []string, dependentsStack string) ([]schema.Dependent, error) { + assert.Equal(t, "", dependentsStack) + return dependents, nil + },
135-140
: Error path: verifydependentsStack
argument too.- executeDescribeDependents: func(atmosConfig *schema.AtmosConfiguration, component, stack string, includeSettings bool, processTemplates bool, processFunctions bool, skip []string, dependentsStack string) ([]schema.Dependent, error) { - return nil, expectedError - }, + executeDescribeDependents: func(atmosConfig *schema.AtmosConfiguration, component, stack string, includeSettings bool, processTemplates bool, processFunctions bool, skip []string, dependentsStack string) ([]schema.Dependent, error) { + assert.Equal(t, "", dependentsStack) + return nil, expectedError + },
175-182
: YQ error path: assertdependentsStack
.- executeDescribeDependents: func(atmosConfig *schema.AtmosConfiguration, component, stack string, includeSettings bool, processTemplates bool, processFunctions bool, skip []string, dependentsStack string) ([]schema.Dependent, error) { - return dependents, nil - }, + executeDescribeDependents: func(atmosConfig *schema.AtmosConfiguration, component, stack string, includeSettings bool, processTemplates bool, processFunctions bool, skip []string, dependentsStack string) ([]schema.Dependent, error) { + assert.Equal(t, "", dependentsStack) + return dependents, nil + },
205-219
: Empty results path: assertdependentsStack
.- mockExecuteDescribeDependents := func(config *schema.AtmosConfiguration, component, stack string, includeSettings bool, processTemplates bool, processFunctions bool, skip []string, dependentsStack string) ([]schema.Dependent, error) { - return dependents, nil - } + mockExecuteDescribeDependents := func(config *schema.AtmosConfiguration, component, stack string, includeSettings bool, processTemplates bool, processFunctions bool, skip []string, dependentsStack string) ([]schema.Dependent, error) { + assert.Equal(t, "", dependentsStack) + return dependents, nil + }
263-265
: Formats/files path: assertdependentsStack
.- mockExecuteDescribeDependents := func(config *schema.AtmosConfiguration, component, stack string, includeSettings bool, processTemplates bool, processFunctions bool, skip []string, dependentsStack string) ([]schema.Dependent, error) { - return dependents, nil - } + mockExecuteDescribeDependents := func(config *schema.AtmosConfiguration, component, stack string, includeSettings bool, processTemplates bool, processFunctions bool, skip []string, dependentsStack string) ([]schema.Dependent, error) { + assert.Equal(t, "", dependentsStack) + return dependents, nil + }
314-493
: Great matrix coverage; add one negative filter case.Nice addition of same/different
dependentsStack
cases. Consider adding a case wheredependentsStack
doesn’t match any stack to assert empty results.@@ cases := []struct { name string component string stack string dependentsStack string expected []schema.Dependent }{ + { + name: "no-match-dependents-stack", + component: "tgw/hub", + stack: "ue1-network", + dependentsStack: "does-not-exist", + expected: []schema.Dependent{}, + },
1-804
: Add an exec-level pass-through test for the new flag.We’re covering the direct function and exec paths, but not asserting that
DescribeDependentsExec
forwardsDependentsStack
from props toExecuteDescribeDependents
. Add a focused test.Example (new test at file end):
func TestDescribeDependentsExec_PassesDependentsStack(t *testing.T) { atmosConfig := &schema.AtmosConfiguration{} called := false exec := &describeDependentsExec{ atmosConfig: atmosConfig, executeDescribeDependents: func(_ *schema.AtmosConfiguration, _, _ string, _ bool, _ bool, _ bool, _ []string, dependentsStack string) ([]schema.Dependent, error) { called = true assert.Equal(t, "uw2-prod", dependentsStack) return nil, nil }, newPageCreator: pager.NewMockPageCreator(gomock.NewController(t)), isTTYSupportForStdout: func() bool { return false }, } props := &DescribeDependentsExecProps{ Component: "tgw/hub", Stack: "ue1-network", Format: "json", DependentsStack: "uw2-prod", } require.NoError(t, exec.Execute(props)) assert.True(t, called) }
1-804
: Test disabled-component filtering.Since
ExecuteDescribeDependents
now skips disabled components, add a fixture-backed test that asserts a disabled dependent is excluded.internal/exec/terraform_utils.go (1)
226-236
: Pass dependents-stack through (or confirm it's intentionally unset).You're always passing an empty dependents stack to addDependentsToAffected. If terraform apply --affected is not supposed to support --dependents-stack, this is fine. If parity with describe affected is desired, thread args.DependentsStack here.
- err = addDependentsToAffected( + err = addDependentsToAffected( args.CLIConfig, &affectedList, args.IncludeSettings, args.ProcessTemplates, args.ProcessYamlFunctions, args.Skip, - "", + args.DependentsStack, )Would you like me to open a follow-up to explicitly document that terraform --affected ignores --dependents-stack?
internal/exec/describe_dependents.go (4)
19-30
: Document the new field.Add a short comment so godoc reflects the purpose of DependentsStack.
type DescribeDependentsExecProps struct { File string Format string Query string Stack string Component string IncludeSettings bool ProcessTemplates bool ProcessYamlFunctions bool Skip []string - DependentsStack string + // DependentsStack filters discovered dependents to a specific stack. Empty means all stacks. + DependentsStack string }
69-80
: Surface the filter in the pager title when set.Minor UX: include the dependents stack filter in displayName so users see the scope immediately.
func (d *describeDependentsExec) Execute(describeDependentsExecProps *DescribeDependentsExecProps) error { @@ } else { res = dependents } - return viewWithScroll(&viewWithScrollProps{ + displayName := fmt.Sprintf("Dependents of '%s' in stack '%s'", describeDependentsExecProps.Component, describeDependentsExecProps.Stack) + if describeDependentsExecProps.DependentsStack != "" { + displayName = fmt.Sprintf("%s (filtered to dependents stack '%s')", displayName, describeDependentsExecProps.DependentsStack) + } + + return viewWithScroll(&viewWithScrollProps{ atmosConfig: d.atmosConfig, format: describeDependentsExecProps.Format, file: describeDependentsExecProps.File, res: res, pageCreator: d.newPageCreator, isTTYSupportForStdout: d.isTTYSupportForStdout, - displayName: fmt.Sprintf("Dependents of '%s' in stack '%s'", describeDependentsExecProps.Component, describeDependentsExecProps.Stack), + displayName: displayName, printOrWriteToFile: printOrWriteToFile, })Also applies to: 95-105
107-117
: Update function doc to mention dependentsStack.Clarify the new parameter’s behavior.
-// ExecuteDescribeDependents produces a list of Atmos components in Atmos stacks that depend on the provided Atmos component. +// ExecuteDescribeDependents produces a list of Atmos components in Atmos stacks that depend on the provided component. +// If dependentsStack is non-empty, only stacks matching that name/slug are scanned for dependents. func ExecuteDescribeDependents(
196-206
: Fix trailing period in comment (godot).Small lint nit.
- // Skip abstract and disabled components + // Skip abstract and disabled components.internal/exec/describe_affected_test.go (3)
567-568
: Nil vs empty slice in expectations—confirm intent.You mix nil and [] for Dependents in different scenarios. That’s fine if actuals differ before vs after addDependentsToAffected. Just confirm this is intentional; otherwise normalize to reduce brittleness.
If you prefer normalization, I can add a small helper to coerce nil to empty in both actual and expected before asserting.
Also applies to: 702-704, 888-889
891-1016
: Great coverage for dependents filtered to uw2-network.Covers the complementary stack scope. To harden the disabled-component behavior, consider an explicit negative assertion that disabled dependents are excluded.
affected, _, _, _, err = ExecuteDescribeAffectedWithTargetRepoPath( @@ require.NoError(t, err) err = addDependentsToAffected( @@ ) require.NoError(t, err) // Order-agnostic equality on struct slices assert.ElementsMatch(t, expected, affected) + + // Extra guard: ensure disabled components are not present among dependents. + var allDeps []string + for _, a := range affected { + for _, d := range a.Dependents { + allDeps = append(allDeps, d.Stack+"-"+d.Component) + for _, dd := range d.Dependents { + allDeps = append(allDeps, dd.Stack+"-"+dd.Component) + } + } + } + // Example: ensure uw2-network tgw/attachment (disabled in fixtures) is not present. + assert.NotContains(t, allDeps, "uw2-network-tgw/attachment")
21-93
: Optional: table-drive these sub-scenarios later.Not blocking. Converting the repeated scenario blocks into a table would make additions cheaper.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
go.sum
is excluded by!**/*.sum
📒 Files selected for processing (22)
cmd/describe_affected.go
(2 hunks)cmd/describe_dependents.go
(2 hunks)demo/screengrabs/Makefile
(1 hunks)examples/quick-start-advanced/Dockerfile
(1 hunks)go.mod
(8 hunks)internal/exec/atmos.go
(1 hunks)internal/exec/describe_affected.go
(4 hunks)internal/exec/describe_affected_test.go
(5 hunks)internal/exec/describe_affected_utils_2.go
(6 hunks)internal/exec/describe_dependents.go
(6 hunks)internal/exec/describe_dependents_test.go
(14 hunks)internal/exec/terraform_utils.go
(1 hunks)tests/fixtures/scenarios/atmos-describe-affected-with-dependents-and-locked/stacks/deploy/network/us-west-2.yaml
(1 hunks)website/docs/cli/commands/describe/describe-affected.mdx
(2 hunks)website/docs/cli/commands/describe/describe-dependents.mdx
(2 hunks)website/docs/cli/commands/packer/packer-build.mdx
(2 hunks)website/docs/cli/commands/packer/packer-init.mdx
(2 hunks)website/docs/cli/commands/packer/packer-inspect.mdx
(2 hunks)website/docs/cli/commands/packer/packer-output.mdx
(2 hunks)website/docs/cli/commands/packer/packer-validate.mdx
(2 hunks)website/docs/cli/commands/packer/usage.mdx
(1 hunks)website/docs/integrations/atlantis.mdx
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
website/**
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
website/**
: Update website documentation in the website/ directory when adding new features
Follow the website's documentation structure and style
Keep website code in the website/ directory
Follow the existing website architecture and style
Document new features on the website
Include examples and use cases in website documentation
Files:
website/docs/cli/commands/packer/usage.mdx
website/docs/cli/commands/describe/describe-dependents.mdx
website/docs/integrations/atlantis.mdx
website/docs/cli/commands/packer/packer-validate.mdx
website/docs/cli/commands/packer/packer-inspect.mdx
website/docs/cli/commands/packer/packer-init.mdx
website/docs/cli/commands/packer/packer-build.mdx
website/docs/cli/commands/packer/packer-output.mdx
website/docs/cli/commands/describe/describe-affected.mdx
website/docs/cli/commands/*/*.mdx
📄 CodeRabbit inference engine (CLAUDE.md)
website/docs/cli/commands/*/*.mdx
: All new commands/flags/parameters must have Docusaurus docs at website/docs/cli/commands//.mdx.
Use definition listsfor arguments/flags in MDX docs (no tables).
Follow Docusaurus frontmatter and section ordering: Usage → Examples → Arguments → Flags; include purpose note and screengrab.
Files:
website/docs/cli/commands/packer/usage.mdx
website/docs/cli/commands/describe/describe-dependents.mdx
website/docs/cli/commands/packer/packer-validate.mdx
website/docs/cli/commands/packer/packer-inspect.mdx
website/docs/cli/commands/packer/packer-init.mdx
website/docs/cli/commands/packer/packer-build.mdx
website/docs/cli/commands/packer/packer-output.mdx
website/docs/cli/commands/describe/describe-affected.mdx
**/*.{yaml,yml}
📄 CodeRabbit inference engine (CLAUDE.md)
YAML configs should support Go templating using provided template functions.
Files:
tests/fixtures/scenarios/atmos-describe-affected-with-dependents-and-locked/stacks/deploy/network/us-west-2.yaml
cmd/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
cmd/*.go
: Implement each Cobra command in a separate file under the cmd/ directory
Use kebab-case for command-line flags
Provide comprehensive help text for all commands and flags
Include examples in command help
Provide meaningful feedback to users in command implementation
Include progress indicators for long-running operations
Provide clear error messages to users
Include troubleshooting hints when appropriate
Log detailed errors for debugging
Files:
cmd/describe_dependents.go
cmd/describe_affected.go
**/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*.go
: Use Viper for managing configuration, environment variables, and flags
Use interfaces for external dependencies to facilitate mocking
All code must pass golangci-lint checks
Follow Go's error handling idioms
Use meaningful error messages
Wrap errors with context using fmt.Errorf("context: %w", err)
Consider using a custom error type for domain-specific errors
Follow standard Go coding style
Use gofmt and goimports to format code
Prefer short, descriptive variable names
Use snake_case for environment variables
Document all exported functions, types, and methods
Document complex logic with inline comments
Follow Go's documentation conventions
Use Viper for configuration management
Support configuration via files, environment variables, and flags
Follow the precedence order: flags > environment variables > config file > defaults
**/*.go
: All comments in Go code must end with periods (enforced by golangci-lint godot).
Wrap all returned errors using static errors from the errors package; never return dynamic errors directly.
Always bind environment variables with viper.BindEnv() and provide ATMOS_ alternatives for each external var.
Separate structured logging from UI output: use stderr for prompts/errors to user; stdout only for data; never use logging for UI.
Most text UI must go to stderr; only data/results to stdout. Prefer utils.PrintfMessageToTUI for UI messages.
For non-standard execution paths, capture telemetry with telemetry.CaptureCmd or telemetry.CaptureCmdString and never capture user data.
Ensure cross-platform compatibility: prefer SDKs to external binaries, use filepath/os/runtime for portability, and add build constraints when needed.
Files:
cmd/describe_dependents.go
internal/exec/describe_affected_utils_2.go
internal/exec/atmos.go
cmd/describe_affected.go
internal/exec/describe_affected.go
internal/exec/terraform_utils.go
internal/exec/describe_dependents.go
internal/exec/describe_dependents_test.go
internal/exec/describe_affected_test.go
cmd/**/!(*_test).go
📄 CodeRabbit inference engine (CLAUDE.md)
cmd/**/!(*_test).go
: One Cobra command per file in cmd/.
Use //go:embed to load *_usage.md examples and utils.PrintfMarkdown() to render them in commands.
Files:
cmd/describe_dependents.go
cmd/describe_affected.go
**/*_test.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*_test.go
: Every new feature must include comprehensive unit tests
Test both happy paths and error conditions
Use table-driven tests for testing multiple scenarios
Include integration tests for command flows
Test CLI end-to-end when possible
Use test fixtures for complex inputs
Consider using testify/mock for creating mock implementations
**/*_test.go
: Always use t.Skipf() with a reason for skipped tests; never use t.Skip() or reasonless t.Skipf().
Test files must mirror implementation structure and naming (e.g., aws_ssm_store_test.go).
Use table-driven unit tests and mock interfaces for external dependencies; target >80% coverage.
Files:
internal/exec/describe_dependents_test.go
internal/exec/describe_affected_test.go
go.mod
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
Manage dependencies with Go modules
Files:
go.mod
🧠 Learnings (21)
📓 Common learnings
Learnt from: samtholiya
PR: cloudposse/atmos#955
File: tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden:0-0
Timestamp: 2025-01-19T15:49:15.593Z
Learning: In future commits, the help text for Atmos CLI commands should be limited to only show component and stack parameters for commands that actually use them. This applies to the example usage section in command help text.
📚 Learning: 2025-09-07T17:38:40.486Z
Learnt from: osterman
PR: cloudposse/atmos#1466
File: website/src/components/Screengrabs/demo-stacks/deploy-staging.html:28-37
Timestamp: 2025-09-07T17:38:40.486Z
Learning: Files in website/src/components/Screengrabs/ directories are programmatically generated and should not be manually edited or reviewed for code suggestions.
Applied to files:
demo/screengrabs/Makefile
website/docs/cli/commands/packer/packer-build.mdx
📚 Learning: 2025-09-07T15:13:17.831Z
Learnt from: CR
PR: cloudposse/atmos#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-07T15:13:17.831Z
Learning: Applies to website/docs/cli/commands/*/*.mdx : Follow Docusaurus frontmatter and section ordering: Usage → Examples → Arguments → Flags; include purpose note and screengrab.
Applied to files:
website/docs/cli/commands/packer/usage.mdx
📚 Learning: 2024-11-12T03:15:15.627Z
Learnt from: aknysh
PR: cloudposse/atmos#775
File: examples/quick-start-advanced/Dockerfile:9-9
Timestamp: 2024-11-12T03:15:15.627Z
Learning: It is acceptable to set `ARG ATMOS_VERSION` to a future version like `1.105.0` in `examples/quick-start-advanced/Dockerfile` if that will be the next release.
Applied to files:
examples/quick-start-advanced/Dockerfile
website/docs/integrations/atlantis.mdx
📚 Learning: 2024-11-23T00:13:22.004Z
Learnt from: osterman
PR: cloudposse/atmos#801
File: examples/quick-start-advanced/Dockerfile:9-9
Timestamp: 2024-11-23T00:13:22.004Z
Learning: When updating the `ATMOS_VERSION` in Dockerfiles, the team prefers to pin to the next future version when the PR merges, even if the version is not yet released.
Applied to files:
examples/quick-start-advanced/Dockerfile
website/docs/integrations/atlantis.mdx
📚 Learning: 2025-01-19T15:49:15.593Z
Learnt from: samtholiya
PR: cloudposse/atmos#955
File: tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden:0-0
Timestamp: 2025-01-19T15:49:15.593Z
Learning: In future commits, the help text for Atmos CLI commands should be limited to only show component and stack parameters for commands that actually use them. This applies to the example usage section in command help text.
Applied to files:
website/docs/cli/commands/describe/describe-dependents.mdx
📚 Learning: 2025-06-23T02:14:30.937Z
Learnt from: aknysh
PR: cloudposse/atmos#1327
File: cmd/terraform.go:111-117
Timestamp: 2025-06-23T02:14:30.937Z
Learning: In cmd/terraform.go, flags for the DescribeAffected function are added dynamically at runtime when info.Affected is true. This is intentional to avoid exposing internal flags like "file", "format", "verbose", "include-spacelift-admin-stacks", "include-settings", and "upload" in the terraform command interface, while still providing them for the shared DescribeAffected function used by both `atmos describe affected` and `atmos terraform apply --affected`.
Applied to files:
cmd/describe_dependents.go
internal/exec/describe_affected_utils_2.go
cmd/describe_affected.go
internal/exec/describe_affected.go
internal/exec/terraform_utils.go
internal/exec/describe_affected_test.go
website/docs/cli/commands/describe/describe-affected.mdx
📚 Learning: 2025-08-16T23:32:40.412Z
Learnt from: aknysh
PR: cloudposse/atmos#1405
File: internal/exec/describe_dependents_test.go:455-456
Timestamp: 2025-08-16T23:32:40.412Z
Learning: In the cloudposse/atmos Go codebase, `InitCliConfig` returns a `schema.AtmosConfiguration` value (not a pointer), while `ExecuteDescribeDependents` expects a `*schema.AtmosConfiguration` pointer parameter. Therefore, when passing the result of `InitCliConfig` to `ExecuteDescribeDependents`, use `&atmosConfig` to pass the address of the value.
Applied to files:
internal/exec/atmos.go
internal/exec/describe_dependents.go
internal/exec/describe_dependents_test.go
internal/exec/describe_affected_test.go
📚 Learning: 2025-08-16T23:33:07.477Z
Learnt from: aknysh
PR: cloudposse/atmos#1405
File: internal/exec/describe_dependents_test.go:651-652
Timestamp: 2025-08-16T23:33:07.477Z
Learning: In the cloudposse/atmos Go codebase, ExecuteDescribeDependents expects a pointer to AtmosConfiguration (*schema.AtmosConfiguration), so when calling it with a value returned by cfg.InitCliConfig (which returns schema.AtmosConfiguration), the address-of operator (&) is necessary: ExecuteDescribeDependents(&atmosConfig, ...).
Applied to files:
internal/exec/atmos.go
internal/exec/describe_dependents.go
internal/exec/describe_dependents_test.go
internal/exec/describe_affected_test.go
📚 Learning: 2024-11-13T21:37:07.852Z
Learnt from: Cerebrovinny
PR: cloudposse/atmos#764
File: internal/exec/describe_stacks.go:289-295
Timestamp: 2024-11-13T21:37:07.852Z
Learning: In the `internal/exec/describe_stacks.go` file of the `atmos` project written in Go, avoid extracting the stack name handling logic into a helper function within the `ExecuteDescribeStacks` method, even if the logic appears duplicated.
Applied to files:
internal/exec/atmos.go
internal/exec/describe_dependents.go
internal/exec/describe_dependents_test.go
📚 Learning: 2024-12-07T16:16:13.038Z
Learnt from: Listener430
PR: cloudposse/atmos#825
File: internal/exec/helmfile_generate_varfile.go:28-31
Timestamp: 2024-12-07T16:16:13.038Z
Learning: In `internal/exec/helmfile_generate_varfile.go`, the `--help` command (`./atmos helmfile generate varfile --help`) works correctly without requiring stack configurations, and the only change needed was to make `ProcessCommandLineArgs` exportable by capitalizing its name.
Applied to files:
internal/exec/atmos.go
📚 Learning: 2025-01-09T22:27:25.538Z
Learnt from: samtholiya
PR: cloudposse/atmos#914
File: cmd/validate_stacks.go:20-23
Timestamp: 2025-01-09T22:27:25.538Z
Learning: The validate commands in Atmos can have different help handling implementations. Specifically, validate_component.go and validate_stacks.go are designed to handle help requests differently, with validate_stacks.go including positional argument checks while validate_component.go does not.
Applied to files:
website/docs/cli/commands/packer/packer-validate.mdx
📚 Learning: 2025-05-22T19:58:32.988Z
Learnt from: samtholiya
PR: cloudposse/atmos#1255
File: cmd/describe_affected.go:122-123
Timestamp: 2025-05-22T19:58:32.988Z
Learning: The "pager" flag is defined as a PersistentFlag at the describe command level in cmd/describe.go, making it available to all subcommands including describeAffectedCmd without needing to redeclare it.
Applied to files:
cmd/describe_affected.go
📚 Learning: 2024-12-07T16:19:01.683Z
Learnt from: aknysh
PR: cloudposse/atmos#825
File: internal/exec/terraform.go:30-30
Timestamp: 2024-12-07T16:19:01.683Z
Learning: In `internal/exec/terraform.go`, skipping stack validation when help flags are present is not necessary.
Applied to files:
internal/exec/terraform_utils.go
📚 Learning: 2024-10-31T19:25:41.298Z
Learnt from: osterman
PR: cloudposse/atmos#727
File: internal/exec/terraform_clean.go:233-235
Timestamp: 2024-10-31T19:25:41.298Z
Learning: When specifying color values in functions like `confirmDeleteTerraformLocal` in `internal/exec/terraform_clean.go`, avoid hardcoding color values. Instead, use predefined color constants or allow customization through configuration settings to improve accessibility and user experience across different terminals and themes.
Applied to files:
internal/exec/terraform_utils.go
📚 Learning: 2025-09-07T15:13:17.831Z
Learnt from: CR
PR: cloudposse/atmos#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-07T15:13:17.831Z
Learning: Applies to internal/exec/stack_processor_utils.go : Stack processing utilities should reside here; test multiple inheritance scenarios.
Applied to files:
internal/exec/describe_dependents.go
📚 Learning: 2025-07-01T02:22:25.901Z
Learnt from: CR
PR: cloudposse/atmos#0
File: .cursor/rules/atmos-rules.mdc:0-0
Timestamp: 2025-07-01T02:22:25.901Z
Learning: Applies to **/*_test.go : Use table-driven tests for testing multiple scenarios
Applied to files:
internal/exec/describe_dependents_test.go
📚 Learning: 2025-07-01T02:22:25.901Z
Learnt from: CR
PR: cloudposse/atmos#0
File: .cursor/rules/atmos-rules.mdc:0-0
Timestamp: 2025-07-01T02:22:25.901Z
Learning: Applies to go.mod : Manage dependencies with Go modules
Applied to files:
go.mod
📚 Learning: 2025-01-17T00:21:32.987Z
Learnt from: aknysh
PR: cloudposse/atmos#944
File: go.mod:3-3
Timestamp: 2025-01-17T00:21:32.987Z
Learning: Go version 1.23.0 was deliberately introduced by the maintainer (aknysh) in January 2025. While this might be a pre-release or development version of Go, it has been approved for use in this project.
Applied to files:
go.mod
📚 Learning: 2025-01-17T00:21:32.987Z
Learnt from: aknysh
PR: cloudposse/atmos#944
File: go.mod:3-3
Timestamp: 2025-01-17T00:21:32.987Z
Learning: The project uses Go version 1.23.0 which has been confirmed by the maintainer to be working in production for months. Do not flag this as an invalid Go version.
Applied to files:
go.mod
📚 Learning: 2025-07-05T20:59:02.914Z
Learnt from: aknysh
PR: cloudposse/atmos#1363
File: internal/exec/template_utils.go:18-18
Timestamp: 2025-07-05T20:59:02.914Z
Learning: In the Atmos project, gomplate v4 is imported with a blank import (`_ "github.com/hairyhenderson/gomplate/v4"`) alongside v3 imports to resolve AWS SDK version conflicts. V3 uses older AWS SDK versions that conflict with newer AWS modules used by Atmos. A full migration to v4 requires extensive refactoring due to API changes and should be handled in a separate PR.
Applied to files:
go.mod
🧬 Code graph analysis (3)
internal/exec/atmos.go (1)
internal/exec/describe_dependents.go (1)
ExecuteDescribeDependents
(108-357)
internal/exec/describe_dependents_test.go (2)
pkg/schema/schema.go (2)
AtmosConfiguration
(25-60)Dependent
(813-828)internal/exec/describe_dependents.go (1)
ExecuteDescribeDependents
(108-357)
internal/exec/describe_affected_test.go (2)
pkg/schema/schema.go (4)
AtmosConfiguration
(25-60)Affected
(763-782)Dependent
(813-828)Settings
(834-838)internal/exec/describe_affected_helpers.go (1)
ExecuteDescribeAffectedWithTargetRepoPath
(346-405)
🪛 GitHub Actions: Dependency Review
go.mod
[error] 1-1: Step 'Dependency review' failed: incompatible licenses detected for module github.com/redis/go-redis/[email protected] (BSD-2-Clause).
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
- GitHub Check: Analyze (go)
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Build (macos-latest, macos)
- GitHub Check: Build (ubuntu-latest, linux)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (go)
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (go)
- GitHub Check: website-deploy-preview
- GitHub Check: Summary
🔇 Additional comments (35)
website/docs/integrations/atlantis.mdx (1)
676-676
: ATMOS_VERSION bump looks good; confirm consistency repo-wide.Matches the Dockerfile bump to 1.190.0. Please sanity-check other docs/snippets reference the same version.
website/docs/cli/commands/packer/packer-output.mdx (2)
8-8
: Switch to Screengrab import: good.
20-21
: Screengrab placement: good.website/docs/cli/commands/packer/packer-init.mdx (2)
8-8
: Switch to Screengrab import: good.
18-19
: Screengrab placement: good.demo/screengrabs/Makefile (1)
4-4
: Comment update matches new destination path.website/docs/cli/commands/packer/packer-inspect.mdx (2)
8-8
: Switch to Screengrab import: good.
19-20
: Screengrab placement: good.examples/quick-start-advanced/Dockerfile (1)
9-9
: Bump to ATMOS_VERSION=1.190.0 is fine.Per team practice, pinning to the next release is acceptable. Ensure the apt repo has this version when the PR lands to avoid build breaks.
website/docs/cli/commands/packer/usage.mdx (1)
18-18
: Screengrab addition: good.tests/fixtures/scenarios/atmos-describe-affected-with-dependents-and-locked/stacks/deploy/network/us-west-2.yaml (1)
17-18
: Correct: metadata.enabled=false fixture matches new behavior.This cleanly exercises exclusion of disabled components from affected/dependents.
website/docs/cli/commands/packer/packer-build.mdx (2)
8-8
: Screengrab import: looks good.Migration to Screengrab component is consistent with site conventions.
21-21
: Help screengrab placement: LGTM.Screengrab before Usage matches the docs pattern.
website/docs/cli/commands/packer/packer-validate.mdx (2)
8-8
: Screengrab import: LGTM.Consistent with other packer docs.
18-19
: Help screengrab addition: LGTM.Placement after the purpose note reads well.
website/docs/cli/commands/describe/describe-affected.mdx (1)
104-110
: Presence-based toggles: nice.Examples align with the new toggle style and include the new --dependents-stack.
cmd/describe_dependents.go (1)
118-121
: Flag wiring: LGTM.The flag is parsed into DescribeDependentsExecProps correctly.
internal/exec/describe_affected_utils_2.go (2)
448-462
: Threading dependentsStack: LGTM.Parameter is propagated into ExecuteDescribeDependents as intended.
490-512
: Recursive propagation: LGTM.Dependents recursion preserves the stack filter.
internal/exec/describe_affected.go (4)
49-50
: New CLI arg is well-scoped.Adding
DependentsStack
to the args struct is consistent with the new behavior. LGTM.
97-104
: ThreadingdependentsStack
through the callback is correct.The signature change keeps the dependency injection pattern intact. LGTM.
271-277
: Correctly applying the filter when enriching dependents.Passing
a.DependentsStack
intoaddDependentsToAffected
matches the new semantics. LGTM.
183-184
: No explicitviper.BindEnv
fordependents-stack
found in cmd/describe_affected.go. Please verify whether flags are bound globally via Viper in your root command (e.g.,viper.BindPFlags(rootCmd.PersistentFlags())
):rg -n --type=go 'BindPFlags' -C2 cmd
internal/exec/describe_dependents_test.go (2)
498-499
: Correct pointer usage withInitCliConfig
result.Passing
&atmosConfig
matches the function’s pointer contract. LGTM.
697-698
: Explicit emptydependentsStack
for pattern scenario.Call site updated correctly with the new param. LGTM.
internal/exec/describe_dependents.go (2)
47-48
: Signature threading looks correct.executeDescribeDependents now carries dependentsStack through the call chain. LGTM.
126-129
: Correctly restricts stack scope.Passing dependentsStack into ExecuteDescribeStacks is the right place to apply the filter. LGTM.
internal/exec/describe_affected_test.go (8)
43-46
: Test double signature updated—LGTM.Stub now accepts dependentsStack and stays noop. Good.
589-591
: New addDependentsToAffected param—LGTM.Passing an explicit "" for dependents stack matches the scenario.
730-915
: Great coverage for dependents filtered to ue1-network.Scenario asserts nested dependents and correct filtering. LGTM.
95-127
: Repo path self-compare case—LGTM.Clear, fast sanity check. No issues.
129-176
: Fixture setup is resilient.Copy options skip sockets and node_modules; nice.
255-269
: Affected-only scenarios remain order-agnostic—LGTM.Expectations updated; use of ElementsMatch avoids flaky ordering.
Also applies to: 343-357, 396-410
570-591
: Plumbing dependentsStack into addDependentsToAffected—LGTM.Calls now pass the filter correctly across scenarios.
Also applies to: 705-726, 901-913, 1004-1013
1-19
: Sanity on helper signatures in tests.Constructors and mocks unaffected. Good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
website/docs/cli/commands/describe/describe-dependents.mdx (2)
196-199
: Fix mismatched stack_slug in example.Slug should match the
tenant1-ue2-test-1
stack.- "stack_slug": "tenant1-ue2-dev-top-level-component1", + "stack_slug": "tenant1-ue2-test-1-top-level-component1",
392-409
: Fix inconsistent stack_slug values in “Output Example”.Both entries’ slugs should match their respective stacks.
- "stack_slug": "tenant1-ue2-dev-top-level-component2", + "stack_slug": "tenant1-ue2-test-1-top-level-component2", @@ - "stack_slug": "tenant1-ue2-test-1-top-level-component1", + "stack_slug": "tenant1-ue2-dev-top-level-component1",go.mod (1)
3-3
: Pin Go version in CI workflows
.github/workflows/autofix.yml
and.github/workflows/test.yml
invokeactions/setup-go
without ago-version
; addwith: go-version: "1.24.x"
(e.g.1.24.6
) to match thego.mod
setting.
♻️ Duplicate comments (2)
website/docs/cli/commands/describe/describe-dependents.mdx (1)
376-377
: Good: disabled-component behavior documented.This addresses prior feedback to surface
metadata.enabled: false
filtering.go.mod (1)
72-72
: Blocker: Dependency Review failing on go-redis v9.13.0 (BSD-2-Clause).CI is red. Options to unblock:
- A) Revert to the previous passing version (looks like v9.12.1 per history).
- B) Update dependency-review policy/allowlist to permit BSD-2-Clause for this module/version.
- C) Add an explicit exception for github.com/redis/go-redis/[email protected].
Quick fix (A) diff:
- github.com/redis/go-redis/v9 v9.13.0 + github.com/redis/go-redis/v9 v9.12.1Then run: go mod tidy
I can open a follow-up PR to tweak policy if you prefer B/C.
🧹 Nitpick comments (2)
website/docs/cli/commands/describe/describe-dependents.mdx (2)
242-250
: Examples updated; add a one-liner clarifying the two-stack semantics.Spell out that -s selects the stack containing the target component, while --dependents-stack filters the returned dependents to a different stack to avoid ambiguity.
atmos describe dependents <component> -s <stack> --dependents-stack <stack> + +:::tip +`-s <stack>` selects the stack where the target `<component>` is defined. +`--dependents-stack <stack>` filters results to dependents that live in that stack. +:::
314-319
: Clarify what “specific stack” refers to.Avoid confusion between the source stack (-s) and the destination stack (dependents). Add one sentence.
- <dd> - Filter the dependent components by a specific stack. + <dd> + Filter the dependent components by a specific stack (the stack where the dependent components are provisioned).
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
go.sum
is excluded by!**/*.sum
📒 Files selected for processing (3)
go.mod
(8 hunks)website/docs/cli/commands/describe/describe-affected.mdx
(10 hunks)website/docs/cli/commands/describe/describe-dependents.mdx
(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- website/docs/cli/commands/describe/describe-affected.mdx
🧰 Additional context used
📓 Path-based instructions (3)
website/**
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
website/**
: Update website documentation in the website/ directory when adding new features
Follow the website's documentation structure and style
Keep website code in the website/ directory
Follow the existing website architecture and style
Document new features on the website
Include examples and use cases in website documentation
Files:
website/docs/cli/commands/describe/describe-dependents.mdx
website/docs/cli/commands/*/*.mdx
📄 CodeRabbit inference engine (CLAUDE.md)
website/docs/cli/commands/*/*.mdx
: All new commands/flags/parameters must have Docusaurus docs at website/docs/cli/commands//.mdx.
Use definition listsfor arguments/flags in MDX docs (no tables).
Follow Docusaurus frontmatter and section ordering: Usage → Examples → Arguments → Flags; include purpose note and screengrab.
Files:
website/docs/cli/commands/describe/describe-dependents.mdx
go.mod
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
Manage dependencies with Go modules
Files:
go.mod
🧠 Learnings (6)
📓 Common learnings
Learnt from: aknysh
PR: cloudposse/atmos#944
File: go.mod:206-206
Timestamp: 2025-01-17T00:18:57.769Z
Learning: For indirect dependencies with license compliance issues in the cloudposse/atmos repository, the team prefers to handle them in follow-up PRs rather than blocking the current changes, as these issues often require deeper investigation of the dependency tree.
📚 Learning: 2025-01-19T15:49:15.593Z
Learnt from: samtholiya
PR: cloudposse/atmos#955
File: tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden:0-0
Timestamp: 2025-01-19T15:49:15.593Z
Learning: In future commits, the help text for Atmos CLI commands should be limited to only show component and stack parameters for commands that actually use them. This applies to the example usage section in command help text.
Applied to files:
website/docs/cli/commands/describe/describe-dependents.mdx
📚 Learning: 2025-07-01T02:22:25.901Z
Learnt from: CR
PR: cloudposse/atmos#0
File: .cursor/rules/atmos-rules.mdc:0-0
Timestamp: 2025-07-01T02:22:25.901Z
Learning: Applies to go.mod : Manage dependencies with Go modules
Applied to files:
go.mod
📚 Learning: 2025-01-17T00:21:32.987Z
Learnt from: aknysh
PR: cloudposse/atmos#944
File: go.mod:3-3
Timestamp: 2025-01-17T00:21:32.987Z
Learning: Go version 1.23.0 was deliberately introduced by the maintainer (aknysh) in January 2025. While this might be a pre-release or development version of Go, it has been approved for use in this project.
Applied to files:
go.mod
📚 Learning: 2025-01-17T00:21:32.987Z
Learnt from: aknysh
PR: cloudposse/atmos#944
File: go.mod:3-3
Timestamp: 2025-01-17T00:21:32.987Z
Learning: The project uses Go version 1.23.0 which has been confirmed by the maintainer to be working in production for months. Do not flag this as an invalid Go version.
Applied to files:
go.mod
📚 Learning: 2025-07-05T20:59:02.914Z
Learnt from: aknysh
PR: cloudposse/atmos#1363
File: internal/exec/template_utils.go:18-18
Timestamp: 2025-07-05T20:59:02.914Z
Learning: In the Atmos project, gomplate v4 is imported with a blank import (`_ "github.com/hairyhenderson/gomplate/v4"`) alongside v3 imports to resolve AWS SDK version conflicts. V3 uses older AWS SDK versions that conflict with newer AWS modules used by Atmos. A full migration to v4 requires extensive refactoring due to API changes and should be handled in a separate PR.
Applied to files:
go.mod
🪛 GitHub Actions: Dependency Review
go.mod
[error] 1-1: Dependency review detected incompatible licenses for dependency github.com/redis/go-redis/[email protected] (BSD-2-Clause) listed in go.mod.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (go)
- GitHub Check: Build (macos-latest, macos)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Build (ubuntu-latest, linux)
- GitHub Check: Summary
🔇 Additional comments (2)
go.mod (2)
27-27
: LGTM on these patch/minor bumps.No known breaking changes in these libs for typical Atmos usage. After resolving the go-redis blocker, run go mod tidy and a quick build.
Also applies to: 48-48, 55-55, 61-61, 71-71, 77-78, 82-82, 83-83, 84-84, 85-85, 86-86, 87-87
156-156
: Indirect bumps validated – AWS SDK v2 unified at v1.37.2; [email protected] & [email protected]; build passes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
pkg/describe/describe_dependents_test.go (2)
41-41
: Add coverage for non-empty --dependents-stack and disabled components.Please add a table-driven test that exercises:
- dependentsStack set to a specific stack (expect all results’ Stack == that value, and count reduced as appropriate).
- a stack where a dependent is metadata.enabled: false (expect it excluded).
Example new test (adapt names/fixtures as needed):
func TestDescribeDependents_FilterByDependentsStack(t *testing.T) { atmosConfig, err := cfg.InitCliConfig(schema.ConfigAndStacksInfo{}, true) require.NoError(t, err) component := "test/test-component" stack := "tenant1-ue2-dev" dependents, err := e.ExecuteDescribeDependents(&atmosConfig, component, stack, false, true, true, nil, "tenant1-ue2-dev") require.NoError(t, err) for _, d := range dependents { assert.Equal(t, "tenant1-ue2-dev", d.Stack) } }Happy to draft a full table-driven suite if you want.
24-24
: Fail fast on errors in tests.Prefer require.NoError so subsequent assertions don’t run on bad state.
@@ -import ( - "testing" - - "github.com/stretchr/testify/assert" +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) @@ -assert.Nil(t, err) +require.NoError(t, err) @@ -assert.Nil(t, err) +require.NoError(t, err)Also applies to: 42-42
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
pkg/describe/describe_dependents_test.go
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*.go
: Use Viper for managing configuration, environment variables, and flags
Use interfaces for external dependencies to facilitate mocking
All code must pass golangci-lint checks
Follow Go's error handling idioms
Use meaningful error messages
Wrap errors with context using fmt.Errorf("context: %w", err)
Consider using a custom error type for domain-specific errors
Follow standard Go coding style
Use gofmt and goimports to format code
Prefer short, descriptive variable names
Use snake_case for environment variables
Document all exported functions, types, and methods
Document complex logic with inline comments
Follow Go's documentation conventions
Use Viper for configuration management
Support configuration via files, environment variables, and flags
Follow the precedence order: flags > environment variables > config file > defaults
**/*.go
: All comments in Go code must end with periods (enforced by golangci-lint godot).
Wrap all returned errors using static errors from the errors package; never return dynamic errors directly.
Always bind environment variables with viper.BindEnv() and provide ATMOS_ alternatives for each external var.
Separate structured logging from UI output: use stderr for prompts/errors to user; stdout only for data; never use logging for UI.
Most text UI must go to stderr; only data/results to stdout. Prefer utils.PrintfMessageToTUI for UI messages.
For non-standard execution paths, capture telemetry with telemetry.CaptureCmd or telemetry.CaptureCmdString and never capture user data.
Ensure cross-platform compatibility: prefer SDKs to external binaries, use filepath/os/runtime for portability, and add build constraints when needed.
Files:
pkg/describe/describe_dependents_test.go
**/*_test.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*_test.go
: Every new feature must include comprehensive unit tests
Test both happy paths and error conditions
Use table-driven tests for testing multiple scenarios
Include integration tests for command flows
Test CLI end-to-end when possible
Use test fixtures for complex inputs
Consider using testify/mock for creating mock implementations
**/*_test.go
: Always use t.Skipf() with a reason for skipped tests; never use t.Skip() or reasonless t.Skipf().
Test files must mirror implementation structure and naming (e.g., aws_ssm_store_test.go).
Use table-driven unit tests and mock interfaces for external dependencies; target >80% coverage.
Files:
pkg/describe/describe_dependents_test.go
pkg/**/*_test.go
📄 CodeRabbit inference engine (CLAUDE.md)
Unit tests reside under pkg/ alongside implementations.
Files:
pkg/describe/describe_dependents_test.go
🧠 Learnings (4)
📓 Common learnings
Learnt from: aknysh
PR: cloudposse/atmos#944
File: go.mod:206-206
Timestamp: 2025-01-17T00:18:57.769Z
Learning: For indirect dependencies with license compliance issues in the cloudposse/atmos repository, the team prefers to handle them in follow-up PRs rather than blocking the current changes, as these issues often require deeper investigation of the dependency tree.
📚 Learning: 2025-08-16T23:32:40.412Z
Learnt from: aknysh
PR: cloudposse/atmos#1405
File: internal/exec/describe_dependents_test.go:455-456
Timestamp: 2025-08-16T23:32:40.412Z
Learning: In the cloudposse/atmos Go codebase, `InitCliConfig` returns a `schema.AtmosConfiguration` value (not a pointer), while `ExecuteDescribeDependents` expects a `*schema.AtmosConfiguration` pointer parameter. Therefore, when passing the result of `InitCliConfig` to `ExecuteDescribeDependents`, use `&atmosConfig` to pass the address of the value.
Applied to files:
pkg/describe/describe_dependents_test.go
📚 Learning: 2025-08-16T23:33:07.477Z
Learnt from: aknysh
PR: cloudposse/atmos#1405
File: internal/exec/describe_dependents_test.go:651-652
Timestamp: 2025-08-16T23:33:07.477Z
Learning: In the cloudposse/atmos Go codebase, ExecuteDescribeDependents expects a pointer to AtmosConfiguration (*schema.AtmosConfiguration), so when calling it with a value returned by cfg.InitCliConfig (which returns schema.AtmosConfiguration), the address-of operator (&) is necessary: ExecuteDescribeDependents(&atmosConfig, ...).
Applied to files:
pkg/describe/describe_dependents_test.go
📚 Learning: 2024-11-13T21:37:07.852Z
Learnt from: Cerebrovinny
PR: cloudposse/atmos#764
File: internal/exec/describe_stacks.go:289-295
Timestamp: 2024-11-13T21:37:07.852Z
Learning: In the `internal/exec/describe_stacks.go` file of the `atmos` project written in Go, avoid extracting the stack name handling logic into a helper function within the `ExecuteDescribeStacks` method, even if the logic appears duplicated.
Applied to files:
pkg/describe/describe_dependents_test.go
🧬 Code graph analysis (1)
pkg/describe/describe_dependents_test.go (1)
internal/exec/describe_dependents.go (1)
ExecuteDescribeDependents
(108-357)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Build (ubuntu-latest, linux)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Analyze (go)
- GitHub Check: Lint (golangci)
- GitHub Check: website-deploy-preview
- GitHub Check: Summary
🔇 Additional comments (2)
pkg/describe/describe_dependents_test.go (2)
23-23
: Correct threading of new parameter.Passing "" for dependentsStack preserves prior behavior; using &atmosConfig matches the expected pointer param. Looks good.
23-41
: AllExecuteDescribeDependents
call sites are using the new 8-argument signature
Manual inspection of each invocation (tests and production code) confirms exactly eight arguments everywhere.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1477 +/- ##
==========================================
+ Coverage 55.96% 56.04% +0.08%
==========================================
Files 274 274
Lines 28947 28966 +19
==========================================
+ Hits 16200 16235 +35
+ Misses 10955 10938 -17
- Partials 1792 1793 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
cmd/describe_stacks.go (1)
101-104
: Defaulting to true is fine; fix godot and consider deriving defaults from flags to avoid duplication.
- Nit: comment must end with a period (golangci-lint godot).
- Optional: instead of hardcoding defaults here and in flag definitions, read the flag values (which include defaults) when not explicitly set to keep a single source of truth.
Apply this minimal lint fix:
- // `true` by default + // Defaults to true. describe.ProcessTemplates = true describe.ProcessYamlFunctions = trueIf you want to remove duplication, add this after the for-loop (before
return validateFormat(describe)
):// Ensure defaults mirror flag defaults when flags are not provided. if !flags.Changed("process-templates") { describe.ProcessTemplates, err = flags.GetBool("process-templates") errUtils.CheckErrorPrintAndExit(err, "", "") } if !flags.Changed("process-functions") { describe.ProcessYamlFunctions, err = flags.GetBool("process-functions") errUtils.CheckErrorPrintAndExit(err, "", "") }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
go.sum
is excluded by!**/*.sum
📒 Files selected for processing (2)
cmd/describe_stacks.go
(1 hunks)go.mod
(9 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- go.mod
🧰 Additional context used
📓 Path-based instructions (3)
cmd/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
cmd/*.go
: Implement each Cobra command in a separate file under the cmd/ directory
Use kebab-case for command-line flags
Provide comprehensive help text for all commands and flags
Include examples in command help
Provide meaningful feedback to users in command implementation
Include progress indicators for long-running operations
Provide clear error messages to users
Include troubleshooting hints when appropriate
Log detailed errors for debugging
Files:
cmd/describe_stacks.go
**/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*.go
: Use Viper for managing configuration, environment variables, and flags
Use interfaces for external dependencies to facilitate mocking
All code must pass golangci-lint checks
Follow Go's error handling idioms
Use meaningful error messages
Wrap errors with context using fmt.Errorf("context: %w", err)
Consider using a custom error type for domain-specific errors
Follow standard Go coding style
Use gofmt and goimports to format code
Prefer short, descriptive variable names
Use snake_case for environment variables
Document all exported functions, types, and methods
Document complex logic with inline comments
Follow Go's documentation conventions
Use Viper for configuration management
Support configuration via files, environment variables, and flags
Follow the precedence order: flags > environment variables > config file > defaults
**/*.go
: All comments in Go code must end with periods (enforced by golangci-lint godot).
Wrap all returned errors using static errors from the errors package; never return dynamic errors directly.
Always bind environment variables with viper.BindEnv() and provide ATMOS_ alternatives for each external var.
Separate structured logging from UI output: use stderr for prompts/errors to user; stdout only for data; never use logging for UI.
Most text UI must go to stderr; only data/results to stdout. Prefer utils.PrintfMessageToTUI for UI messages.
For non-standard execution paths, capture telemetry with telemetry.CaptureCmd or telemetry.CaptureCmdString and never capture user data.
Ensure cross-platform compatibility: prefer SDKs to external binaries, use filepath/os/runtime for portability, and add build constraints when needed.
Files:
cmd/describe_stacks.go
cmd/**/!(*_test).go
📄 CodeRabbit inference engine (CLAUDE.md)
cmd/**/!(*_test).go
: One Cobra command per file in cmd/.
Use //go:embed to load *_usage.md examples and utils.PrintfMarkdown() to render them in commands.
Files:
cmd/describe_stacks.go
🧠 Learnings (3)
📓 Common learnings
Learnt from: aknysh
PR: cloudposse/atmos#944
File: go.mod:206-206
Timestamp: 2025-01-17T00:18:57.769Z
Learning: For indirect dependencies with license compliance issues in the cloudposse/atmos repository, the team prefers to handle them in follow-up PRs rather than blocking the current changes, as these issues often require deeper investigation of the dependency tree.
📚 Learning: 2025-06-23T02:14:30.937Z
Learnt from: aknysh
PR: cloudposse/atmos#1327
File: cmd/terraform.go:111-117
Timestamp: 2025-06-23T02:14:30.937Z
Learning: In cmd/terraform.go, flags for the DescribeAffected function are added dynamically at runtime when info.Affected is true. This is intentional to avoid exposing internal flags like "file", "format", "verbose", "include-spacelift-admin-stacks", "include-settings", and "upload" in the terraform command interface, while still providing them for the shared DescribeAffected function used by both `atmos describe affected` and `atmos terraform apply --affected`.
Applied to files:
cmd/describe_stacks.go
📚 Learning: 2024-12-07T16:16:13.038Z
Learnt from: Listener430
PR: cloudposse/atmos#825
File: internal/exec/helmfile_generate_varfile.go:28-31
Timestamp: 2024-12-07T16:16:13.038Z
Learning: In `internal/exec/helmfile_generate_varfile.go`, the `--help` command (`./atmos helmfile generate varfile --help`) works correctly without requiring stack configurations, and the only change needed was to make `ProcessCommandLineArgs` exportable by capitalizing its name.
Applied to files:
cmd/describe_stacks.go
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: Build (ubuntu-latest, linux)
- GitHub Check: Build (macos-latest, macos)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Analyze (go)
- GitHub Check: Lint (golangci)
- GitHub Check: website-deploy-preview
- GitHub Check: Summary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
cmd/describe_stacks_test.go (3)
41-92
: Add negative toggle coverage for process flags.Include a table case that explicitly disables YAML functions to guard the mapping.
Apply:
@@ tests := []struct { @@ }{ @@ { name: "Set format explicitly, no override", @@ }, + { + name: "Disable YAML functions via flag", + setFlags: func(fs *pflag.FlagSet) { + fs.Parse([]string{ + "--process-functions=false", + }) + }, + describe: &exec.DescribeStacksArgs{}, + expected: &exec.DescribeStacksArgs{ + Format: "yaml", + ProcessTemplates: true, + ProcessYamlFunctions: false, + }, + }, }
154-165
: Use t.Setenv to simplify env setup/teardown.Removes manual unset and avoids leaking env changes between tests.
Apply:
@@ -err := os.Setenv("ATMOS_CLI_CONFIG_PATH", stacksPath) -assert.NoError(t, err, "Setting 'ATMOS_CLI_CONFIG_PATH' environment variable should execute without error") - -err = os.Setenv("ATMOS_BASE_PATH", stacksPath) -assert.NoError(t, err, "Setting 'ATMOS_BASE_PATH' environment variable should execute without error") - -// Unset ENV variables after testing -defer func() { - os.Unsetenv("ATMOS_CLI_CONFIG_PATH") - os.Unsetenv("ATMOS_BASE_PATH") -}() +t.Setenv("ATMOS_CLI_CONFIG_PATH", stacksPath) +t.Setenv("ATMOS_BASE_PATH", stacksPath)And drop the unused import:
@@ -import ( - "fmt" - "os" - "testing" +import ( + "fmt" + "testing"
42-42
: Fix trailing periods in comments to satisfy godot.Golint rule requires periods at the end of comments.
Apply (and similar nearby):
-// Initialize test cases +// Initialize test cases. -// No flags set +// No flags set. -// Create a new flag set +// Create a new flag set. -// Define all flags to match the flagsKeyValue map +// Define all flags to match the flagsKeyValue map. -// Set flags as specified in the test case +// Set flags as specified in the test case. -// Call the function +// Call the function. -// Assert the struct matches the expected values +// Assert the struct matches the expected values. -// Define only the flags we plan to change +// Define only the flags we plan to change. -// Unset ENV variables after testing +// Unset ENV variables after testing.Also applies to: 71-71, 96-96, 99-99, 111-111, 114-114, 130-130, 141-141, 160-160
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
go.sum
is excluded by!**/*.sum
📒 Files selected for processing (2)
cmd/describe_stacks_test.go
(3 hunks)go.mod
(9 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- go.mod
🧰 Additional context used
📓 Path-based instructions (4)
cmd/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
cmd/*.go
: Implement each Cobra command in a separate file under the cmd/ directory
Use kebab-case for command-line flags
Provide comprehensive help text for all commands and flags
Include examples in command help
Provide meaningful feedback to users in command implementation
Include progress indicators for long-running operations
Provide clear error messages to users
Include troubleshooting hints when appropriate
Log detailed errors for debugging
Files:
cmd/describe_stacks_test.go
**/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*.go
: Use Viper for managing configuration, environment variables, and flags
Use interfaces for external dependencies to facilitate mocking
All code must pass golangci-lint checks
Follow Go's error handling idioms
Use meaningful error messages
Wrap errors with context using fmt.Errorf("context: %w", err)
Consider using a custom error type for domain-specific errors
Follow standard Go coding style
Use gofmt and goimports to format code
Prefer short, descriptive variable names
Use snake_case for environment variables
Document all exported functions, types, and methods
Document complex logic with inline comments
Follow Go's documentation conventions
Use Viper for configuration management
Support configuration via files, environment variables, and flags
Follow the precedence order: flags > environment variables > config file > defaults
**/*.go
: All comments in Go code must end with periods (enforced by golangci-lint godot).
Wrap all returned errors using static errors from the errors package; never return dynamic errors directly.
Always bind environment variables with viper.BindEnv() and provide ATMOS_ alternatives for each external var.
Separate structured logging from UI output: use stderr for prompts/errors to user; stdout only for data; never use logging for UI.
Most text UI must go to stderr; only data/results to stdout. Prefer utils.PrintfMessageToTUI for UI messages.
For non-standard execution paths, capture telemetry with telemetry.CaptureCmd or telemetry.CaptureCmdString and never capture user data.
Ensure cross-platform compatibility: prefer SDKs to external binaries, use filepath/os/runtime for portability, and add build constraints when needed.
Files:
cmd/describe_stacks_test.go
**/*_test.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*_test.go
: Every new feature must include comprehensive unit tests
Test both happy paths and error conditions
Use table-driven tests for testing multiple scenarios
Include integration tests for command flows
Test CLI end-to-end when possible
Use test fixtures for complex inputs
Consider using testify/mock for creating mock implementations
**/*_test.go
: Always use t.Skipf() with a reason for skipped tests; never use t.Skip() or reasonless t.Skipf().
Test files must mirror implementation structure and naming (e.g., aws_ssm_store_test.go).
Use table-driven unit tests and mock interfaces for external dependencies; target >80% coverage.
Files:
cmd/describe_stacks_test.go
cmd/**/*_test.go
📄 CodeRabbit inference engine (CLAUDE.md)
Command tests reside under cmd/.
Files:
cmd/describe_stacks_test.go
🧠 Learnings (4)
📓 Common learnings
Learnt from: aknysh
PR: cloudposse/atmos#944
File: go.mod:206-206
Timestamp: 2025-01-17T00:18:57.769Z
Learning: For indirect dependencies with license compliance issues in the cloudposse/atmos repository, the team prefers to handle them in follow-up PRs rather than blocking the current changes, as these issues often require deeper investigation of the dependency tree.
📚 Learning: 2025-06-23T02:14:30.937Z
Learnt from: aknysh
PR: cloudposse/atmos#1327
File: cmd/terraform.go:111-117
Timestamp: 2025-06-23T02:14:30.937Z
Learning: In cmd/terraform.go, flags for the DescribeAffected function are added dynamically at runtime when info.Affected is true. This is intentional to avoid exposing internal flags like "file", "format", "verbose", "include-spacelift-admin-stacks", "include-settings", and "upload" in the terraform command interface, while still providing them for the shared DescribeAffected function used by both `atmos describe affected` and `atmos terraform apply --affected`.
Applied to files:
cmd/describe_stacks_test.go
📚 Learning: 2024-12-07T16:16:13.038Z
Learnt from: Listener430
PR: cloudposse/atmos#825
File: internal/exec/helmfile_generate_varfile.go:28-31
Timestamp: 2024-12-07T16:16:13.038Z
Learning: In `internal/exec/helmfile_generate_varfile.go`, the `--help` command (`./atmos helmfile generate varfile --help`) works correctly without requiring stack configurations, and the only change needed was to make `ProcessCommandLineArgs` exportable by capitalizing its name.
Applied to files:
cmd/describe_stacks_test.go
📚 Learning: 2024-11-13T21:37:07.852Z
Learnt from: Cerebrovinny
PR: cloudposse/atmos#764
File: internal/exec/describe_stacks.go:289-295
Timestamp: 2024-11-13T21:37:07.852Z
Learning: In the `internal/exec/describe_stacks.go` file of the `atmos` project written in Go, avoid extracting the stack name handling logic into a helper function within the `ExecuteDescribeStacks` method, even if the logic appears duplicated.
Applied to files:
cmd/describe_stacks_test.go
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: Build (macos-latest, macos)
- GitHub Check: Build (ubuntu-latest, linux)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (go)
- GitHub Check: website-deploy-preview
- GitHub Check: Summary
🔇 Additional comments (2)
cmd/describe_stacks_test.go (2)
62-66
: ProcessYamlFunctions defaults: expectations look correct.The new field is asserted as true by default alongside ProcessTemplates, matching the CLI defaults and helper behavior. Looks good.
Also applies to: 75-78, 87-90
106-108
: Flag name consistency verified — keep "process-functions".All CLI flags use kebab-case "process-functions" repo-wide; internal vars use processYamlFunctions/ProcessYamlFunctions. No "process-yaml-functions" (or other variants) were found.
what
--dependents-stack
flag toatmos describe affected
andatmos describe dependents
commandsmetadata.enabled: false
on components to not include the disabled components in the dependent list when executingatmos describe affected --include-dependents
commandatmos describe stacks
by default (use--process-templates=false
and--process-functions=false
flags to disable)why
--dependents-stack
flag in theatmos describe affected
andatmos describe dependents
commands allows filtering the dependent components by a particular stackSummary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores