-
-
Notifications
You must be signed in to change notification settings - Fork 54
stop running other profiles in group after receiving interrupt signal #539
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
Conversation
WalkthroughThe signal handling for interrupt signals (SIGINT, SIGTERM, SIGABRT) was moved from the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant startProfileOrGroup
participant goCtx (signal.NotifyContext)
participant runProfile
User->>startProfileOrGroup: Start group/profile
startProfileOrGroup->>goCtx: Set up signal context (SIGINT, SIGTERM, SIGABRT)
startProfileOrGroup->>startProfileOrGroup: notifyStart()
alt Running group
loop For each profile
startProfileOrGroup->>goCtx: Check for cancellation
alt goCtx cancelled
startProfileOrGroup->>startProfileOrGroup: Log warning, exit loop
else not cancelled
startProfileOrGroup->>runProfile: Run profile
end
end
else Running single profile
startProfileOrGroup->>runProfile: Run profile
end
startProfileOrGroup->>startProfileOrGroup: notifyStop()
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Assessment against linked issues
Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (5)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #539 +/- ##
=======================================
Coverage 79.33% 79.33%
=======================================
Files 136 136
Lines 13305 13305
=======================================
Hits 10555 10555
Misses 2332 2332
Partials 418 418
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|



Stop running other profiles in group after receiving interrupt signal
This PR improves signal handling for profile groups by ensuring that interrupt signals (Ctrl+C, SIGTERM, SIGABRT) properly stop the execution of remaining profiles in a group.
Changes
startProfileOrGroup()instead of individualrunProfile()callssignal.NotifyContext()to create a Go context that gets canceled on interrupt signalsgoCtx.Err()in the group profile loop to detect interruption and stop processing remaining profilesBehavior
Impact
This ensures that users can cleanly interrupt long-running profile groups without having to wait for all profiles to complete, improving the user experience when managing backup operations.
Fixes #535