github cloudposse/atmos v1.159.0

8 hours ago
fix typo in Redis store error message @mcalhoun (#1022) ## what - Fixed environment variable name from `REDIS_URL` to `ATMOS_REDIS_URL` in error message

why

  • Error message was referencing incorrect environment variable name
  • Ensures error message matches the actual environment variable being checked in the code
  • Helps developers quickly identify and fix configuration issues

Summary by CodeRabbit

  • Bug Fixes
    • Revised the error message to clearly specify which environment variable is required for the Redis connection configuration, ensuring better clarity for users during setup.
allow user to specify default value when using store @mcalhoun (#1020) ## what
  • Added support for default values in the !store YAML function using the pipe (|) syntax
  • Added comprehensive test coverage for the store function, including default value scenarios
  • Updated documentation to reflect the new default value functionality

why

  • Provides a fallback mechanism when store values are not found, preventing errors
  • Improves user experience by allowing graceful handling of missing values
  • Makes the store function more resilient and flexible in different environments
  • Support cold-start scenarios where components the target component depends on haven't been provisioned yet

references

  • Related to store functionality described in /core-concepts/projects/configuration/stores
  • Implements similar default value patterns found in other YAML processors

Summary by CodeRabbit

  • New Features
    • Introduced an optional default value for YAML store lookups, allowing a fallback when a key is not found.
    • Enhanced parameter parsing and error handling for a smoother user experience.
  • Tests
    • Added comprehensive tests to cover diverse lookup scenarios and default value usage.
  • Documentation
    • Updated the YAML store function guide to include details on the new default value parameter and its usage.
move hook and store test @mcalhoun (#1021) ## what - Relocated test fixtures from `testdata/fixtures/hooks-test` to `tests/fixtures/scenarios/hooks-test` - Renamed test components from `random1/random2` to `component1/component2` for better clarity - Updated component path from `random` to `hook-and-store` to better reflect its functionality - Fixed typo in test comment ("deeploy" to "deploy")

why

  • Improves test organization by moving fixtures to a more standardized location
  • Makes test components and their purposes more self-documenting through better naming
  • Aligns component names with their actual functionality (hook and store operations)
  • Enhances code readability and maintainability

references

  • No external references or issues to link
Sanitize snapshots @osterman (#1002) ## what - Replace the repo root with a place holder path

why

  • Snapshots were leaking developer environment details, breaking golden snapshots, and complicating diffs
  • Most diffs were relates to file path differences between Linux/MacOS/Windows
  • repo root differs between workstations, depending on who generates the snapshots

references

Summary by CodeRabbit

  • New Features

    • CLI command outputs now present generic, standardized file paths instead of user-specific ones, improving clarity and consistency.
  • Bug Fixes

    • Enhanced output sanitization and error handling ensure that displayed paths remain uniform across environments.
  • Tests

    • Updated expected outputs for configuration tests to streamline validation criteria and focus on key fields.

These improvements contribute to a cleaner and more consistent configuration display, leading to a better overall user experience.

restore hooks functionality @mcalhoun (#1010) ## what
  • Restore the hooks functionality to atmos, since it was accidentally removed in a previous PR
  • Implemented a new hooks system for Terraform commands
  • Added support for after.terraform.apply events
  • Created a Redis-based store command for persisting Terraform outputs
  • Added integration tests for hooks and store functionality

why

  • Enables automation of post-deployment tasks through hooks
  • Provides a mechanism to share Terraform outputs between different components
  • Allows for more flexible and maintainable infrastructure deployment workflows
  • Ensures reliable state management across component deployments

references

  • Related to terraform hooks and event handling
  • Implements Redis-based state storage for cross-component communication

Summary by CodeRabbit

  • New Features

    • Enhanced the Terraform commands to support pre- and post-execution hooks that enable custom actions during deployments.
    • Improved the mechanism for managing and storing outputs, facilitating cross-component integrations.
    • Introduced new hooks and configuration structures to streamline output management between components.
    • Added a new YAML configuration file with detailed project settings, including Redis store and Terraform configurations.
    • Introduced a new StoreCommand structure for handling outputs within hooks.
  • Bug Fixes

    • Removed deprecated functions and streamlined command execution flow for improved reliability.
  • Documentation

    • Expanded configuration examples and messaging for better handling of deployment settings, including environment variable management.
update artifactory store to allow anonymous access @mcalhoun (#1011) ## what - Added support for anonymous access to Artifactory repositories - Added conditional logic to only set access token if it's not "anonymous" - Updated documentation to explain anonymous access functionality

why

  • Enables users to access public Artifactory repositories without authentication
  • Provides flexibility for repositories that allow anonymous access
  • Simplifies configuration for public repository access

references

Summary by CodeRabbit

  • New Features
    • Enhanced authentication for Artifactory: The system now supports anonymous access, enabling more flexible repository connections.
  • Documentation
    • Updated configuration guidance to include the new anonymous access option in the project documentation, with emphasis on security considerations for token management.
update artifactory store to use getKey @mcalhoun (#1017) ## what - Refactored the `getKey` method in `ArtifactoryStore` to use a shared key generation function - Simplified key path construction by separating prefix handling from the main path generation

why

  • Reduces code duplication by leveraging a common key generation function
  • Improves maintainability by separating concerns between prefix handling and path construction
  • Makes the code more consistent with other store implementations

references

  • Related to key generation standardization across storage implementations

Summary by CodeRabbit

  • Refactor
    • Streamlined internal key creation logic to enhance maintainability and clarity.
    • Ensured that public functionalities remain consistent with no visible changes to the end-user.
feat: add spinner during `atmos validate stacks` operations @RoseSecurity (#1005) ## why

atmos_validate

  • It can be difficult to tell whether the command is hanging or actively running in the background. Here’s the current output:
. [infra] (HOST) workspace ⨠ atmos validate stacks

Then:

. [infra] (HOST) workspace ⨠ atmos validate stacks
all stacks validated successfully

what

  • Add a spinner to the atmos validate stacks command
  • Closes #1003

references

Summary by CodeRabbit

  • New Features
    • Introduced a spinner indicator that provides live visual feedback during the Atmos Stacks validation process. This enhancement gracefully adapts to both interactive and non-interactive terminal sessions, offering a fallback message when needed, and stops promptly if errors occur.
    • Added output messages indicating the start and successful completion of the Atmos Stacks validation.
update aws param store store to use getKey @mcalhoun (#1009) ## what
  • Refactored the getKey method in AWS SSM Parameter Store to handle nil stack delimiters
  • Added error handling for cases where stack delimiter is not properly set
  • Improved error propagation in Set and Get operations

why

  • Prevents potential nil pointer dereferences when stack delimiter is not initialized
  • Makes the code more robust by explicitly handling error cases
  • Improves debugging capabilities by providing more specific error messages

references

Summary by CodeRabbit

  • Bug Fixes

    • Improved error reporting to promptly capture and inform users of configuration issues.
  • Refactor

    • Streamlined the process for constructing actual configuration keys, enhancing overall consistency and system reliability.
    • Enhanced error handling in key retrieval processes for improved robustness.
Running atmos docs (with no args) should emit message @codercr (#1004) ## what
  • When running atmos docs with no args we now print Opening default browser to 'https://atmos.tools'. to console.

why

  • So the user is aware that we are opening the documentation in their browser.

references

Summary by CodeRabbit

  • New Features
    • Added a console message to notify users when the default browser is being opened to display the Atmos documentation.
  • Tests
    • Updated the test case for the "atmos docs" command to include an expectation for the console output indicating the browser opening.
    • Enhanced test snapshots to reflect the new output message when launching the browser.
add redis store @mcalhoun (#1008) ## what - Added Redis store implementation for Atmos - Implemented Redis client interface with Get/Set operations - Added comprehensive test coverage for Redis store functionality - Updated documentation to include Redis store configuration options

why

  • Provides a fast, in-memory data store option for Atmos configurations
  • Enables caching and sharing of configuration values across distributed systems
  • Offers an alternative to AWS SSM Parameter Store and Artifactory for storing configuration data
  • Allows for flexible key-value storage with customizable prefixes and delimiters

references

Summary by CodeRabbit

  • New Features
    • Integrated support for a Redis data store, offering enhanced data management and improved scalability across distributed environments.
  • Documentation
    • Added a new section in the configuration guides for Redis, detailing setup options and authentication methods.
  • Tests
    • Introduced a suite of unit tests for the Redis store implementation, covering various success and error scenarios.
deprecate in memory store @mcalhoun (#1007) ## what

deprecate the in-memory store

why

This was not a useful store as it doesn't persist across runs. It will be replaced by a redis store in a future PR.

Summary by CodeRabbit

  • Chores

    • Removed custom editor configuration that affected YAML and MDX file formatting.
  • Refactor

    • Eliminated the in-memory data storage option, streamlining available storage integrations.

Don't miss a new atmos release

NewReleases is sending notifications on new releases.