Repository navigation
feat: add date-anchored default editions - #2762
Conversation
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
|
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 |
Dependency Review✅ No vulnerabilities or license issues found.Scanned FilesNone |
Resource Changes Found for
|
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis change adds date-anchored configuration editions, edition inspection commands, describe-component execution controls, adaptive terminal rendering, authentication updates, and expanded validation and documentation. ChangesEditions and configuration
Describe execution and authentication
Terminal and output rendering
Snapshots and documentation
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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.
Actionable comments posted: 7
🧹 Nitpick comments (4)
pkg/auth/manager_test.go (1)
995-997: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low valueClose pipe ends in cleanup.
Close both ends of the pipe in the cleanup handler to prevent file descriptor leaks if an assertion fails early.
🛠️ Proposed fix
t.Cleanup(func() { os.Stderr = oldStderr + _ = r.Close() + _ = w.Close() })🤖 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/auth/manager_test.go` around lines 995 - 997, Update the t.Cleanup handler in the relevant test to close both pipe endpoints in addition to restoring os.Stderr. Ensure the cleanup closes the read and write descriptors even when assertions fail early, using the pipe variables already created by the test.cmd/describe_edition.go (2)
27-27: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUpdate the deprecated Cobra field.
Cobra replaced
FParseErrWhitelistwithFParseErrAllowlistin recent versions. Update the field name to avoid relying on deprecated APIs.💡 Proposed change
- FParseErrWhitelist: struct{ UnknownFlags bool }{UnknownFlags: false}, + FParseErrAllowlist: cobra.FParseErrAllowlist{UnknownFlags: false},🤖 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 `@cmd/describe_edition.go` at line 27, Replace the deprecated FParseErrWhitelist field with Cobra’s FParseErrAllowlist field in the command configuration, preserving the existing UnknownFlags: false setting.
67-72: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUse standard parser for command-specific flags.
As per coding guidelines: "Commands must use
flags.NewStandardParser()for command-specific flags". Consider refactoring the flag setup to adhere to the CLI guidelines.🤖 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 `@cmd/describe_edition.go` around lines 67 - 72, Update init and the describeEditionCmd flag setup to use flags.NewStandardParser() for command-specific flags instead of directly registering the format flag through PersistentFlags(). Preserve the existing format option, shorthand, default value, and help text while adhering to the standard parser configuration.Source: Coding guidelines
cmd/describe_edition_test.go (1)
12-42: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUse table-driven tests for multiple test scenarios.
As per coding guidelines, "Use table-driven tests for testing multiple scenarios in Go." Consider converting these sequential blocks into standard table-driven test suites:
cmd/describe_edition_test.go#L12-L42: refactorTestEditionPinSourceto iterate over a slice of test cases.cmd/list/editions_test.go#L12-L24: refactorTestParseOptionalAnchorto iterate over a slice of test cases.cmd/list/editions_test.go#L45-L51: refactorTestExecuteListEditionsWithOptionsInvalidAnchorsto iterate over a slice of test cases.🤖 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 `@cmd/describe_edition_test.go` around lines 12 - 42, Refactor the three multi-scenario tests into table-driven suites: update TestEditionPinSource in cmd/describe_edition_test.go (12-42), TestParseOptionalAnchor in cmd/list/editions_test.go (12-24), and TestExecuteListEditionsWithOptionsInvalidAnchors in cmd/list/editions_test.go (45-51) to define case slices and iterate with subtests, preserving each scenario’s setup, expected result, and assertions.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/tui/templates/templater.go`:
- Line 333: Update the changed comments near GetTerminalWidth and the
corresponding comment at the referenced location so each ends with a period,
without altering their content or behavior.
- Around line 342-345: Update the terminal-width condition in the templating
logic around term.GetSize so detected widths are accepted only when termWidth
exceeds the two-column margin. For widths of 1 or 2, preserve the existing
fallback screenWidth and source behavior, preventing the later uint conversion
from receiving a non-positive value.
In `@pkg/config/default_snapshot_test.go`:
- Around line 73-75: Update the regenerateSnapshot flow in
default_snapshot_test.go to load the existing snapshot and validate matching
Old/New journal values before overwriting the baseline. Move the
regenerateSnapshot call in the regenerateSnapshotEnvVar branch behind this
validation, preserving the current early return only after the guardrail
succeeds.
In `@pkg/config/load.go`:
- Around line 497-503: Update the error return in the applyEditionDefaults call
within the configuration-loading flow to wrap the original error with
descriptive context using %w, while preserving the existing early return and
atmosConfig value.
In `@pkg/list/format/table.go`:
- Around line 917-924: Update the CreateStyledTable documentation comment to
begin with the exported function name, and add defer perf.Track(...)() as the
first statement in CreateStyledTableWithOptions, followed by a blank line before
the remaining implementation.
In `@website/docs/cli/commands/list/list-stacks.mdx`:
- Line 191: Update the precedence statement in the list-stacks documentation to
show CLI --format first, ATMOS_LIST_FORMAT second, config file third, and the
tree default last.
In `@website/docs/cli/configuration/edition.mdx`:
- Line 88: Update the September 2025 rollback description to state that the
anchor predates ten journal entries, and include that it restores unfiltered
help and the previous describe.component.filter: full default while preserving
the other listed settings.
---
Nitpick comments:
In `@cmd/describe_edition_test.go`:
- Around line 12-42: Refactor the three multi-scenario tests into table-driven
suites: update TestEditionPinSource in cmd/describe_edition_test.go (12-42),
TestParseOptionalAnchor in cmd/list/editions_test.go (12-24), and
TestExecuteListEditionsWithOptionsInvalidAnchors in cmd/list/editions_test.go
(45-51) to define case slices and iterate with subtests, preserving each
scenario’s setup, expected result, and assertions.
In `@cmd/describe_edition.go`:
- Line 27: Replace the deprecated FParseErrWhitelist field with Cobra’s
FParseErrAllowlist field in the command configuration, preserving the existing
UnknownFlags: false setting.
- Around line 67-72: Update init and the describeEditionCmd flag setup to use
flags.NewStandardParser() for command-specific flags instead of directly
registering the format flag through PersistentFlags(). Preserve the existing
format option, shorthand, default value, and help text while adhering to the
standard parser configuration.
In `@pkg/auth/manager_test.go`:
- Around line 995-997: Update the t.Cleanup handler in the relevant test to
close both pipe endpoints in addition to restoring os.Stderr. Ensure the cleanup
closes the read and write descriptors even when assertions fail early, using the
pipe variables already created by the test.
🪄 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: ab6ef5da-1d9a-49a1-a04e-78668eadbe4c
📒 Files selected for processing (68)
atmos.yamlcmd/describe_component.gocmd/describe_edition.gocmd/describe_edition_test.gocmd/describe_error_mode_flag.gocmd/describe_skip_auth_test.gocmd/help_topics_render.gocmd/list/editions.gocmd/list/editions_test.gocmd/list/list.gocmd/list/stacks.gocmd/root.godemo/casts/atmos.d/screengrabs/cli.yamldocs/fixes/2026-07-17-date-anchored-defaults.mddocs/prd/editions.mdinternal/exec/describe_component.gointernal/exec/describe_component_test.gointernal/exec/describe_dependents.gointernal/exec/utils.gointernal/tui/templates/templater.gopkg/auth/list/formatter_table.gopkg/auth/list/formatter_test.gopkg/auth/list/table_width.gopkg/auth/list/table_width_test.gopkg/auth/manager.gopkg/auth/manager_test.gopkg/config/atmos.yamlpkg/config/default.gopkg/config/default_snapshot_test.gopkg/config/edition.gopkg/config/edition_invariants_test.gopkg/config/load.gopkg/config/load_config_args.gopkg/config/load_edition_test.gopkg/config/testdata/default-config-snapshot.yamlpkg/edition/anchor.gopkg/edition/anchor_test.gopkg/edition/describe.gopkg/edition/errors.gopkg/edition/journal.gopkg/edition/journal_invariants_test.gopkg/edition/journal_test.gopkg/edition/resolve.gopkg/edition/resolve_test.gopkg/flags/global/flags.gopkg/flags/global_builder.gopkg/flags/global_registry.gopkg/list/format/table.gopkg/list/list_instances.gopkg/list/renderer/renderer.gopkg/provenance/tree_renderer.gopkg/schema/schema.gopkg/ui/markdown/renderer.gotests/cli_test.gotests/test-cases/atmos-pro.yamlwebsite/blog/2026-07-16-config-editions.mdxwebsite/docs/cli/commands/describe/describe-component.mdxwebsite/docs/cli/commands/describe/describe-edition.mdxwebsite/docs/cli/commands/list/list-editions.mdxwebsite/docs/cli/commands/list/list-instances.mdxwebsite/docs/cli/commands/list/list-stacks.mdxwebsite/docs/cli/configuration/edition.mdxwebsite/docs/cli/configuration/logs.mdxwebsite/docs/cli/configuration/settings/terminal.mdxwebsite/docs/cli/global-flags.mdxwebsite/src/data/roadmap.jswebsite/static/casts/screengrabs/atmos-describe-edition--help.castwebsite/static/casts/screengrabs/atmos-list-editions--help.cast
💤 Files with no reviewable changes (1)
- pkg/auth/manager.go
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pkg/auth/manager_helpers.go (1)
320-322: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAdjust error wrapping format to match guidelines.
The coding guidelines specify wrapping errors with the context first using the
fmt.Errorf("context: %w", err)pattern. Swapping the order here aligns with that convention.♻️ Proposed refactor
- if !isAuthConfigured(authConfig) { - return nil, fmt.Errorf("%w: authentication requires at least one identity configured in atmos.yaml", errUtils.ErrAuthNotConfigured) - } + if !isAuthConfigured(authConfig) { + return nil, fmt.Errorf("authentication requires at least one identity configured in atmos.yaml: %w", errUtils.ErrAuthNotConfigured) + }🤖 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/auth/manager_helpers.go` around lines 320 - 322, Update the error construction in the isAuthConfigured validation to place the descriptive authentication context before the wrapped errUtils.ErrAuthNotConfigured value, following the fmt.Errorf("context: %w", err) convention while preserving the existing message and sentinel error.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.
Nitpick comments:
In `@pkg/auth/manager_helpers.go`:
- Around line 320-322: Update the error construction in the isAuthConfigured
validation to place the descriptive authentication context before the wrapped
errUtils.ErrAuthNotConfigured value, following the fmt.Errorf("context: %w",
err) convention while preserving the existing message and sentinel error.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: dec6cc21-3394-49fa-9c0f-a806a56f746e
📒 Files selected for processing (3)
cmd/describe_component.gocmd/describe_skip_auth_test.gopkg/auth/manager_helpers.go
🚧 Files skipped from review as they are similar to previous changes (1)
- cmd/describe_component.go
…d-default-editions
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pkg/list/format/tree_instances.go (1)
45-55: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winUse left padding only.
TrimRightwon’t strip the padded space once Lip Gloss appends its ANSI reset, so this still leaves trailing whitespace in plain-text output.PaddingLeft(1)and dropping the trim keeps the same visual result.🤖 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/list/format/tree_instances.go` around lines 45 - 55, Update the heading style construction in the tree formatting path to use Lip Gloss’s PaddingLeft(1) instead of symmetric Padding(0, 1). Remove the strings.TrimRight call around h1Style.Render(title) and return the rendered title with treeNewline unchanged, preserving the visual left padding without trailing output whitespace.
🤖 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 `@pkg/list/format/tree_instances.go`:
- Line 40: Remove the final treeNewline concatenation from the renderer return
expressions in pkg/list/format/tree_instances.go lines 40-40 and
pkg/list/format/tree_stacks.go lines 28-28, so both renderers return trimmed
content without owning the trailing newline; leave newline appending to
data.Writeln.
In
`@tests/snapshots/TestCLICommands_atmos_auth_env_without_--login_returns_config_env_vars.stdout.golden`:
- Line 5: Update the formatter responsible for CLI auth environment output so
each export assignment is emitted on its own line rather than concatenated with
spaces. Preserve the existing export ordering, then regenerate the affected
golden snapshot to match the line-oriented output.
In
`@tests/snapshots/TestCLICommands_atmos_workflow_shell_command_not_found.stderr.golden`:
- Line 1: Fix the terminal-aware rendering logic so intentional newline
boundaries between independent text blocks are preserved instead of being
stripped or collapsed. Apply the change to the renderer responsible for these
CLI outputs, then regenerate snapshots with the -regenerate-snapshots flag:
tests/snapshots/TestCLICommands_atmos_workflow_shell_command_not_found.stderr.golden:1-1,
tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden:8-8,
tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.golden:6-6,
tests/snapshots/TestCLICommands_describe_component_with_path_not_in_component_directory.stderr.golden:11-11,
and
tests/snapshots/TestCLICommands_config_alias_tp_--help_shows_terraform_plan_help.stdout.golden:8-8.
In
`@tests/snapshots/TestCLICommands_describe_component_with_relative_path.stdout.golden`:
- Around line 46-47: Update the shared provenance producer used by the CLI
component-description flow so unknown source locations emit a valid line or are
omitted instead of rendering as :0; then regenerate the expected outputs with
the -regenerate-snapshots flag. Apply the regenerated results to
tests/snapshots/TestCLICommands_describe_component_with_relative_path.stdout.golden
lines 46-47,
tests/snapshots/TestCLICommands_describe_component_with_component_name_(backward_compatibility).stdout.golden
lines 46-47, and
tests/snapshots/TestCLICommands_describe_component_with_current_directory_(.).stdout.golden
lines 46-47; do not edit golden files manually.
---
Outside diff comments:
In `@pkg/list/format/tree_instances.go`:
- Around line 45-55: Update the heading style construction in the tree
formatting path to use Lip Gloss’s PaddingLeft(1) instead of symmetric
Padding(0, 1). Remove the strings.TrimRight call around h1Style.Render(title)
and return the rendered title with treeNewline unchanged, preserving the visual
left padding without trailing output whitespace.
🪄 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: f557e36d-f51f-4dde-b524-aebe06b1c245
📒 Files selected for processing (81)
pkg/list/format/tree_instances.gopkg/list/format/tree_stacks.gotests/snapshots/TestCLICommands_atmos_--chdir_config_isolation.stdout.goldentests/snapshots/TestCLICommands_atmos_--help.stdout.goldentests/snapshots/TestCLICommands_atmos_--help_config_aliases_section.stdout.goldentests/snapshots/TestCLICommands_atmos_atlantis_--help.stdout.goldentests/snapshots/TestCLICommands_atmos_atlantis_generate_--help.stdout.goldentests/snapshots/TestCLICommands_atmos_atlantis_generate_help.stdout.goldentests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_--help.stdout.goldentests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_help.stdout.goldentests/snapshots/TestCLICommands_atmos_atlantis_help.stdout.goldentests/snapshots/TestCLICommands_atmos_auth_env_--help.stdout.goldentests/snapshots/TestCLICommands_atmos_auth_env_--login_--format_bash.stdout.goldentests/snapshots/TestCLICommands_atmos_auth_env_without_--login_returns_config_env_vars.stdout.goldentests/snapshots/TestCLICommands_atmos_auth_exec_--help.stdout.goldentests/snapshots/TestCLICommands_atmos_auth_validate_(invalid_config).stderr.goldentests/snapshots/TestCLICommands_atmos_auth_validate_--help.stdout.goldentests/snapshots/TestCLICommands_atmos_auth_validate_--verbose.stderr.goldentests/snapshots/TestCLICommands_atmos_describe_component_mock_-s_dev_(stack-names_example).stdout.goldentests/snapshots/TestCLICommands_atmos_describe_component_mock_-s_production_(stack-names_example).stdout.goldentests/snapshots/TestCLICommands_atmos_describe_component_vpc_-s_dev_(native-terraform_example).stdout.goldentests/snapshots/TestCLICommands_atmos_describe_component_vpc_-s_my-legacy-prod-stack.stdout.goldentests/snapshots/TestCLICommands_atmos_describe_component_vpc_-s_no-name-prod.stdout.goldentests/snapshots/TestCLICommands_atmos_describe_component_vpc_-s_production_(native-terraform_example).stdout.goldentests/snapshots/TestCLICommands_atmos_describe_config.stdout.goldentests/snapshots/TestCLICommands_atmos_describe_config_-f_yaml.stdout.goldentests/snapshots/TestCLICommands_atmos_describe_config_imports.stderr.goldentests/snapshots/TestCLICommands_atmos_describe_config_imports.stdout.goldentests/snapshots/TestCLICommands_atmos_describe_configuration.stderr.goldentests/snapshots/TestCLICommands_atmos_describe_configuration.stdout.goldentests/snapshots/TestCLICommands_atmos_doesnt_warn_if_in_git_repo_with_atmos_config.stdout.goldentests/snapshots/TestCLICommands_atmos_helmfile_--help.stdout.goldentests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.goldentests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stdout.goldentests/snapshots/TestCLICommands_atmos_helmfile_help.stdout.goldentests/snapshots/TestCLICommands_atmos_list_instances.tty.goldentests/snapshots/TestCLICommands_atmos_list_stacks_(native-terraform_example).stdout.goldentests/snapshots/TestCLICommands_atmos_list_stacks_(stack-manifest-name).stdout.goldentests/snapshots/TestCLICommands_atmos_list_stacks_(stack-names_example).stdout.goldentests/snapshots/TestCLICommands_atmos_terraform_-help_passthrough.stdout.goldentests/snapshots/TestCLICommands_atmos_terraform_-version_passthrough.stdout.goldentests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.goldentests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.goldentests/snapshots/TestCLICommands_atmos_toolchain_info_non-existent_tool.stderr.goldentests/snapshots/TestCLICommands_atmos_toolchain_info_tar.gz_format_tool.stderr.goldentests/snapshots/TestCLICommands_atmos_toolchain_install_--help.stdout.goldentests/snapshots/TestCLICommands_atmos_toolchain_install_non-existent_tool.stderr.goldentests/snapshots/TestCLICommands_atmos_toolchain_registry_search.stderr.goldentests/snapshots/TestCLICommands_atmos_workflow_failure.stderr.goldentests/snapshots/TestCLICommands_atmos_workflow_failure_with_filepath.stderr.goldentests/snapshots/TestCLICommands_atmos_workflow_failure_with_stack.stderr.goldentests/snapshots/TestCLICommands_atmos_workflow_invalid_step_type.stderr.goldentests/snapshots/TestCLICommands_atmos_workflow_shell_command_not_found.stderr.goldentests/snapshots/TestCLICommands_config_alias_tp_--help_shows_terraform_plan_help.stdout.goldentests/snapshots/TestCLICommands_deploy_component_help_shows_stack_flag.stdout.goldentests/snapshots/TestCLICommands_describe_component_from_nested_dir_discovers_atmos.yaml_in_parent.stdout.goldentests/snapshots/TestCLICommands_describe_component_help_shows_stack_flag.stdout.goldentests/snapshots/TestCLICommands_describe_component_with_component_name_(backward_compatibility).stdout.goldentests/snapshots/TestCLICommands_describe_component_with_current_directory_(.).stdout.goldentests/snapshots/TestCLICommands_describe_component_with_path_not_in_component_directory.stderr.goldentests/snapshots/TestCLICommands_describe_component_with_relative_path.stdout.goldentests/snapshots/TestCLICommands_describe_component_with_stack_flag.stdout.goldentests/snapshots/TestCLICommands_echo_info_help_shows_verbose_flag.stdout.goldentests/snapshots/TestCLICommands_echo_info_runs_with_verbose_flag.stderr.goldentests/snapshots/TestCLICommands_helmfile_command_with_terraform_component_path.stderr.goldentests/snapshots/TestCLICommands_help_flag_works.stdout.goldentests/snapshots/TestCLICommands_indentation.stdout.goldentests/snapshots/TestCLICommands_list_stacks_works.stdout.goldentests/snapshots/TestCLICommands_secrets-masking_describe_config.stdout.goldentests/snapshots/TestCLICommands_show_component_help_shows_inherited_stack_flag.stdout.goldentests/snapshots/TestCLICommands_terraform_help_shows_stack_flag.stdout.goldentests/snapshots/TestCLICommands_terraform_plan_with_path_not_in_component_directory.stderr.goldentests/snapshots/TestCLICommands_terraform_provision_help_shows_inherited_stack_flag.stdout.goldentests/snapshots/TestCLICommands_tf_plan_help_shows_inherited_stack_flag.stdout.goldentests/test-cases/flag-inheritance.yamltests/test-cases/generate-files.yamltests/test-cases/native-terraform-example.yamltests/test-cases/stack-manifest-name.yamltests/test-cases/stack-names-example.yamltests/test-cases/stack-templates.yamltests/test-cases/toolchain-example.yaml
💤 Files with no reviewable changes (4)
- tests/snapshots/TestCLICommands_atmos_describe_config_imports.stderr.golden
- tests/snapshots/TestCLICommands_atmos_describe_configuration.stderr.golden
- tests/snapshots/TestCLICommands_echo_info_runs_with_verbose_flag.stderr.golden
- tests/snapshots/TestCLICommands_atmos_auth_validate_--verbose.stderr.golden
There was a problem hiding this comment.
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 `@pkg/provenance/tree_renderer.go`:
- Around line 110-112: Update the rendering logic in tree_renderer.go to format
the file and optional line number together before applying the existing color
styling, so the line number receives the same gray style as the file.
Consolidate the branches handling non-positive and positive entry.Line values
while preserving their current output formats.
🪄 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: 798478c0-9b3d-442e-9b55-50a7ab8251e3
📒 Files selected for processing (18)
cmd/helmfile/apply.gopkg/list/format/tree_instances.gopkg/list/format/tree_instances_test.gopkg/list/format/tree_stacks.gopkg/list/format/tree_stacks_test.gopkg/provenance/tree_renderer.gopkg/provenance/tree_renderer_test.gopkg/utils/component_reverse_path_utils.gotests/cli_test.gotests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.goldentests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stdout.goldentests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.goldentests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.goldentests/snapshots/TestCLICommands_config_alias_tp_--help_shows_terraform_plan_help.stdout.goldentests/snapshots/TestCLICommands_describe_component_with_component_name_(backward_compatibility).stdout.goldentests/snapshots/TestCLICommands_describe_component_with_current_directory_(.).stdout.goldentests/snapshots/TestCLICommands_describe_component_with_path_not_in_component_directory.stderr.goldentests/snapshots/TestCLICommands_describe_component_with_relative_path.stdout.golden
🚧 Files skipped from review as they are similar to previous changes (11)
- tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.golden
- tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden
- tests/snapshots/TestCLICommands_config_alias_tp_--help_shows_terraform_plan_help.stdout.golden
- tests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stdout.golden
- tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden
- tests/snapshots/TestCLICommands_describe_component_with_path_not_in_component_directory.stderr.golden
- tests/snapshots/TestCLICommands_describe_component_with_current_directory_(.).stdout.golden
- pkg/list/format/tree_stacks.go
- tests/snapshots/TestCLICommands_describe_component_with_component_name_(backward_compatibility).stdout.golden
- pkg/list/format/tree_instances.go
- tests/snapshots/TestCLICommands_describe_component_with_relative_path.stdout.golden
… Hub flakiness CI hit a transient 502 from registry-1.docker.io pulling testcontainers-go's ryuk reaper image, failing TestDockerRuntime_RemoteRegistryCache_Integration before the test body even ran. - Disable Ryuk for this test: it already terminates its network and registry container explicitly via t.Cleanup, so the reaper (and its own image pull) is unnecessary, mirroring the same trade-off tests/floci_containers_test.go makes for rootless Podman. - Pull the registry:2 and busybox:1.36 images through mirror.gcr.io instead of Docker Hub directly, sidestepping Docker Hub's rate limiting and transient 5xx responses. - Wrap the registry container pull in pkg/container/pull.go's existing transient-error retry policy (same package, no new logic) for residual hardening against blips from the mirror itself. Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏 |
…d-default-editions # Conflicts: # .github/workflows/dependency-review.yml # website/package.json # website/pnpm-lock.yaml
CanonicalEnvKey (commit ff17119) uppercased every environment variable key on Windows to collapse the Path/PATH case-duplication bug, but that was too broad: it also rewrote unrelated mixed-case names, breaking Terraform's TF_CLI_ARGS_<command> convention (e.g. TF_CLI_ARGS_plan became TF_CLI_ARGS_PLAN), which failed TestMergeSystemEnvWithGlobal_TFCliArgsHandling and TestMergeSystemEnvSimpleWithGlobal on Windows CI. Only PATH is the variable Atmos code itself writes under a fixed casing while Windows natively supplies it under another ("Path"), so only PATH needs normalizing; every other name stays exactly as given, matching the existing case-sensitive convention. Co-Authored-By: Claude Sonnet 5 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
cmd/describe_component.go (1)
243-256: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winGate
describe componentauth onprocessTemplatestoo.
resolveAuthManagerParamscarriesProcessTemplatesonly intoExecuteDescribeComponentParams, whileresolveAuthManager()usesidentityExplicitorprocessYamlFunctions && hasIdentityBackedStore(...). That lets the default--process-templates=true, --process-functions=falsepath skip auth manager creation even thoughatmos.Component()inside templates can need authenticated credentials. Mirror the stacks helper indescribe_component.goand cover the templates-only quadrant.🤖 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 `@cmd/describe_component.go` around lines 243 - 256, Update the describe component auth decision around resolveAuthManager to include processTemplates alongside identityExplicit and processYamlFunctions when determining whether authentication is required. Mirror the corresponding stacks helper’s gating logic, ensuring the templates-only path (processTemplates enabled, processYamlFunctions disabled) creates the auth manager before template execution. Add or update coverage for this quadrant.cmd/validate_editorconfig.go (1)
205-211: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winInclude
Colorwhen applying the editorconfig color override.
settings.terminal.no_coloris deprecated in favor ofsettings.terminal.color, so this path should also honor!atmosConfig.Settings.Terminal.Colorwhen--no-coloris not explicitly set.🤖 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 `@cmd/validate_editorconfig.go` around lines 205 - 211, Update applyEditorConfigColorOverride to honor the terminal Color setting when --no-color is not explicitly provided: apply the override when either the deprecated NoColor value is enabled or Terminal.Color is false, while preserving the explicit flag handling.
🧹 Nitpick comments (4)
cmd/validate_editorconfig.go (2)
312-391: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
runEditorConfigForFilesexceeds the function-size/complexity guideline.The function spans ~79 lines and needs a
//nolint:funlen,gocognit,revivesuppression. As per coding guidelines, "Keep cyclomatic complexity at or below 15 and functions at or below 60 lines and 40 statements; extract named helpers and keep orchestrators as linear pipelines." Some branches (dry-run listing, spinner-wrapped validation) could be extracted into named helpers similar torunEditorConfigStructuredOutput, letting this function become a thinner pipeline and dropping the nolint.🤖 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 `@cmd/validate_editorconfig.go` around lines 312 - 391, Refactor runEditorConfigForFiles into a thin orchestration pipeline by extracting the dry-run file listing and spinner-wrapped validation/reporting branches into named helpers, following the existing runEditorConfigStructuredOutput pattern. Preserve configuration initialization, exclude merging, version checks, structured-output routing, diagnostics, and error behavior; then remove the //nolint:funlen,gocognit,revive suppression once the function meets the size and complexity limits.Source: Coding guidelines
336-349: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse data-channel writers for the EditorConfig stdout outputs.
The dry-run file list and the rich/SARIF report bodies are stdout data, not UI or logging. Replace
log.Info(file),fmt.Fprintln(cmd.OutOrStdout(), ...), andcmd.OutOrStdout().Write(...)withdata.Writeln(...),data.Write(...), or JSON/YAML helpers as appropriate.🤖 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 `@cmd/validate_editorconfig.go` around lines 336 - 349, Update the dry-run output loop in the validation command to write each file through the data-channel writer instead of log.Info. Also replace stdout report-body writes using fmt.Fprintln and cmd.OutOrStdout().Write with the appropriate data.Writeln, data.Write, or JSON/YAML helper, while leaving UI and diagnostic logging unchanged.Source: Coding guidelines
cmd/root.go (1)
1653-1737: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTwo independent implementations of the same config-validation command matcher.
isBuiltinConfigValidationCommand(cmd.CommandPath()-based) andmatchesConfigValidationCommand/isBuiltinConfigValidationArgs(raw-args-token-based) both hardcode the identical three command shapes ("config validate", "validate config", "validate schema config") through separate code paths. Adding a new built-in validation command later requires remembering to update both, or they silently drift out of sync (e.g., one path allows continuing on config error, the other doesn't).Consider deriving both from one shared list of token sequences (e.g.
[][]string{{"config","validate"}, {"validate","config"}, {"validate","schema","config"}}), building thecmd.CommandPath()strings from that same list for the cobra-based check.🤖 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 `@cmd/root.go` around lines 1653 - 1737, Unify the duplicated command-shape definitions used by matchesConfigValidationCommand and isBuiltinConfigValidationCommand. Introduce one shared list of token sequences, have the raw-argument matcher iterate over it, and derive the Cobra command-path checks from the same sequences while preserving the existing command shapes and argument behavior.cmd/describe_component.go (1)
196-215: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
--use-mocksvalidation looks correct but appears untested.The new
f.useMocks && !f.processYamlFunctionsrejection branch isn't exercised by any test in the reviewedcmd/describe_component_test.go/cmd/describe_skip_auth_test.godiffs (only the flag registration is added at line 521 of the latter). Worth a small table test similar to the error-mode wrong-type tests already in this file.🤖 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 `@cmd/describe_component.go` around lines 196 - 215, Add a table-driven test covering getRunnableDescribeComponentCmd with useMocks enabled and processYamlFunctions disabled, asserting it returns errUtils.ErrInvalidFlagValue. Follow the existing error-mode wrong-type test pattern in the describe component command tests and preserve successful behavior when processYamlFunctions is enabled.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/prd/editions.md`:
- Around line 24-25: Update the no-pin compatibility statement in the editions
documentation to clarify that unpinned projects use the latest defaults and may
change behavior after upgrades. State that pinning an edition preserves
historical defaults, and remove the claim that behavior remains byte-for-byte
identical with zero breaking changes.
- Around line 132-139: The default-change workflow must cover every live default
layer, not only setDefaultConfiguration. Update both setDefaultConfiguration and
defaultCliConfig for affected existing defaults, ensure journaled keys are
excluded from embedded configuration, then append the dated Entry and regenerate
snapshots; retain the reduced workflow for genuinely new defaults.
---
Outside diff comments:
In `@cmd/describe_component.go`:
- Around line 243-256: Update the describe component auth decision around
resolveAuthManager to include processTemplates alongside identityExplicit and
processYamlFunctions when determining whether authentication is required. Mirror
the corresponding stacks helper’s gating logic, ensuring the templates-only path
(processTemplates enabled, processYamlFunctions disabled) creates the auth
manager before template execution. Add or update coverage for this quadrant.
In `@cmd/validate_editorconfig.go`:
- Around line 205-211: Update applyEditorConfigColorOverride to honor the
terminal Color setting when --no-color is not explicitly provided: apply the
override when either the deprecated NoColor value is enabled or Terminal.Color
is false, while preserving the explicit flag handling.
---
Nitpick comments:
In `@cmd/describe_component.go`:
- Around line 196-215: Add a table-driven test covering
getRunnableDescribeComponentCmd with useMocks enabled and processYamlFunctions
disabled, asserting it returns errUtils.ErrInvalidFlagValue. Follow the existing
error-mode wrong-type test pattern in the describe component command tests and
preserve successful behavior when processYamlFunctions is enabled.
In `@cmd/root.go`:
- Around line 1653-1737: Unify the duplicated command-shape definitions used by
matchesConfigValidationCommand and isBuiltinConfigValidationCommand. Introduce
one shared list of token sequences, have the raw-argument matcher iterate over
it, and derive the Cobra command-path checks from the same sequences while
preserving the existing command shapes and argument behavior.
In `@cmd/validate_editorconfig.go`:
- Around line 312-391: Refactor runEditorConfigForFiles into a thin
orchestration pipeline by extracting the dry-run file listing and
spinner-wrapped validation/reporting branches into named helpers, following the
existing runEditorConfigStructuredOutput pattern. Preserve configuration
initialization, exclude merging, version checks, structured-output routing,
diagnostics, and error behavior; then remove the //nolint:funlen,gocognit,revive
suppression once the function meets the size and complexity limits.
- Around line 336-349: Update the dry-run output loop in the validation command
to write each file through the data-channel writer instead of log.Info. Also
replace stdout report-body writes using fmt.Fprintln and cmd.OutOrStdout().Write
with the appropriate data.Writeln, data.Write, or JSON/YAML helper, while
leaving UI and diagnostic logging unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: eb0af39b-ad28-45ec-9651-19e10d4c6ff1
📒 Files selected for processing (16)
atmos.yamlcmd/describe_component.gocmd/describe_component_test.gocmd/describe_edition.gocmd/describe_edition_test.gocmd/describe_skip_auth_test.gocmd/list/editions_test.gocmd/list/stacks.gocmd/list/stacks_test.gocmd/root.gocmd/root_helpers_test.gocmd/root_test.gocmd/validate_editorconfig.gocmd/validate_editorconfig_test.godemo/casts/atmos.d/screengrabs/cli.yamldocs/prd/editions.md
Fixes flag-parser architecture, error-wrap order, test fd leak, and Viper test-isolation issues; applies low-risk table-driven test refactors where CodeRabbit's suggestion still applied against current code. These findings only ever existed as prose inside CodeRabbit review-body "Nitpick comments" sections, never as separate resolvable threads, so nothing tracked them until now. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Two CodeRabbit findings: the "zero breaking change" claim for unpinned projects contradicted the doc's own note that changed defaults become newly effective for unpinned projects on upgrade; and the contributor workflow only mentioned setDefaultConfiguration, omitting the defaultCliConfig agreement the invariant tests actually require. Co-Authored-By: Claude Sonnet 5 <[email protected]>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pkg/auth/manager_helpers_test.go (1)
912-920: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winMake the propagation test portable and assert
CliConfigPath.Line 913 hardcodes the absolute Unix path
/tmp/atmos-config, and the test only verifiessi.Stack; a regression in CLI config path propagation would pass unnoticed. Use a relative test path and assert the manager’s stored or observable config path.As per coding guidelines, tests must remain cross-platform and use relative paths within the worktree.
🤖 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/auth/manager_helpers_test.go` around lines 912 - 920, Update the test case around CreateManagerWithAtmosConfigForStack to use a relative worktree path instead of the hardcoded /tmp/atmos-config value, and add an assertion that the manager’s stored or observable CliConfigPath matches that value. Preserve the existing stack propagation assertion.Source: Coding guidelines
🧹 Nitpick comments (2)
pkg/auth/manager_helpers.go (1)
313-317: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDocument the new exported helper.
Add a Go doc comment beginning with
CreateManagerWithAtmosConfigForStackand ending with a period.As per coding guidelines, all exported Go functions must be documented.
🤖 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/auth/manager_helpers.go` around lines 313 - 317, Add a Go doc comment immediately before CreateManagerWithAtmosConfigForStack that begins with the function name and ends with a period, briefly describing the helper’s purpose.Source: Coding guidelines
pkg/auth/manager_helpers_test.go (1)
893-922: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse a table-driven structure for these scenarios.
This new test covers multiple behaviors; represent the cases as table data so inputs and expected outcomes remain consistent as coverage grows.
As per coding guidelines, Go tests covering multiple scenarios should be table-driven.
🤖 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/auth/manager_helpers_test.go` around lines 893 - 922, Refactor TestCreateManagerWithAtmosConfigForStack into a table-driven test, representing each scenario’s inputs and expected outcomes in test cases and executing them through a shared subtest loop. Preserve the existing coverage for unconfigured auth errors, nil atmosConfig behavior, and propagation of CliConfigPath and stack into the manager.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.
Outside diff comments:
In `@pkg/auth/manager_helpers_test.go`:
- Around line 912-920: Update the test case around
CreateManagerWithAtmosConfigForStack to use a relative worktree path instead of
the hardcoded /tmp/atmos-config value, and add an assertion that the manager’s
stored or observable CliConfigPath matches that value. Preserve the existing
stack propagation assertion.
---
Nitpick comments:
In `@pkg/auth/manager_helpers_test.go`:
- Around line 893-922: Refactor TestCreateManagerWithAtmosConfigForStack into a
table-driven test, representing each scenario’s inputs and expected outcomes in
test cases and executing them through a shared subtest loop. Preserve the
existing coverage for unconfigured auth errors, nil atmosConfig behavior, and
propagation of CliConfigPath and stack into the manager.
In `@pkg/auth/manager_helpers.go`:
- Around line 313-317: Add a Go doc comment immediately before
CreateManagerWithAtmosConfigForStack that begins with the function name and ends
with a period, briefly describing the helper’s purpose.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 3d547460-c410-4780-ad61-ec4092269ca3
📒 Files selected for processing (9)
cmd/describe_component_test.gocmd/describe_edition.gocmd/list/editions_test.godocs/prd/editions.mdpkg/auth/manager_helpers.gopkg/auth/manager_helpers_test.gopkg/auth/manager_test.gopkg/config/load_edition_test.gotests/cli_snapshot_test.go
🚧 Files skipped from review as they are similar to previous changes (3)
- docs/prd/editions.md
- cmd/describe_component_test.go
- tests/cli_snapshot_test.go
|
💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏 |
…d-default-editions # Conflicts: # tests/snapshots/TestCLICommands_describe_component_with_component_name_(backward_compatibility).stdout.golden # tests/snapshots/TestCLICommands_describe_component_with_current_directory_(.).stdout.golden # tests/snapshots/TestCLICommands_describe_component_with_relative_path.stdout.golden
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
cmd/root.go (1)
630-633: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy liftInitialize the terminal limit before Cobra renders help.
Cobra’s standard
--helppath prints usage and exits before runningPersistentPreRun, sosettings.terminal.max_widthis only installed after help rendering would have used the defaultGetTerminalWidth(). Movetemplates.SetTerminalWidthLimit(...)to a startup path beforeRootCmd.Execute(), or inject the configured width directly into the help renderer. Add coverage for configured help output.🤖 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 `@cmd/root.go` around lines 630 - 633, Move the templates.SetTerminalWidthLimit call out of the later configuration flow and initialize it before RootCmd.Execute() so Cobra’s standard help rendering uses settings.terminal.max_width. Preserve the zero-value behavior that leaves detected width unclamped, and add coverage verifying configured help output honors the limit.internal/exec/utils.go (1)
927-948: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winRebuild generated names after rendering.
spacelift_stackandatlantis_projectare generated from Settings/Vars and then rendered by templates/YAML functions. If those inputs contain renderable values,postProcessTemplatesAndYamlFunctionsonly restores decoded sections and leaves stale pre-rendered names inComponentSection. Rebuild the names after rendering when the name inputs support templates, YAML functions, or context tokens that are replaced after rendering.🤖 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/utils.go` around lines 927 - 948, The generated names assigned by BuildSpaceliftStackNameFromComponentConfig and BuildAtlantisProjectNameFromComponentConfig become stale when their Settings/Vars inputs are rendered. After postProcessTemplatesAndYamlFunctions completes, rebuild and reassign spacelift_stack and atlantis_project when their inputs contain templates, YAML functions, or context tokens subject to replacement, while preserving error propagation and empty-name handling.
🧹 Nitpick comments (1)
cmd/root_test.go (1)
269-316: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse a table-driven test for bootstrap decisions.
These tests exercise the same
applyCIGitCloneBootstrapbehavior with different arguments, environment values, and expected results. Combine them into named table cases. Keep the global configuration restoration for each subtest.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 `@cmd/root_test.go` around lines 269 - 316, Combine the three applyCIGitCloneBootstrap tests into one named table-driven test covering arguments, environment values, and expected application/configuration states. Run each case as a subtest, preserving saveRestoreAtmosConfig and all relevant environment setup inside each subtest so global state is restored independently.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.
Outside diff comments:
In `@cmd/root.go`:
- Around line 630-633: Move the templates.SetTerminalWidthLimit call out of the
later configuration flow and initialize it before RootCmd.Execute() so Cobra’s
standard help rendering uses settings.terminal.max_width. Preserve the
zero-value behavior that leaves detected width unclamped, and add coverage
verifying configured help output honors the limit.
In `@internal/exec/utils.go`:
- Around line 927-948: The generated names assigned by
BuildSpaceliftStackNameFromComponentConfig and
BuildAtlantisProjectNameFromComponentConfig become stale when their
Settings/Vars inputs are rendered. After postProcessTemplatesAndYamlFunctions
completes, rebuild and reassign spacelift_stack and atlantis_project when their
inputs contain templates, YAML functions, or context tokens subject to
replacement, while preserving error propagation and empty-name handling.
---
Nitpick comments:
In `@cmd/root_test.go`:
- Around line 269-316: Combine the three applyCIGitCloneBootstrap tests into one
named table-driven test covering arguments, environment values, and expected
application/configuration states. Run each case as a subtest, preserving
saveRestoreAtmosConfig and all relevant environment setup inside each subtest so
global state is restored independently.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a12d9b0a-9f3a-4696-9daa-e1dfe6cda01a
📒 Files selected for processing (11)
cmd/root.gocmd/root_test.gocmd/toolchain/registry/styling.gointernal/exec/utils.golychee.tomlpkg/ansi/trim.gopkg/config/load.gopkg/list/format/table.gopkg/toolchain/list_table.gotests/snapshots/TestCLICommands_atmos_list_instances.tty.goldentests/snapshots/TestCLICommands_atmos_toolchain_registry_search.stderr.golden
🚧 Files skipped from review as they are similar to previous changes (2)
- tests/snapshots/TestCLICommands_atmos_toolchain_registry_search.stderr.golden
- pkg/list/format/table.go
…d-default-editions # Conflicts: # internal/exec/describe_stacks.go # tests/cli_test.go # tests/snapshots/TestCLICommands_atmos_describe_config_-f_yaml.stdout.golden # tests/snapshots/TestCLICommands_describe_component_from_nested_dir_discovers_atmos.yaml_in_parent.stdout.golden # tests/snapshots/TestCLICommands_indentation.stdout.golden
…main merge Three describe-component golden snapshots had silently reverted to their pre-schema-filter/pre-provenance content during the merge with origin/main's PR #2807 — a non-conflicting auto-merge overwrote earlier regenerated content without a conflict marker to flag it, breaking Acceptance Tests on all three platforms (linux/windows/macos). Also fixes a real regression in sanitizeOutput's provisioned_by_user normalization: the regex combined during that same merge unconditionally appended a trailing space, even when the source had no padding to normalize, breaking TestSanitizeOutput_WithCustomReplacements. Now only pads when the source actually had trailing whitespace to collapse. Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
Warning This PR exceeds the recommended limit of 10,000 lines.Large PRs are difficult to review and may be rejected due to their size. Please verify that this PR does not address multiple issues. |
…d-default-editions
origin/main's store refactor (#2575) moved NewSSMStore/SSMStoreOptions from pkg/store into pkg/store/providers, breaking this test's build (a non-conflicting cross-package break from the merge, not flagged by git as a conflict). Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
|
Warning Release Documentation RequiredThis PR is labeled
|
|
These changes were released in v1.225.0-rc.6. |
what
edition:defaults, the--editionoverride, andatmos describe/list editioncommands.why
references
Summary by CodeRabbit
New Features
--edition,ATMOS_EDITION, oratmos.yaml.describe editionandlist editionscommands for inspecting default changes.--use-mocks.Bug Fixes
Documentation