Skip to content

feat: split onctl ls into RUNNING/PAUSED tables for all providers - #873

Merged
cdalar merged 1 commit into
mainfrom
fix/issue-872-ls-paused-tables
Jun 4, 2026
Merged

cdalar merged 1 commit into
mainfrom
fix/issue-872-ls-paused-tables

Conversation

@cdalar

@cdalar cdalar commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #872

  • Hetzner already showed separate RUNNING/PAUSED tables via ListPaused() (snapshot-based pause). AWS, GCP, and Azure return stopped instances mixed into List() with provider-specific status strings.
  • Added isPausedStatus() to detect stopped VMs: AWS "stopped", GCP "TERMINATED" (stopped-not-deleted), Azure "VM deallocated".
  • After fetching serverList, any VM whose status matches is moved into pausedList before rendering — so the existing two-table display logic now fires for every provider.

Test plan

  • onctl ls with running instances only → single table, no headers (unchanged)
  • onctl ls with a mix of running + stopped AWS instances → green ● RUNNING (N) table + yellow ● PAUSED (M) table
  • Same check for GCP (TERMINATED) and Azure (VM deallocated)
  • onctl ls -o json / -o yaml → flat combined array, paused VMs present with their original status string
  • onctl ls -o puppet / -o ansible → only running instances listed (unchanged)
  • Hetzner behaviour unchanged (still uses ListPaused() path)

https://claude.ai/code/session_01GTkvM3QupVmAM7nfRkkdc4


Generated by Claude Code

@CLAassistant

CLAassistant commented Jun 2, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codecov

codecov Bot commented Jun 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 13.93%. Comparing base (9e79631) to head (27a6d9e).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
cmd/list.go 0.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #873      +/-   ##
==========================================
- Coverage   13.98%   13.93%   -0.05%     
==========================================
  Files          38       38              
  Lines        3411     3422      +11     
==========================================
  Hits          477      477              
- Misses       2882     2893      +11     
  Partials       52       52              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

Hetzner already showed two separate tables via ListPaused(). AWS, GCP,
and Azure return stopped instances mixed into List() with status values
"stopped", "TERMINATED", and "VM deallocated" respectively. Partition
those out before rendering so every provider gets the same two-table
visual.

Closes #872

https://claude.ai/code/session_01GTkvM3QupVmAM7nfRkkdc4
@cdalar
cdalar force-pushed the fix/issue-872-ls-paused-tables branch from ff51fd2 to 27a6d9e Compare June 4, 2026 09:28
@cdalar
cdalar merged commit 750e144 into main Jun 4, 2026
15 checks passed
@cdalar
cdalar deleted the fix/issue-872-ls-paused-tables branch August 19, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

onctl ls 2 separate list for running and paused.

2 participants

⌂ 换网址