Skip to content

Conversation

@aknysh
Copy link
Member

@aknysh aknysh commented Jul 28, 2025

what

  • Update !terraform.state YAML function
  • Update docs
  • Add tests

why

  • Update !terraform.state YAML function
    • For s3 backend, add retry logic when reading the state from the s3 bucket (in case of an error, retry two more times before returning the error)
    • For s3 backend, increase the timeout from 5 sec to 30 sec (5 sec was not enough in some cases depending on network)
    • For s3 backend, cache the S3 client (and don't assume role many times). When a stack uses many !terraform.state functions, create just one S3 client (assume the backend role if provided) and reuse it for all !terraform.state functions. This reduces the execution time and the API calls to AWS STS

notes

test

The improvements in this PR reduced the !terraform.state functions execution time at least 2-3 times.


For example, in a stack with 10 !terraform.output functions, the following command executed for more than a minute:

time atmos terraform plan <component> -s <stack>

real  1m13.344s
user  0m34.077s
sys   0m13.245s

When switched to the !terraform.state YAML functions, the same command executes in just 15 seconds, from which the 10 !terraform.state YAML functions took 3-4 seconds, the rest is terraform plan itself:

time atmos terraform plan <component> -s <stack>

real	0m15.796s
user	0m8.763s
sys	0m2.302s

With the improvements in this PR, the same command executes in 13 seconds, from which the 10 !terraform.state YAML functions took 1-2 seconds:

time atmos terraform plan <component> -s <stack>

real	0m12.978s
user	0m8.828s
sys	0m2.133s

Summary by CodeRabbit

  • New Features
    • Added support for transforming remote Terraform state outputs using YQ expressions, including string concatenation and arithmetic, in YAML functions.
  • Bug Fixes
    • Improved error handling and reliability when reading Terraform state files from S3, including retries and extended timeouts.
  • Documentation
    • Updated guides to explain how to use YQ expressions with Terraform YAML functions, with new examples and tips.
    • Updated Atlantis integration documentation to reflect the latest version.
  • Chores
    • Upgraded various dependencies and base images to newer versions.
  • Tests
    • Added comprehensive tests for custom YAML tag processing and Terraform state output transformations.

@aknysh aknysh requested a review from osterman July 28, 2025 21:29
@aknysh aknysh self-assigned this Jul 28, 2025
@aknysh aknysh requested a review from a team as a code owner July 28, 2025 21:29
@aknysh aknysh added the patch A minor, backward compatible change label Jul 28, 2025
@github-actions github-actions bot added the size/m Medium size PR label Jul 28, 2025
@mergify
Copy link

mergify bot commented Jul 28, 2025

Important

Cloud Posse Engineering Team Review Required

This 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 #pr-reviews channel.

@mergify mergify bot added the needs-cloudposse Needs Cloud Posse assistance label Jul 28, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 28, 2025

📝 Walkthrough

Walkthrough

This update covers dependency version bumps, enhancements to AWS S3 state reading logic with caching and retries, the addition of comprehensive YAML tag processing tests, and expanded documentation on using YQ expressions with Terraform state functions. Minor improvements include Dockerfile and workflow version updates, as well as new test fixtures for YAML function scenarios.

Changes

Cohort / File(s) Change Summary
Dependency Version Bumps
go.mod, examples/quick-start-advanced/Dockerfile, website/docs/integrations/atlantis.mdx
Updated Go module dependencies, Geodesic base image, Atmos tool version, and Atlantis workflow example to newer versions.
AWS Config and S3 Enhancements
internal/aws_utils/aws_utils.go, internal/terraform_backend/terraform_backend_s3.go
AWS config loader now accepts custom assume role duration; S3 backend introduces client caching, retry logic, longer timeouts, and improved error handling.
Test Updates and Additions
internal/aws_utils/aws_utils_test.go, internal/exec/yaml_func_utils_test.go, tests/fixtures/scenarios/atmos-terraform-state-yaml-function/stacks/deploy/nonprod.yaml
Updated AWS config test for new parameter; added a comprehensive test for YAML tag processing; added a fixture with complex YQ expression for Terraform state.
Documentation Additions
website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx, website/docs/core-concepts/stacks/yaml-functions/terraform.state.mdx
Added sections demonstrating how to use YQ expressions to transform values from Terraform state/output functions, with examples and references.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant AWS
    participant S3

    User->>App: Request Terraform state via !terraform.state tag
    App->>App: Check S3 client cache (by region/role)
    alt S3 client cached
        App->>App: Use cached S3 client
    else S3 client not cached
        App->>AWS: Load AWS config (with assumeRoleDuration)
        App->>App: Cache new S3 client
    end
    App->>S3: GetObject (with retries & timeout)
    alt Success
        S3-->>App: Return state file
        App-->>User: Process and return requested state/output (with YQ transformation)
    else NoSuchKey
        S3-->>App: Not found
        App-->>User: Return nil
    else Other error
        App->>S3: Retry up to 2 more times (with backoff)
        App-->>User: Error if all retries fail
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~35 minutes

Suggested labels

minor

Suggested reviewers

  • osterman

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 88fcc6d and 1107789.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (10)
  • examples/quick-start-advanced/Dockerfile (1 hunks)
  • go.mod (7 hunks)
  • internal/aws_utils/aws_utils.go (3 hunks)
  • internal/aws_utils/aws_utils_test.go (2 hunks)
  • internal/exec/yaml_func_utils_test.go (2 hunks)
  • internal/terraform_backend/terraform_backend_s3.go (3 hunks)
  • tests/fixtures/scenarios/atmos-terraform-state-yaml-function/stacks/deploy/nonprod.yaml (1 hunks)
  • website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx (1 hunks)
  • website/docs/core-concepts/stacks/yaml-functions/terraform.state.mdx (1 hunks)
  • website/docs/integrations/atlantis.mdx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
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/integrations/atlantis.mdx
  • website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx
  • website/docs/core-concepts/stacks/yaml-functions/terraform.state.mdx
**/*.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

Files:

  • internal/aws_utils/aws_utils_test.go
  • internal/aws_utils/aws_utils.go
  • internal/exec/yaml_func_utils_test.go
  • internal/terraform_backend/terraform_backend_s3.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

Files:

  • internal/aws_utils/aws_utils_test.go
  • internal/exec/yaml_func_utils_test.go
go.mod

📄 CodeRabbit Inference Engine (.cursor/rules/atmos-rules.mdc)

Manage dependencies with Go modules

Files:

  • go.mod
🧠 Learnings (11)
📓 Common learnings
Learnt from: Listener430
PR: cloudposse/atmos#934
File: tests/fixtures/scenarios/docs-generate/README.md.gotmpl:99-118
Timestamp: 2025-01-25T03:51:57.689Z
Learning: For the cloudposse/atmos repository, changes to template contents should be handled in dedicated PRs and are typically considered out of scope for PRs focused on other objectives.
Learnt from: aknysh
PR: cloudposse/atmos#810
File: examples/tests/stacks/catalog/terraform/template-functions-test2/defaults.yaml:28-32
Timestamp: 2024-12-01T00:33:20.298Z
Learning: In `examples/tests/stacks/catalog/terraform/template-functions-test2/defaults.yaml`, `!exec atmos terraform output` is used in examples to demonstrate its usage, even though `!terraform.output` is the recommended approach according to the documentation.
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.
Learnt from: CR
PR: cloudposse/atmos#0
File: .cursor/rules/atmos-rules.mdc:0-0
Timestamp: 2025-07-01T02:22:25.901Z
Learning: Clearly describe the changes in the PR description
Learnt from: aknysh
PR: cloudposse/atmos#810
File: website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx:0-0
Timestamp: 2024-12-03T04:01:16.446Z
Learning: In the `terraform.output.mdx` documentation file (`website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx`), the cache invalidation and cache scope behavior for the `!terraform.output` function are already described.
Learnt from: aknysh
PR: cloudposse/atmos#810
File: internal/exec/terraform_utils.go:40-213
Timestamp: 2024-12-03T05:18:49.169Z
Learning: In the context of the Atmos project, it's acceptable for functions like `execTerraformOutput` to remain as single functions if they perform a single purpose, such as retrieving Terraform outputs for a component in a stack, even if the function is lengthy.
Learnt from: aknysh
PR: cloudposse/atmos#810
File: internal/exec/terraform_utils.go:145-146
Timestamp: 2024-12-03T05:29:07.718Z
Learning: In the Atmos project, a 5-minute timeout in the `execTerraformOutput` function is acceptable for retrieving `terraform output` for a component in a stack.
Learnt from: Listener430
PR: cloudposse/atmos#1149
File: tests/snapshots/TestCLICommands_atmos_vendor_pull_ssh.stderr.golden:7-7
Timestamp: 2025-03-18T12:26:25.329Z
Learning: In the Atmos project, typos or inconsistencies in test snapshot files (such as "terrafrom" instead of "terraform") may be intentional as they capture the exact output of commands and should not be flagged as issues requiring correction.
tests/fixtures/scenarios/atmos-terraform-state-yaml-function/stacks/deploy/nonprod.yaml (8)

Learnt from: aknysh
PR: #810
File: examples/tests/stacks/catalog/terraform/template-functions-test2/defaults.yaml:28-32
Timestamp: 2024-12-01T00:33:20.298Z
Learning: In examples/tests/stacks/catalog/terraform/template-functions-test2/defaults.yaml, !exec atmos terraform output is used in examples to demonstrate its usage, even though !terraform.output is the recommended approach according to the documentation.

Learnt from: aknysh
PR: cloudposse/atmos#0
File: :0-0
Timestamp: 2025-01-19T22:30:27.600Z
Learning: The Atmos YAML function !env is used to retrieve environment variables and assign them to sections in stack manifests. It supports both simple types (string, number, boolean) and complex types (JSON-encoded lists, maps, objects).

Learnt from: aknysh
PR: #810
File: website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx:0-0
Timestamp: 2024-12-03T04:01:16.446Z
Learning: In the terraform.output.mdx documentation file (website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx), the cache invalidation and cache scope behavior for the !terraform.output function are already described.

Learnt from: Listener430
PR: #1149
File: tests/snapshots/TestCLICommands_atmos_vendor_pull_ssh.stderr.golden:7-7
Timestamp: 2025-03-18T12:26:25.329Z
Learning: In the Atmos project, typos or inconsistencies in test snapshot files (such as "terrafrom" instead of "terraform") may be intentional as they capture the exact output of commands and should not be flagged as issues requiring correction.

Learnt from: osterman
PR: #727
File: internal/exec/terraform.go:65-66
Timestamp: 2024-10-31T19:23:45.538Z
Learning: The variable shouldCheckStack in ExecuteTerraform controls whether validation is performed.

Learnt from: aknysh
PR: #810
File: internal/exec/terraform_utils.go:40-213
Timestamp: 2024-12-03T05:18:49.169Z
Learning: In the context of the Atmos project, it's acceptable for functions like execTerraformOutput to remain as single functions if they perform a single purpose, such as retrieving Terraform outputs for a component in a stack, even if the function is lengthy.

Learnt from: aknysh
PR: #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.

Learnt from: haitham911
PR: #727
File: internal/exec/terraform_clean.go:183-187
Timestamp: 2024-10-27T04:34:08.011Z
Learning: In the getStackTerraformStateFolder function, it's acceptable and not an error if no Terraform state folders are found for a stack.

website/docs/integrations/atlantis.mdx (12)

Learnt from: osterman
PR: #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.

Learnt from: aknysh
PR: #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.

Learnt from: Listener430
PR: #934
File: tests/fixtures/scenarios/docs-generate/README.md.gotmpl:99-118
Timestamp: 2025-01-25T03:51:57.689Z
Learning: For the cloudposse/atmos repository, changes to template contents should be handled in dedicated PRs and are typically considered out of scope for PRs focused on other objectives.

Learnt from: Listener430
PR: #1149
File: tests/snapshots/TestCLICommands_atmos_vendor_pull_ssh.stderr.golden:7-7
Timestamp: 2025-03-18T12:26:25.329Z
Learning: In the Atmos project, typos or inconsistencies in test snapshot files (such as "terrafrom" instead of "terraform") may be intentional as they capture the exact output of commands and should not be flagged as issues requiring correction.

Learnt from: Listener430
PR: #1061
File: tests/snapshots/TestCLICommands_atmos_vendor_pull_ssh.stderr.golden:8-8
Timestamp: 2025-02-14T23:12:38.030Z
Learning: Test snapshots in the Atmos project, particularly for dry run scenarios, may be updated during the development process, and temporary inconsistencies in their content should not be flagged as issues.

Learnt from: osterman
PR: #729
File: internal/exec/help.go:48-51
Timestamp: 2024-10-27T16:59:26.187Z
Learning: In the Atmos CLI help messages, when providing examples that include the version number, use the actual version variable (e.g., version.Version) instead of placeholders like <version>.

Learnt from: RoseSecurity
PR: #797
File: pkg/list/atmos.yaml:213-214
Timestamp: 2024-11-25T17:17:15.703Z
Learning: The file pkg/list/atmos.yaml is primarily intended for testing purposes.

Learnt from: Cerebrovinny
PR: #729
File: .goreleaser.yml:26-26
Timestamp: 2024-10-25T20:26:56.449Z
Learning: There is no inconsistency in the version path in build.sh; it already uses the correct path github.com/cloudposse/atmos/pkg/version.Version.

Learnt from: osterman
PR: #808
File: examples/demo-atmos-cli-imports/atmos.yaml:7-7
Timestamp: 2024-12-12T15:15:46.457Z
Learning: In example configuration files, such as examples/demo-atmos-cli-imports/atmos.yaml, it's acceptable to use refs/heads/main in remote URLs.

Learnt from: aknysh
PR: #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.

Learnt from: haitham911
PR: #1085
File: pkg/config/load.go:219-221
Timestamp: 2025-02-24T22:46:39.744Z
Learning: In the Atmos configuration system, imports from atmos.d are optional. When import errors occur, they should be logged at debug level and the process should continue, rather than failing completely.

Learnt from: haitham911
PR: #727
File: internal/exec/path_utils.go:145-146
Timestamp: 2024-10-23T22:11:41.077Z
Learning: In the atmos project, the preference is to print relative paths in log messages instead of full paths.

internal/aws_utils/aws_utils_test.go (11)

Learnt from: Listener430
PR: #844
File: cmd/cmd_utils.go:454-464
Timestamp: 2024-12-15T10:20:08.436Z
Learning: Avoid adding timeout handling for GitHub API calls in CheckForAtmosUpdateAndPrintMessage function in cmd/cmd_utils.go, as it might be disabled by user settings.

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 : Test both happy paths and error conditions

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 : Consider using testify/mock for creating mock implementations

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 test fixtures for complex inputs

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

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 : Every new feature must include comprehensive unit tests

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 : Include integration tests for command flows

Learnt from: samtholiya
PR: #1255
File: cmd/describe_affected_test.go:15-15
Timestamp: 2025-05-23T19:51:47.091Z
Learning: The atmos codebase has a custom extension to *testing.T that provides a Chdir method, allowing test functions to call t.Chdir() to change working directories during tests. This is used consistently across test files in the codebase.

Learnt from: CR
PR: cloudposse/atmos#0
File: .cursor/rules/atmos-rules.mdc:0-0
Timestamp: 2025-07-01T02:22:25.901Z
Learning: All code must pass golangci-lint checks

Learnt from: samtholiya
PR: #1255
File: cmd/describe_affected_test.go:15-15
Timestamp: 2025-05-23T19:51:47.091Z
Learning: In the atmos codebase, t.Chdir() is a valid method call on *testing.T objects and works correctly for changing directories in tests. This is implemented through custom testing framework extensions and is used consistently throughout the test suite.

Learnt from: Cerebrovinny
PR: #729
File: internal/exec/terraform.go:258-264
Timestamp: 2024-10-19T17:42:29.152Z
Learning: Prefer not to declare variables within 'if' statements in Go code.

website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx (9)

Learnt from: aknysh
PR: #810
File: website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx:0-0
Timestamp: 2024-12-03T04:01:16.446Z
Learning: In the terraform.output.mdx documentation file (website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx), the cache invalidation and cache scope behavior for the !terraform.output function are already described.

Learnt from: aknysh
PR: #810
File: examples/tests/stacks/catalog/terraform/template-functions-test2/defaults.yaml:28-32
Timestamp: 2024-12-01T00:33:20.298Z
Learning: In examples/tests/stacks/catalog/terraform/template-functions-test2/defaults.yaml, !exec atmos terraform output is used in examples to demonstrate its usage, even though !terraform.output is the recommended approach according to the documentation.

Learnt from: aknysh
PR: #810
File: website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx:104-110
Timestamp: 2024-12-03T03:49:30.395Z
Learning: In the documentation for !terraform.output, warnings about template variable availability are already covered in other sections, so no need to suggest adding them here.

Learnt from: aknysh
PR: cloudposse/atmos#0
File: :0-0
Timestamp: 2025-01-19T22:30:27.600Z
Learning: The Atmos YAML function !include allows downloading local or remote files from different sources and assigning their contents to sections in stack manifests. It supports various protocols (file, http, git, s3, etc.) and can filter content using YQ expressions.

Learnt from: aknysh
PR: #810
File: internal/exec/terraform_utils.go:40-213
Timestamp: 2024-12-03T05:18:49.169Z
Learning: In the context of the Atmos project, it's acceptable for functions like execTerraformOutput to remain as single functions if they perform a single purpose, such as retrieving Terraform outputs for a component in a stack, even if the function is lengthy.

Learnt from: aknysh
PR: cloudposse/atmos#0
File: :0-0
Timestamp: 2025-01-19T22:30:27.600Z
Learning: The Atmos YAML function !env is used to retrieve environment variables and assign them to sections in stack manifests. It supports both simple types (string, number, boolean) and complex types (JSON-encoded lists, maps, objects).

Learnt from: aknysh
PR: #863
File: internal/exec/yaml_func_terraform_output.go:34-38
Timestamp: 2024-12-17T07:08:41.288Z
Learning: In the processTagTerraformOutput function within internal/exec/yaml_func_terraform_output.go, parameters are separated by spaces and do not contain spaces. Therefore, using strings.Fields() for parsing is acceptable, and there's no need to handle parameters with spaces.

Learnt from: aknysh
PR: #810
File: internal/exec/terraform_utils.go:145-146
Timestamp: 2024-12-03T05:29:07.718Z
Learning: In the Atmos project, a 5-minute timeout in the execTerraformOutput function is acceptable for retrieving terraform output for a component in a stack.

Learnt from: osterman
PR: #808
File: examples/demo-atmos-cli-imports/atmos.yaml:7-7
Timestamp: 2024-12-12T15:15:46.457Z
Learning: In example configuration files, such as examples/demo-atmos-cli-imports/atmos.yaml, it's acceptable to use refs/heads/main in remote URLs.

examples/quick-start-advanced/Dockerfile (10)

Learnt from: osterman
PR: #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.

Learnt from: aknysh
PR: #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.

Learnt from: aknysh
PR: #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.

Learnt from: aknysh
PR: #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.

Learnt from: Listener430
PR: #1149
File: tests/snapshots/TestCLICommands_atmos_vendor_pull_ssh.stderr.golden:7-7
Timestamp: 2025-03-18T12:26:25.329Z
Learning: In the Atmos project, typos or inconsistencies in test snapshot files (such as "terrafrom" instead of "terraform") may be intentional as they capture the exact output of commands and should not be flagged as issues requiring correction.

Learnt from: Listener430
PR: #934
File: tests/fixtures/scenarios/docs-generate/README.md.gotmpl:99-118
Timestamp: 2025-01-25T03:51:57.689Z
Learning: For the cloudposse/atmos repository, changes to template contents should be handled in dedicated PRs and are typically considered out of scope for PRs focused on other objectives.

Learnt from: Cerebrovinny
PR: #729
File: .goreleaser.yml:26-26
Timestamp: 2024-10-25T20:26:56.449Z
Learning: There is no inconsistency in the version path in build.sh; it already uses the correct path github.com/cloudposse/atmos/pkg/version.Version.

Learnt from: aknysh
PR: #810
File: internal/exec/terraform_utils.go:145-146
Timestamp: 2024-12-03T05:29:07.718Z
Learning: In the Atmos project, a 5-minute timeout in the execTerraformOutput function is acceptable for retrieving terraform output for a component in a stack.

Learnt from: osterman
PR: #729
File: internal/exec/help.go:48-51
Timestamp: 2024-10-27T16:59:26.187Z
Learning: In the Atmos CLI help messages, when providing examples that include the version number, use the actual version variable (e.g., version.Version) instead of placeholders like <version>.

Learnt from: samtholiya
PR: #914
File: cmd/terraform_commands.go:260-265
Timestamp: 2025-01-09T22:37:01.004Z
Learning: In the terraform commands implementation (cmd/terraform_commands.go), the direct use of os.Args[2:] for argument handling is intentionally preserved to avoid extensive refactoring. While it could be improved to use cobra's argument parsing, such changes should be handled in a dedicated PR to maintain focus and minimize risk.

internal/aws_utils/aws_utils.go (3)

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 : Wrap errors with context using fmt.Errorf("context: %w", err)

Learnt from: aknysh
PR: #809
File: cmd/cmd_utils.go:470-477
Timestamp: 2024-12-05T02:48:53.818Z
Learning: The function GetLatestGitHubRepoRelease in the Go codebase already uses a context with a timeout, so wrapping it with an additional context is unnecessary.

Learnt from: aknysh
PR: #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.

website/docs/core-concepts/stacks/yaml-functions/terraform.state.mdx (10)

Learnt from: aknysh
PR: #810
File: website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx:0-0
Timestamp: 2024-12-03T04:01:16.446Z
Learning: In the terraform.output.mdx documentation file (website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx), the cache invalidation and cache scope behavior for the !terraform.output function are already described.

Learnt from: aknysh
PR: #810
File: examples/tests/stacks/catalog/terraform/template-functions-test2/defaults.yaml:28-32
Timestamp: 2024-12-01T00:33:20.298Z
Learning: In examples/tests/stacks/catalog/terraform/template-functions-test2/defaults.yaml, !exec atmos terraform output is used in examples to demonstrate its usage, even though !terraform.output is the recommended approach according to the documentation.

Learnt from: aknysh
PR: #810
File: website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx:104-110
Timestamp: 2024-12-03T03:49:30.395Z
Learning: In the documentation for !terraform.output, warnings about template variable availability are already covered in other sections, so no need to suggest adding them here.

Learnt from: aknysh
PR: cloudposse/atmos#0
File: :0-0
Timestamp: 2025-01-19T22:30:27.600Z
Learning: The Atmos YAML function !include allows downloading local or remote files from different sources and assigning their contents to sections in stack manifests. It supports various protocols (file, http, git, s3, etc.) and can filter content using YQ expressions.

Learnt from: aknysh
PR: cloudposse/atmos#0
File: :0-0
Timestamp: 2025-01-19T22:30:27.600Z
Learning: The Atmos YAML function !env is used to retrieve environment variables and assign them to sections in stack manifests. It supports both simple types (string, number, boolean) and complex types (JSON-encoded lists, maps, objects).

Learnt from: aknysh
PR: #810
File: internal/exec/terraform_utils.go:40-213
Timestamp: 2024-12-03T05:18:49.169Z
Learning: In the context of the Atmos project, it's acceptable for functions like execTerraformOutput to remain as single functions if they perform a single purpose, such as retrieving Terraform outputs for a component in a stack, even if the function is lengthy.

Learnt from: aknysh
PR: #863
File: internal/exec/yaml_func_terraform_output.go:34-38
Timestamp: 2024-12-17T07:08:41.288Z
Learning: In the processTagTerraformOutput function within internal/exec/yaml_func_terraform_output.go, parameters are separated by spaces and do not contain spaces. Therefore, using strings.Fields() for parsing is acceptable, and there's no need to handle parameters with spaces.

Learnt from: aknysh
PR: #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.

Learnt from: osterman
PR: #808
File: examples/demo-atmos-cli-imports/atmos.yaml:7-7
Timestamp: 2024-12-12T15:15:46.457Z
Learning: In example configuration files, such as examples/demo-atmos-cli-imports/atmos.yaml, it's acceptable to use refs/heads/main in remote URLs.

Learnt from: aknysh
PR: #810
File: internal/exec/terraform_utils.go:145-146
Timestamp: 2024-12-03T05:29:07.718Z
Learning: In the Atmos project, a 5-minute timeout in the execTerraformOutput function is acceptable for retrieving terraform output for a component in a stack.

go.mod (15)

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

Learnt from: aknysh
PR: #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.

Learnt from: aknysh
PR: #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.

Learnt from: aknysh
PR: #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.

Learnt from: aknysh
PR: #1274
File: go.mod:63-63
Timestamp: 2025-05-30T03:21:37.197Z
Learning: The redis dependency (github.com/redis/go-redis/v9) in the atmos project is only used in tests, not in production code.

Learnt from: mcalhoun
PR: #1034
File: go.mod:3-3
Timestamp: 2025-02-14T16:16:36.328Z
Learning: Go 1.23.5 was released on January 16, 2025, and is a valid Go version. Always verify Go version information with official sources before suggesting version changes.

Learnt from: osterman
PR: #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.

Learnt from: osterman
PR: #1139
File: pkg/config/go-homedir/homedir.go:183-196
Timestamp: 2025-03-12T21:38:42.699Z
Learning: The code in pkg/config/go-homedir is a direct fork of the mitchellh/go-homedir package and was intentionally imported as-is without modifications to maintain consistency with the original source. Security concerns or other improvements may be addressed in future PRs.

Learnt from: haitham911
PR: #1195
File: internal/exec/terraform_clean.go:99-99
Timestamp: 2025-04-26T15:54:10.506Z
Learning: The error variable ErrRelPath is defined in internal/exec/terraform_clean_util.go and is used across files in the exec package, including in terraform_clean.go. This is part of an approach to standardize error handling in the codebase.

Learnt from: haitham911
PR: #1195
File: internal/exec/terraform_clean.go:99-99
Timestamp: 2025-04-26T15:54:10.506Z
Learning: The error variable ErrRelPath is defined in internal/exec/terraform_clean_util.go and is used across files in the exec package, including in terraform_clean.go. This is part of an approach to standardize error handling in the codebase.

Learnt from: haitham911
PR: #727
File: internal/exec/terraform_clean.go:155-175
Timestamp: 2024-10-27T04:28:40.966Z
Learning: In the CollectDirectoryObjects function in internal/exec/terraform_clean.go, recursive search through all subdirectories is not needed.

Learnt from: aknysh
PR: #863
File: internal/exec/yaml_func_terraform_output.go:34-38
Timestamp: 2024-12-17T07:08:41.288Z
Learning: In the processTagTerraformOutput function within internal/exec/yaml_func_terraform_output.go, parameters are separated by spaces and do not contain spaces. Therefore, using strings.Fields() for parsing is acceptable, and there's no need to handle parameters with spaces.

Learnt from: CR
PR: cloudposse/atmos#0
File: .cursor/rules/atmos-rules.mdc:0-0
Timestamp: 2025-07-01T02:22:25.901Z
Learning: All code must pass golangci-lint checks

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 : Follow Go's error handling idioms

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 : Use interfaces for external dependencies to facilitate mocking

internal/exec/yaml_func_utils_test.go (16)

Learnt from: aknysh
PR: #863
File: internal/exec/yaml_func_terraform_output.go:34-38
Timestamp: 2024-12-17T07:08:41.288Z
Learning: In the processTagTerraformOutput function within internal/exec/yaml_func_terraform_output.go, parameters are separated by spaces and do not contain spaces. Therefore, using strings.Fields() for parsing is acceptable, and there's no need to handle parameters with spaces.

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 : Every new feature must include comprehensive unit tests

Learnt from: aknysh
PR: #810
File: internal/exec/yaml_func_terraform_output.go:35-40
Timestamp: 2024-11-30T22:07:08.610Z
Learning: In the Go function processTagTerraformOutput in internal/exec/yaml_func_terraform_output.go, parameters cannot contain spaces. The code splits the input by spaces, and if the parameters contain spaces, len(parts) != 3 will fail and show an error to the user.

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 test fixtures for complex inputs

Learnt from: osterman
PR: #795
File: internal/exec/stack_processor_utils.go:378-386
Timestamp: 2024-11-19T23:00:45.899Z
Learning: In the ProcessYAMLConfigFile function within internal/exec/stack_processor_utils.go, directory traversal in stack imports is acceptable and should not be restricted.

Learnt from: Listener430
PR: #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.

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 : Test both happy paths and error conditions

Learnt from: samtholiya
PR: #1255
File: cmd/describe_affected_test.go:15-15
Timestamp: 2025-05-23T19:51:47.091Z
Learning: The atmos codebase has a custom extension to *testing.T that provides a Chdir method, allowing test functions to call t.Chdir() to change working directories during tests. This is used consistently across test files in the codebase.

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 : Include integration tests for command flows

Learnt from: haitham911
PR: #1202
File: pkg/config/process_yaml.go:0-0
Timestamp: 2025-04-24T01:40:13.576Z
Learning: When processing YAML nodes with custom directives in Go using gopkg.in/yaml.v3, setting node.Tag = "" is sufficient to prevent re-processing of the node. It's not necessary to also clear node.Value after updating the configuration store (e.g., Viper), as the original value doesn't affect subsequent operations once the tag is removed.

Learnt from: osterman
PR: #740
File: cmd/cmd_utils.go:340-359
Timestamp: 2024-10-23T21:36:40.262Z
Learning: In the Go codebase for Atmos, when reviewing functions like checkAtmosConfig in cmd/cmd_utils.go, avoid suggesting refactoring to return errors instead of calling os.Exit if such changes would significantly increase the scope due to the need to update multiple call sites.

Learnt from: haitham911
PR: #736
File: pkg/config/const.go:6-6
Timestamp: 2024-10-20T13:12:46.499Z
Learning: In cmd/cmd_utils.go, it's acceptable to have hardcoded references to atmos.yaml in logs, and it's not necessary to update them to use the CliConfigFileName constant.

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

Learnt from: samtholiya
PR: #1255
File: cmd/describe_affected_test.go:15-15
Timestamp: 2025-05-23T19:51:47.091Z
Learning: In the atmos codebase, t.Chdir() is a valid method call on *testing.T objects and works correctly for changing directories in tests. This is implemented through custom testing framework extensions and is used consistently throughout the test suite.

Learnt from: aknysh
PR: #810
File: examples/tests/stacks/catalog/terraform/template-functions-test2/defaults.yaml:28-32
Timestamp: 2024-12-01T00:33:20.298Z
Learning: In examples/tests/stacks/catalog/terraform/template-functions-test2/defaults.yaml, !exec atmos terraform output is used in examples to demonstrate its usage, even though !terraform.output is the recommended approach according to the documentation.

Learnt from: aknysh
PR: #775
File: internal/exec/template_funcs_component.go:157-159
Timestamp: 2024-11-12T03:16:02.910Z
Learning: In the Go code for componentFunc in internal/exec/template_funcs_component.go, the function cleanTerraformWorkspace does not return errors, and it's acceptable if the file does not exist. Therefore, error handling for cleanTerraformWorkspace is not needed.

internal/terraform_backend/terraform_backend_s3.go (3)

Learnt from: Listener430
PR: #844
File: pkg/config/cache.go:69-97
Timestamp: 2024-12-13T16:51:37.868Z
Learning: In pkg/config/cache.go, the function SaveCache2 is currently unused because it does not work properly on Windows and will be addressed later.

Learnt from: mcalhoun
PR: #963
File: website/docs/core-concepts/projects/configuration/stores.mdx:286-286
Timestamp: 2025-04-25T20:54:19.701Z
Learning: For the AWS SSM Parameter Store implementation in Atmos, support for read_role_arn and write_role_arn options is essential to enable cross-account access, allowing users to run operations like terraform plan in multiple accounts while accessing values across keystores. Azure Key Vault would need similar capabilities for cross-tenant/subscription authentication.

Learnt from: aknysh
PR: #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.

🧬 Code Graph Analysis (3)
tests/fixtures/scenarios/atmos-terraform-state-yaml-function/stacks/deploy/nonprod.yaml (1)
internal/exec/yaml_func_terraform_state_test.go (1)
  • function (16-146)
internal/aws_utils/aws_utils_test.go (1)
internal/aws_utils/aws_utils.go (1)
  • LoadAWSConfig (48-78)
website/docs/core-concepts/stacks/yaml-functions/terraform.state.mdx (1)
internal/exec/yaml_func_terraform_state_test.go (1)
  • function (16-146)
🪛 LanguageTool
website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx

[typographical] ~202-~202: Consider using a typographic close quote here.
Context: ...ression, hence the double-double quotes "" to escape it. ::: After the `!terraf...

(EN_QUOTES)

website/docs/core-concepts/stacks/yaml-functions/terraform.state.mdx

[typographical] ~194-~194: Consider using a typographic close quote here.
Context: ...ression, hence the double-double quotes "" to escape it. ::: After the `!terraf...

(EN_QUOTES)

⏰ 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). (3)
  • GitHub Check: Build (windows-latest, windows)
  • GitHub Check: Build (macos-latest, macos)
  • GitHub Check: Summary
🔇 Additional comments (14)
examples/quick-start-advanced/Dockerfile (2)

2-2: LGTM - Geodesic version update looks good

The bump from 4.3.0 to 4.4.0 is a straightforward dependency update.


9-9: LGTM - Atmos version aligned with PR

The version update to 1.183.2 properly reflects the enhancements being made in this PR.

website/docs/integrations/atlantis.mdx (1)

676-676: LGTM - Version consistency maintained

The ATMOS_VERSION update to 1.183.2 keeps the documentation example in sync with the Dockerfile changes.

go.mod (2)

17-24: LGTM - AWS SDK updates support S3 enhancements

The AWS SDK for Go v2 module updates are well-aligned with the PR's focus on improving S3 backend operations with caching and retry logic.


25-25: LGTM - Supporting dependency updates

The updates to doublestar, jfrog-client-go, yq, and posthog-go provide necessary compatibility and bug fixes for the enhanced functionality.

Also applies to: 54-54, 60-60, 70-70

internal/aws_utils/aws_utils_test.go (2)

7-7: LGTM - Time import added for duration parameter

The time package import supports the new assumeRoleDuration parameter in the test.


64-64: LGTM - Test properly updated for new function signature

The 15-minute duration parameter correctly reflects the enhanced LoadAWSConfig function that now supports configurable assume role durations.

tests/fixtures/scenarios/atmos-terraform-state-yaml-function/stacks/deploy/nonprod.yaml (1)

38-38: LGTM - Excellent YQ expression example

The new test_val demonstrates the enhanced !terraform.state function with complex string concatenation. The JDBC connection string transformation is a practical real-world example that showcases the YQ piping and concatenation capabilities added in this PR.

website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx (1)

174-217: LGTM!

The new section clearly documents YQ expression capabilities for transforming Terraform outputs. Examples are practical and the escaping note is helpful.

website/docs/core-concepts/stacks/yaml-functions/terraform.state.mdx (1)

166-209: LGTM!

Documentation maintains consistency with the !terraform.output function. Clear examples demonstrate YQ expression usage for state value transformations.

internal/aws_utils/aws_utils.go (1)

48-48: Good improvement making assume role duration configurable.

The explicit duration parameter provides better control over AWS role assumption timeouts.

Also applies to: 67-69

internal/exec/yaml_func_utils_test.go (1)

234-379: Solid test coverage for custom YAML tag processing.

Comprehensive test validates Terraform state YAML functions with proper setup/cleanup and multiple scenarios including YQ expressions.

internal/terraform_backend/terraform_backend_s3.go (2)

50-80: Efficient S3 client caching implementation.

Thread-safe caching with deterministic keys prevents redundant AWS role assumptions. The 15-minute minimum duration aligns with AWS requirements.


113-149: Robust retry mechanism for S3 operations.

Retry logic with backoff improves reliability for transient failures. Proper handling of missing state files by returning nil.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-terraform-state-func-3

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

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary or @auto-summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @auto-title anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@codecov
Copy link

codecov bot commented Jul 28, 2025

Codecov Report

❌ Patch coverage is 85.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.24%. Comparing base (88fcc6d) to head (1107789).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/aws_utils/aws_utils.go 16.66% 5 Missing ⚠️
internal/terraform_backend/terraform_backend_s3.go 92.59% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1383      +/-   ##
==========================================
+ Coverage   54.19%   54.24%   +0.05%     
==========================================
  Files         259      259              
  Lines       27143    27164      +21     
==========================================
+ Hits        14709    14736      +27     
+ Misses      10729    10717      -12     
- Partials     1705     1711       +6     
Flag Coverage Δ
unittests 54.24% <85.00%> (+0.05%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@aknysh aknysh added no-release Do not create a new release (wait for additional code changes) and removed patch A minor, backward compatible change labels Jul 30, 2025
@aknysh aknysh merged commit c29c2c8 into main Jul 30, 2025
66 checks passed
@aknysh aknysh deleted the update-terraform-state-func-3 branch July 30, 2025 15:27
@mergify mergify bot removed the needs-cloudposse Needs Cloud Posse assistance label Jul 30, 2025
@github-actions
Copy link

These changes were released in v1.184.0.

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants