-
Notifications
You must be signed in to change notification settings - Fork 20
WIP: Implement option to force kill #288
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
Closed
Closed
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
07c30db
WIP: Implement option to allow force kill
agoscinski 00fe7b5
Implementation with minimal changes
khsrali f1f8095
Merge branch 'master' into force-kill
unkcpz b9dd887
Merge branch 'master' into force-kill
unkcpz 4a462a0
Adapt after merge the message protocol PR
unkcpz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Not a big fan of this approach. Why not add a
force_kill: bool = Falseargument to thekillmethod. Fromaiida-coreyou can then pass that in theCommunicator.rpc_sendmethodThere 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.
Thanks a lot @sphuber.
Yes yes, I thought about it, but then we have to modify many functions to pass
force_killhand in hand or even to be compatible with dict.So far, apparently in plumpy the
msgis expected to be astr, if I'm not mistaken.I tried to keep changes minimal.. although maybe not the best approach
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.
I think @sphuber has a good point. If the message content is checked inside the implementation, there is no way for user to know how to call it from looking at the function signature.
It is the function:
who send the rpc message, I think it is even better to change it to, and then can also pass the
force_killThere 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.
In #291, I try to make massage not a global variable so it is able to carry more information. After that it will be straight forward to have
forceoption for the kill method.Discuss with @khsrali offline, he prefer go with the current change and I'll open an amend PR after #291.
@khsrali Just add unit test for this?
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.
What is the point of merging this if we agree it is not a good design and we plan on changing it straight after anyway?
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.
I think after #291 it is straightforward to pass force option to the
kill_process. I leave a portforce=Falsefor this purpose. @khsrali can you give it a look?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.
Well, it would deliver faster to users.
Uh oh!
There was an error while loading. Please reload this page.
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.
I may not agree with this.
Finding workarounds should not be the solution to get features fast deliver to users. The fast deliver is based on developers can quickly reach the agreement. In the case of this PR, the agreement is I'll do refactoring before or an amend fix after, on the message encapsulating part.