meshery icon indicating copy to clipboard operation
meshery copied to clipboard

mesheryctl: Improve multi-word filter name handling in delete command

Open MunishMummadi opened this issue 1 year ago • 14 comments

Description

This PR improves the handling of filter names in the mesheryctl filter delete command, specifically addressing the issue with multi-word filter names. It resolves issue #11370 by implementing proper support for quoted multi-word arguments and providing clear error messages for incorrect usage.

Changes

  • Added support for quoted multi-word filter names
  • Implemented error handling for unquoted multi-word arguments
  • Added functionality to trim surrounding quotes from input
  • Updated error messages to guide users on correct usage Screenshot 2024-07-11 at 4 17 37 PM

Areas affected and ensured works

  • mesheryctl filter delete command

  • Error handling in the filter delete command

  • Input processing for filter names

  • Refactored a few lines.

  • [x] Yes, I signed my commits.

MunishMummadi avatar Jul 11 '24 20:07 MunishMummadi

Yay, your first pull request! :thumbsup: A contributor will be by to give feedback soon. In the meantime, you can find updates in the #github-notifications channel in the community Slack. Be sure to double-check that you have signed your commits. Here are instructions for making signing an implicit activity while performing a commit.

welcome[bot] avatar Jul 11 '24 20:07 welcome[bot]

Thanks! Please review - https://github.com/meshery/meshery/actions/runs/9898036816/job/27343961583?pr=11382#step:5:310

leecalcote avatar Jul 11 '24 21:07 leecalcote

@Aviral0702 would you like to review and offer feedback?

leecalcote avatar Jul 11 '24 21:07 leecalcote

Is it expected to update the tests. If you think my code fits your expectation. I am more than happy to do some changes to the test located at /Users/munish/Developer/meshery/mesheryctl/internal/cli/root/filter

MunishMummadi avatar Jul 11 '24 23:07 MunishMummadi

@Aviral0702 would you like to review and offer feedback?

Sure Sir !

Aviral0702 avatar Jul 12 '24 01:07 Aviral0702

@leecalcote After testing the commands I can see that tests are not working as the output golden files are not updated as per the expected response also there is a issue raised for the delete command which is a server issue due to which there are no response to the command from the server.

Aviral0702 avatar Jul 12 '24 16:07 Aviral0702

@Aviral0702 I get it. But I am new to this repo. Is there any way I can help? I can add a few golden files(with respective error msgs) such as

delete.unquoted.error.golden
delete.empty.error.golden
delete.mixed.error.golden

in testdata & a few more in fixtures.

MunishMummadi avatar Jul 12 '24 20:07 MunishMummadi

@MunishMummadi We are deleting these test files and working on adding different type of testing strategy. Currently no need to update the testdata and fixtures files.

Aviral0702 avatar Jul 14 '24 02:07 Aviral0702

@Aviral0702 Then there is no need to update this PR with any changes. Do you want me to draft this one?

MunishMummadi avatar Jul 14 '24 02:07 MunishMummadi

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 24 '24 09:08 stale[bot]

@Aviral0702, invalid issue?

ashparshp avatar Aug 27 '24 04:08 ashparshp

@Aviral0702, invalid issue?

No, It is a valid enhancement. The PR has been drafted. Need to work on the testing files and it will be good to go. I will request the changes here.

Aviral0702 avatar Aug 28 '24 16:08 Aviral0702

Thansks the update. I am morethan happy to work on this issue. If any update is posted.

MunishMummadi avatar Aug 28 '24 17:08 MunishMummadi

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 28 '24 22:10 stale[bot]

This issue is being automatically closed due to inactivity. However, you may choose to reopen this issue.

stale[bot] avatar Nov 09 '24 02:11 stale[bot]