Skip to content
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

[Feature]: Handling regular signals sent to cargo-shuttle on Windows #872

Closed
1 task done
pedromfedricci opened this issue May 5, 2023 · 7 comments
Closed
1 task done
Labels
💎 Bounty 💰 Rewarded T-Improvement Improvement or addition to existing features

Comments

@pedromfedricci
Copy link

pedromfedricci commented May 5, 2023

Describe the feature

We must handle gracefully when the local deployment of user services is interrupted by sending a signal to the cargo-shuttle project, or any of the user’s services panic, or the cargo-shuttle process is gracefully killed. At this moment we cover some of these in cargo-shuttle for *unix systems (SIGINT, SIGTERM, and user service panic). We must do similar handling for regular signals sent to cargo-shuttle process on Windows.

Requirements:

  • reproduce the issue first, so you can verify your solution works.
  • add support for Windows common signals handling by killing the shuttle-runtimes gracefully upon the cargo-shuttle process receiving them, or user’s services panic at load time.
  • use tokio::signal windows support: https://docs.rs/tokio/latest/tokio/signal/windows/index.html.
  • Optional: think about what would be required to gracefully stop all the runtimes upon one of them receiving a signal or panics later during the runtime (for both windows and linux).

Suggestion or Example of how the feature would be used

No response

Duplicate declaration

  • I have searched the issues and this feature has not been requested before.
@pedromfedricci
Copy link
Author

ping buddy @piewhat

@oddgrd
Copy link
Contributor

oddgrd commented Jul 3, 2023

Hey @pedromfedricci and @piewhat, are you still interested in this issue, or should I open it up again?

@oddgrd
Copy link
Contributor

oddgrd commented Jul 4, 2023

/bounty $50

@algora-pbc
Copy link

algora-pbc bot commented Jul 4, 2023

💎 $50 bounty created by oddgrd
🙋 If you start working on this, comment /attempt #872 to notify everyone
👉 To claim this bounty, submit a pull request that includes the text /claim #872 somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to shuttle-hq/shuttle!

Attempt Started (GMT+0) Solution
🟢 @Shubham8287 Jul 9, 2023, 12:40:10 PM #1077

@Shubham8287
Copy link
Contributor

I went through the SIG* handlers for UNIX, and able to reproduce the issue on windows. Stabbing into it.
/attempt #852

@algora-pbc
Copy link

algora-pbc bot commented Jul 15, 2023

💡 @Shubham8287 submitted a pull request that claims the bounty. You can visit your org dashboard to reward.

@algora-pbc
Copy link

algora-pbc bot commented Jul 31, 2023

🎉🎈 @Shubham8287 has been awarded $50! 🎈🎊

@jonaro00 jonaro00 added T-Improvement Improvement or addition to existing features and removed A-cargo-shuttle labels Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 Bounty 💰 Rewarded T-Improvement Improvement or addition to existing features
Projects
None yet
Development

No branches or pull requests

4 participants