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

feat(rust): delete relays interactive #6735

Closed

Conversation

PanGan21
Copy link
Contributor

Current behavior

Errors out when the user doesn't specify a relay name.

Proposed changes

Closes #6464

  • relay_name argument becomes optional
  • If the user provides a relay_name then uses the provided relay_name
  • If the user doesn't provide a relay_name and the terminal is interactive, and the user didn't pass any of --no-output or --quiet flags then the terminal shows all available relays and allows the user select one or more from a list
  • Then for all the selected relays - one for old case - multiple or one for new case - check, confirm and delete

Checks

  • All commits in this Pull Request are signed and Verified by Github.
  • All commits in this Pull Request follow the Ockam commit message convention.
  • There are no Merge commits in this Pull Request. Ockam repo maintains a linear commit history. We merge Pull Requests by rebasing them onto the develop branch. Rebasing to the latest develop branch and force pushing to your Pull Request branch is okay.
  • I have read and accept the Ockam Community Code of Conduct.
  • I have read and accepted the Ockam Contributor License Agreement by adding my Git/Github details in a row at the end of the CONTRIBUTORS.csv file in a separate pull request to the build-trust/ockam repository. The easiest way to do this is to edit the CONTRIBUTORS.csv file in the github web UI and create a separate Pull Request, this will mark the commit as verified.

@PanGan21 PanGan21 requested a review from a team as a code owner October 23, 2023 17:58
@mrinalwadhwa
Copy link
Member

@PanGan21 Thank you for spending time on this, before we can merge please

The easiest way to do this is to edit the CONTRIBUTORS.csv file in the github web UI and create a PR, this will mark the commit as verified.

@PanGan21
Copy link
Contributor Author

@PanGan21 Thank you for spending time on this, before we can merge please

The easiest way to do this is to edit the CONTRIBUTORS.csv file in the github web UI and create a PR, this will mark the commit as verified.

Hi @mrinalwadhwa ! Thanks for the reminder. Is it required to be done in a separate pr or I can just push the new CONTRIBUTORS.csv in this pr?

@mrinalwadhwa
Copy link
Member

@PanGan21 in a separate PR please

@PanGan21
Copy link
Contributor Author

@PanGan21 in a separate PR please

Done in this pr #6744

@PanGan21 PanGan21 force-pushed the delete-relays-interactive branch 2 times, most recently from 9a1c2eb to 3197cc1 Compare October 24, 2023 14:58
@mrinalwadhwa mrinalwadhwa added the hacktoberfest Apply to issues you want contributors to help with label Oct 25, 2023
@PanGan21
Copy link
Contributor Author

Hi @mrinalwadhwa would it be possible to review this pr in October?

Copy link
Member

@adrianbenavides adrianbenavides left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @PanGan21 thanks for the PR! We are refactoring several commands to add the tui experience. You should use the node delete logic as a reference and keep the code as similar to that as possible.

Here is the code:

fn run_impl(opts: CommandGlobalOpts, cmd: DeleteCommand) -> miette::Result<()> {

@mrinalwadhwa
Copy link
Member

@PanGan21 while we still have to review this change. I'm adding the HACKTOBERFEST-ACCEPTED label so the contribution is counted by hacktoberfest bots before the end of October. Thank you for taking time to contribute 🎉

Please not @adrianbenavides's comment above.

@mrinalwadhwa mrinalwadhwa added the HACKTOBERFEST-ACCEPTED To be used when a PR is ready to merge or after it's merged label Oct 28, 2023
@PanGan21 PanGan21 force-pushed the delete-relays-interactive branch 4 times, most recently from 8a3ef2c to f386b51 Compare November 1, 2023 14:24
@PanGan21 PanGan21 force-pushed the delete-relays-interactive branch from a3d92db to 0edea44 Compare November 1, 2023 15:30
@PanGan21
Copy link
Contributor Author

PanGan21 commented Nov 1, 2023

Hey @PanGan21 thanks for the PR! We are refactoring several commands to add the tui experience. You should use the node delete logic as a reference and keep the code as similar to that as possible.

Here is the code:

fn run_impl(opts: CommandGlobalOpts, cmd: DeleteCommand) -> miette::Result<()> {

Hi! I did some refactoring, let me know what you think

@adrianbenavides
Copy link
Member

@PanGan21 Your PR is going to be merged as part of #6889. You'll appear as co-author of the PR's commit 👍 Thank you so much for your help with this one 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Apply to issues you want contributors to help with HACKTOBERFEST-ACCEPTED To be used when a PR is ready to merge or after it's merged
Projects
None yet
3 participants