feat(list): add matrix output format to list instances command @johncblandii (#2322)
## what- Add
--format=matrixsupport toatmos list instances, producing GitHub Actions-compatible matrix JSON identical toatmos describe affected --format=matrix - Add
--output-fileflag for writing results inkey=valueformat (for$GITHUB_OUTPUT) - Extract shared matrix types and output logic into
pkg/matrix/for DRY reuse across bothdescribe affectedandlist instances
why
- CI/CD pipelines need matrix output from
list instancesto drive parallel GitHub Actions jobs, just likedescribe affectedalready supports - Sharing the matrix output logic between commands avoids duplication and ensures consistent output format
- The
--output-fileflag enables direct integration with GitHub Actions$GITHUB_OUTPUTwithout shell redirection
references
- Output format matches
atmos describe affected --format=matrixexactly:{"include":[{"stack":"...","component":"...","component_path":"...","component_type":"..."}]} - When using
--output-file, writesmatrix=<json>andaffected_count=<N>lines
Summary by CodeRabbit
-
New Features
- Added --format=matrix to emit GitHub Actions–compatible matrix JSON
- Added --output-file / -o to write matrix results as key=value (for $GITHUB_OUTPUT); only supported with --format=matrix
- Matrix entries include stack, component, component_path, and component_type
- --format=matrix disallows --upload and triggers CI-friendly output behavior
-
Tests
- Added coverage for matrix format, output-file flag, and file/stdout writing
-
Documentation
- Added docs, blog post, and roadmap entry for matrix support
chore: Update Atmos Pro workflow to use v1.215.0 container image @osterman (#2323)
## what- Updated the Atmos Pro CI workflow container image from
1.214.0to1.215.0 - Removed the "Build atmos from source" step that compiled a dev binary via
go build - Changed
atmos docs generate readmeandatmos pro committo use the container's pre-installedatmosbinary instead of/tmp/atmos-dev
why
- Atmos v1.215.0 ships with the
pro commitcommand built-in, so building from source is no longer necessary - Simplifies the CI workflow and reduces build time by eliminating the Go compilation step
references
- #2298 (
atmos pro commitfeature)
Summary by CodeRabbit
- Chores
- Updated GitHub Actions workflow to use atmos container image version 1.215.0 (upgraded from 1.214.0).
- Streamlined workflow execution by removing the local build step and invoking atmos directly from the container image.
🚀 Enhancements
fix: treat missing Atmos config in BASE as empty baseline in `atmos describe affected` @[copilot-swe-agent[bot]](https://github.com/apps/copilot-swe-agent) (#2296)
`atmos describe affected` fatally errors with `failed to find import` on greenfield branches (or when the base ref predates Atmos adoption) because `ErrFailedToFindImport` from BASE stack processing was propagated as a hard failure. The correct behavior is to treat an unconfigured BASE as an empty baseline — everything in HEAD is new, therefore everything is affected.Changes
-
internal/exec/describe_affected_utils.go—executeDescribeAffectednow handlesErrFailedToFindImportalongsideErrNoStackManifestsFoundin both BASE processing paths:FindAllStackConfigsInPathsForStackreturningErrFailedToFindImport(stacks directory absent in BASE) → setsremoteStackConfigFilesAbsolutePaths = []string{}ExecuteDescribeStacksreturningErrFailedToFindImport(imports unresolvable in BASE) → setsremoteStacks = map[string]any{}
Both cases emit a
WARNlog with actionable context:WARN No Atmos stack manifests found in BASE; treating BASE as empty (all HEAD components will be reported as affected) hint="This is expected for greenfield branches or when the base branch does not yet use Atmos" -
tests/describe_affected_greenfield_test.go— Integration test that initializes a bare-minimum git repo (single commit, no Atmos config) as the BASE and asserts all known HEAD components (component-1,component-2inprod/nonprod) appear in the affected output without error.