Skip to content

feat: AP-163 send raw instance status to Atmos Pro, extend to apply - #2216

Merged
Dan Miller (milldr) merged 22 commits into
mainfrom
feat/ap-163-instance-status-hook
Mar 20, 2026
Merged

Dan Miller (milldr) merged 22 commits into
mainfrom
feat/ap-163-instance-status-hook

Conversation

@milldr

@milldr Dan Miller (milldr) commented Mar 17, 2026 •

Copy link
Copy Markdown
Member

What

  • CLI sends raw command + exit_code to Atmos Pro instead of interpreting exit codes into status strings
  • Extends status upload from plan-only to both plan and apply (both require explicit --upload-status flag)
  • Reads --upload-status flag via Cobra/Viper (fixes silent no-op when flag was consumed by Cobra before reaching the upload code path)
  • Treats plan exit code 2 (changes detected) as success after upload completes, so CI workflows don't fail

Why

Instances on the Atmos Pro dashboard show "Unknown" status after completed workflow runs. The CLI was only uploading status for plan (not apply), and was interpreting exit codes client-side. Moving interpretation server-side means status logic can be updated without a CLI release, and all exit codes (including errors) are now reported.

Ref

  • AP-163
  • PRD: docs/prd/instance-status-raw-upload.md
  • Full PRD (Atmos Pro): cloudposse-corp/apps → apps/atmos-pro/prd/instance-status-from-workflow-hooks.md
  • Atmos Pro counterpart: cloudposse-corp/apps qa-1 branch

Summary by CodeRabbit

Release Notes

  • New Features

    • Added --upload-status flag to upload raw Terraform execution data (command and exit code) to Atmos Pro for both plan and apply operations.
    • Introduced configurable CI exit code mapping to remap Terraform exit codes while preserving original execution results in cloud uploads.
  • Bug Fixes

    • Improved plan output detection to correctly identify cases where only output values change.
  • Documentation

    • Added feature documentation and blog post explaining the new upload capability.

@github-actions github-actions Bot added the size/m Medium size PR label Mar 17, 2026
@github-actions

github-actions Bot commented Mar 17, 2026 •

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@milldr Dan Miller (milldr) added the minor New features that do not break anything label Mar 17, 2026
Comment thread docs/prd/instance-status-raw-upload.md Outdated
Comment thread docs/prd/instance-status-raw-upload.md Outdated
Comment thread docs/prd/instance-status-raw-upload.md Outdated
@codecov

codecov Bot commented Mar 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.95%. Comparing base (990b763) to head (84719d1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2216      +/-   ##
==========================================
+ Coverage   76.93%   76.95%   +0.01%     
==========================================
  Files        1003     1004       +1     
  Lines       95377    95390      +13     
==========================================
+ Hits        73380    73409      +29     
+ Misses      17743    17729      -14     
+ Partials     4254     4252       -2     
Flag Coverage Δ
unittests 76.95% <100.00%> (+0.01%) ⬆️

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

Files with missing lines Coverage Δ
cmd/terraform/options.go 100.00% <100.00%> (ø)
cmd/terraform/utils.go 48.58% <100.00%> (+0.18%) ⬆️
internal/exec/ci_exit_codes.go 100.00% <100.00%> (ø)
internal/exec/pro.go 47.36% <100.00%> (+0.80%) ⬆️
internal/exec/terraform.go 65.03% <100.00%> (+0.36%) ⬆️
pkg/pro/api_client_instance_status.go 65.51% <100.00%> (+4.22%) ⬆️
pkg/schema/schema.go 87.70% <ø> (ø)

... and 4 files with indirect coverage changes

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

coderabbitai[bot]
coderabbitai Bot previously approved these changes Mar 18, 2026
@github-actions

Copy link
Copy Markdown

These changes were released in v1.210.1-test.0.

@github-actions

Copy link
Copy Markdown

These changes were released in v1.210.1-test.1.

@github-actions

Copy link
Copy Markdown

These changes were released in v1.210.1-test.2.

@milldr
Dan Miller (milldr) marked this pull request as ready for review March 19, 2026 13:51
@github-actions

Copy link
Copy Markdown

These changes were released in v1.211.0-test.9.

@github-actions

Copy link
Copy Markdown

These changes were released in v1.211.0-test.10.

Comment thread website/blog/2026-03-19-instance-status-upload.mdx Outdated
Comment thread website/blog/2026-03-19-instance-status-upload.mdx Outdated
@github-actions

Copy link
Copy Markdown

These changes were released in v1.211.0-test.11.

@github-actions

Copy link
Copy Markdown

These changes were released in v1.211.0-rc.1.

@github-actions

Copy link
Copy Markdown

These changes were released in v1.211.0-rc.2.

This branch had an error being deployed

1 failed (outdated) and 1 active deployments
preview — 84719d18 Deployed Mar 20, 2026 by github-actions[bot]
feature-releases — 3a09326a Deployed Mar 20, 2026 by milldr via release / goreleaser #13951
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor New features that do not break anything size/m Medium size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants