Skip to content

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

Merged
milldr merged 22 commits intomainfrom
feat/ap-163-instance-status-hook
Mar 20, 2026
Merged

feat: AP-163 send raw instance status to Atmos Pro, extend to apply#2216
milldr merged 22 commits intomainfrom
feat/ap-163-instance-status-hook

Conversation

@milldr
Copy link
Copy Markdown
Member

@milldr milldr commented Mar 17, 2026

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
Copy link
Copy Markdown

github-actions bot commented Mar 17, 2026

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@milldr milldr added the minor New features that do not break anything label Mar 17, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 17, 2026

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
@milldr milldr added the release/feature Create release from this PR label Mar 18, 2026
@milldr milldr temporarily deployed to feature-releases March 18, 2026 13:11 — with GitHub Actions Inactive
@milldr milldr temporarily deployed to feature-releases March 18, 2026 13:12 — with GitHub Actions Inactive
@milldr milldr temporarily deployed to feature-releases March 18, 2026 13:25 — with GitHub Actions Inactive
@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.

@milldr milldr temporarily deployed to feature-releases March 18, 2026 21:58 — with GitHub Actions Inactive
@milldr milldr temporarily deployed to feature-releases March 18, 2026 22:00 — with GitHub Actions Inactive
@milldr milldr temporarily deployed to feature-releases March 18, 2026 22:13 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown

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

@milldr milldr marked this pull request as ready for review March 19, 2026 13:51
@milldr milldr temporarily deployed to feature-releases March 19, 2026 18:49 — with GitHub Actions Inactive
@milldr milldr temporarily deployed to feature-releases March 19, 2026 18:50 — with GitHub Actions Inactive
@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.

@milldr milldr temporarily deployed to feature-releases March 20, 2026 15:24 — with GitHub Actions Inactive
@milldr milldr temporarily deployed to feature-releases March 20, 2026 15:25 — with GitHub Actions Inactive
@milldr milldr temporarily deployed to feature-releases March 20, 2026 15:32 — with GitHub Actions Inactive
@milldr milldr had a problem deploying to feature-releases March 20, 2026 15:33 — with GitHub Actions Failure
@milldr milldr temporarily deployed to feature-releases March 20, 2026 15:34 — with GitHub Actions Inactive
@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.

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