github cloudposse/atmos v1.179.0-rc.1

latest releases: v1.190.0-test.0, v1.190.0-rc.0, v1.189.0...
pre-release3 months ago
DEV-3110: Improve Workflow DX @milldr (#1229) ## what - ~~Moved workflow utils and tests into the `pkg/workflow` directory~~ This wont work because we depend on shell utils in internal/exec. Reverted - Update all log messages for workflow_utils to use the charmbracelet log handling - Add TUI message when workflow kicks off an _atmos_ command to report the command being executed ``` $ atmos workflow pass --file test Executing command: `atmos terraform plan mock -s nonprod` <---- this is new Initializing the backend... Initializing provider plugins...

Terraform has been successfully initialized!
Switched to workspace "nonprod".

Changes to Outputs:

  • bar = "bar nonprod override"
  • baz = "baz catalog default"
  • foo = "foo nonprod override"
  • stage = "nonprod"

You can apply this plan to save these new output values to the Terraform state, without changing any real infrastructure.

- Add a pattern for all workflow errors:

Workflow Error

Explanation

```

why

  • For all other commands, we already have the convention of using a directory for a utilities for a command, such as pkg/workflow. Plus we already had that directory, but it only had incomplete tests
  • We should always see the command being executed before it runs and see the command that fails when it fails.
  • Clear error messages on workflows to explain the true issue in a consistent format

references

screenshots

Summary by CodeRabbit

  • New Features

    • Introduced comprehensive workflow testing scenarios and fixtures for CLI workflows, including production and non-production deployments, catalog imports, and multiple workflow step types.
    • Added detailed error handling and user-friendly, markdown-formatted error messages for workflow execution failures, invalid configurations, and missing files.
    • Enhanced workflow step naming by automatically generating names for unnamed steps.
  • Bug Fixes

    • Improved error reporting for invalid workflow manifests, missing workflows, and unsupported step types, providing clearer guidance to users.
  • Tests

    • Added extensive test cases and snapshot outputs covering successful and failing workflow executions, invalid step types, missing steps, and shell command errors.
    • Refactored and expanded test suites to cover workflow execution logic, step naming, and workflow description features.
  • Chores

    • Updated configuration and fixture files to support new workflow testing scenarios and error cases.

Don't miss a new atmos release

NewReleases is sending notifications on new releases.