-
Notifications
You must be signed in to change notification settings - Fork 39
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
way to elegantly stop MM2 in the middle of the execution #10
Comments
I think we could do this readily in
Implementation options:
@mauricioaniche Preference? |
I think we can do that in What do you think? The rationale behind the feature suggestion: in practice, what happens is that, you put repodriller to run, and a few minutes later you find a problem by inspecting the CSV, and you want to stop it. When you kill repodriller's process directly, depending on the task that repodriller is doing, it leaves the Git project repository in a bad state; then, in the next run, repodriller fails because of it. |
I'm a bit confused about your environment variable idea. I thought that once a process A has begun, another process B cannot (easily) change A's environment variables. SO seems to agree, e.g. this question. Fundamentally, to exit gracefully, a RepoDriller process needs to monitor for external input somehow (signal handler, magic file, etc.) and then convince the On this topic...does RepoDriller strive to work outside of UNIX environments? |
Woah, I did not know that! Interesting! Yes, we should make sure it works in Windows as well, as we do have students using Windows machines. A magic file, on the same directory of the jar file should do (and simple to implement). Sounds good? |
DesignThe overall design is independent of mechanism:
Requests might be "what is the status" (#75), "please die gracefully" (#10), etc. External interfaceTo be honest I'm not really thrilled with the "magic file" approach as a portable signaling mechanism. It would work for this specific case, but it wouldn't extend well to other future needs.
I suggest that the communication mechanism be HTTP-based instead. Then you can use your favorite HTTP Client (wget, curl, etc.) to talk to RepoDriller. This will be more portable than using the FS. This will also be easier to use in a distributed setting, as you described in #24. |
The HTTP is indeed a very elegant solution, but I fear it will just be a waste of our limited development time. I do not expect this feature to be that popular; I basically use it when I'm still testing/debugging my study. So, hopefully, other people also don't need fancy ways to stop the execution. The magic file, although less elegant, will cost us just 2 lines of code. I suggest we go for the simple implementation right now. Then, if we see more people asking about a fancier solution, we go for the HTTP solution. |
I don't think the HTTP approach is all that scary. How to extend the various components to support various reporting/response mechanisms is the bigger question. @mauricioaniche Can you advise on the places that might need extension? Here's my list so far: Die gracefully
The minimal change to support exiting early is just to short-circuit the loop in Progress report
Other things we might want to be able to query on-the-fly |
No description provided.
The text was updated successfully, but these errors were encountered: