-
Notifications
You must be signed in to change notification settings - Fork 2
feat: accept max-run-duration option for VMs #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughAdds a new optional Changes
Sequence Diagram(s)sequenceDiagram
participant GH as GitHub Action (workflow)
participant SH as action.sh (script)
participant GC as gcloud CLI
participant VM as VM startup script
GH->>SH: invoke with --max_run_duration value
SH->>SH: parse --max_run_duration and build max_run_duration_flag
SH->>GC: call gcloud compute instances bulk create ... --max-run-duration=<value>
SH->>GC: set metadata --startup-script="... --max_run_duration=<value> ..."
GC->>VM: VM boots and receives startup script with max_run_duration
VM->>VM: startup script applies max_run_duration at instance runtime
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)*⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (5)
✏️ Tip: You can disable this entire section by setting Comment |
theobalestra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The instance-termination-action flag must be passed for automatic instance termination (--max-run-duration or --termination-time)
A simple fallback to ensure instances don't run forever (e.g. if they fail to receive a shutdown signal). Upon reaching the max run duration, the instance will be deleted (not just stopped) according to the
instance-termination-actionflag passed to the command.Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.