-
-
Notifications
You must be signed in to change notification settings - Fork 557
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
delete node interactively #6480
delete node interactively #6480
Conversation
e832ca1
to
ecbd927
Compare
@nazmulidris I don't know how to make node deletion fail, so I haven't tested the failed scenario. If you have any advice, I could try it. Any advice is welcome! |
@adrianbenavides Any thoughts on 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.
@nazmulidris I don't know how to make node deletion fail, so I haven't tested the failed scenario. If you have any advice, I could try it.
The easiest way would be to manually delete the pid
file in the node's state directory before deleting it through the command.
Thanks for your review. I'll check. |
Hi @adrianbenavides, I fix all the problems in your feedback. Please help review again 🙏 I successfully triggered the failed condition by modifying the pid in the node's pid file. However, if I remove the PID file, the result will be succeeded, but the node process will remain alive. I have no idea how to trace the problem; maybe we should create an issue. |
Yeah, that's right, you had to modify it, not remove it. Removing the PID file is expected to have no effect when removing the node, my mistake! |
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've left some more comments. Looking pretty great so far!
1fd95c6
to
ec56143
Compare
@adrianbenavides, I appreciate your feedback. You saved me from the Option and iterator hell. I learned a lot. I fixed all of them; please help review them again. Many thanks! |
03d76e9
to
ae05a5a
Compare
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.
Looks fantastic and ready to merge! Thank you so much for this contribution @mickm3n, will get merged soon 🥳
ae05a5a
to
3936556
Compare
19a9ecf
to
c4901d4
Compare
c4901d4
to
66fd2b9
Compare
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.
Looks great to me! 🎉
For implementing #6450
Current behavior
When a user runs
ockam node delete
without any arguments, currently they are prompted to delete the default node. Here's a screenshot of this.Proposed changes
Instead of deleting the default node, change the behavior of this command so that it becomes interactive with the user. Note that this can only be allowed to happen if:
--no-output
or--quiet
flags have not been passed, and,When there one or more nodes could be deleted, after a user runs
ockam node delete
, the user will seeYES
Checks