feat(cmd): add auto-start support to init command#174
Conversation
Implements auto-start functionality allowing workspaces to be started immediately after registration via --start flag or KORTEX_CLI_INIT_AUTO_START environment variable. This combines init and start operations for improved automation and convenience. Closes kortex-hub#173 Co-Authored-By: Claude Code (Claude Sonnet 4.5) <noreply@anthropic.com> Signed-off-by: Philippe Martin <phmartin@redhat.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 15 minutes and 30 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds optional auto-start capability to the Changes
Sequence DiagramsequenceDiagram
participant User
participant InitCmd as init Command
participant Manager
participant RuntimeSetup as Runtime System
participant Instance
User->>InitCmd: kortex-cli init [--start] <br/> or KORTEX_CLI_INIT_AUTO_START=1
InitCmd->>InitCmd: Parse flags & env vars<br/>(flag takes precedence)
InitCmd->>Manager: Register workspace
Manager->>Instance: Create instance
Manager-->>InitCmd: Return instance ID
alt auto-start enabled
InitCmd->>Manager: Start(ctx, instanceID)
Manager->>RuntimeSetup: Register & setup runtimes
RuntimeSetup->>Instance: Transition state → running
Instance-->>Manager: State confirmed
Manager-->>InitCmd: Success
else auto-start disabled
InitCmd-->>User: Return success<br/>(instance created, not started)
end
InitCmd->>User: Return JSON output & exit code
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: Philippe Martin <phmartin@redhat.com>
Implements auto-start functionality allowing workspaces to be started immediately after registration via --start flag or KORTEX_CLI_INIT_AUTO_START environment variable. This combines init and start operations for improved automation and convenience.
Closes #173