meshery
meshery copied to clipboard
mesheryctl: Improve multi-word filter name handling in delete command
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
Areas affected and ensured works
-
mesheryctl filter deletecommand -
Error handling in the filter delete command
-
Input processing for filter names
-
Refactored a few lines.
-
[x] Yes, I signed my commits.
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.
Thanks! Please review - https://github.com/meshery/meshery/actions/runs/9898036816/job/27343961583?pr=11382#step:5:310
@Aviral0702 would you like to review and offer feedback?
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
@Aviral0702 would you like to review and offer feedback?
Sure Sir !
@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 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 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 Then there is no need to update this PR with any changes. Do you want me to draft this one?
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.
@Aviral0702, invalid issue?
@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.
Thansks the update. I am morethan happy to work on this issue. If any update is posted.
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.
This issue is being automatically closed due to inactivity. However, you may choose to reopen this issue.
