Skip to content

refactor(compute): rename compute logs to compute events#96

Merged
tonychang04 merged 1 commit intomainfrom
refactor/compute-events-rename
Apr 30, 2026
Merged

refactor(compute): rename compute logs to compute events#96
tonychang04 merged 1 commit intomainfrom
refactor/compute-events-rename

Conversation

@tonychang04
Copy link
Copy Markdown
Contributor

@tonychang04 tonychang04 commented Apr 30, 2026

Summary

  • Renames compute logs <id>compute events <id>. The OSS endpoint behind it returns Fly machine lifecycle events (start/stop/exit/restart), not container stdout/stderr — the new name is honest.
  • Mirrors the parallel OSS rename: InsForge#1062 moves /api/compute/services/:id/logs/events. Both must ship together.
  • Frees up compute logs for the future container stdout/stderr feature (roadmap; see OSS spec 2026-04-07-compute-dashboard-ux-design.md).

Why this is OK as a breaking change

  • 0.1.59 ships only the misleading compute logs. Most users invoke via npx so the next run picks up the rename.
  • Reusing the freshly-vacated compute logs for actual log streaming later avoids permanent semantic debt.

Test plan

  • npm run lint passes (149 tests, 13 skipped).
  • Manual: npx insforge-cli compute events <id> --limit 5 returns the events array (against OSS PR #1062 build).

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Added compute events <id> command to retrieve compute machine lifecycle events (start, stop, exit, restart) with timestamps and messages. Supports --limit (1–1000, default 50) and --json output formatting.
  • Breaking Changes

    • Removed compute logs command; use compute events instead.

The OSS endpoint this command calls returns Fly machine lifecycle
events (start/stop/exit/restart) — not container stdout/stderr.
Calling it `compute logs` was misleading; `compute events` is honest.

When real container stdout/stderr lands later, the freshly-vacated
`compute logs` command name will be used for actual log streaming.

Mild breaking change — `npx`-based usage cache means most users won't
notice on the next invocation. Tracks the parallel rename in OSS PR
that moves /api/compute/services/:id/logs → /events.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

This pull request replaces the compute logs subcommand with a new compute events subcommand. The new command retrieves Fly compute machine lifecycle events (start/stop/exit/restart) from the compute service API, with similar authentication, limit parsing (1–1000, default 50), and output handling logic. Command registration and integration tests are updated accordingly.

Changes

Cohort / File(s) Summary
Command Implementation
src/commands/compute/events.ts, src/commands/compute/logs.ts
New events command added with lifecycle event retrieval; previous logs command removed. Both follow similar structure with authentication, --limit clamping, conditional JSON output, and usage reporting.
Integration Updates
src/index.ts, src/integration/compute.test.ts
Command registration switched from registerComputeLogsCommand to registerComputeEventsCommand; integration test updated to verify events subcommand instead of logs subcommand.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • CarmenDou
  • jwfing

Poem

🐰 The logs have hopped away, events take their place,
Lifecycle moments captured with grace,
Start, stop, restart—a new command's embrace,
CLI evolves with a swift, simple trace! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: renaming the compute logs command to compute events, which is the core objective of this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/compute-events-rename

Review rate limit: 4/5 reviews remaining, refill in 12 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Member

@jwfing jwfing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, approved.

@tonychang04 tonychang04 merged commit 61b350a into main Apr 30, 2026
1 of 2 checks passed
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.

2 participants