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

Fix/enhancing delete 486 #880

Merged
merged 9 commits into from
Dec 28, 2022
Merged

Fix/enhancing delete 486 #880

merged 9 commits into from
Dec 28, 2022

Conversation

coderabbit214
Copy link
Contributor

enhance object delete
add -f,-a flag to delete object from a yaml file or delete all object

jiangshaohua and others added 3 commits October 30, 2022 16:44
add -f,-a flag to delete object from a yaml file or delete all object
@codecov-commenter
Copy link

codecov-commenter commented Dec 22, 2022

Codecov Report

Base: 76.03% // Head: 75.92% // Decreases project coverage by -0.10% ⚠️

Coverage data is based on head (5e3b4be) compared to base (be4d396).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #880      +/-   ##
==========================================
- Coverage   76.03%   75.92%   -0.11%     
==========================================
  Files         110      114       +4     
  Lines       12741    13387     +646     
==========================================
+ Hits         9687    10164     +477     
- Misses       2507     2647     +140     
- Partials      547      576      +29     
Impacted Files Coverage Δ
pkg/object/mqttproxy/topic.go 47.05% <0.00%> (-52.95%) ⬇️
pkg/object/mqttproxy/session.go 67.70% <0.00%> (-14.51%) ⬇️
pkg/object/mqttproxy/client.go 77.45% <0.00%> (-5.06%) ⬇️
pkg/filters/headerlookup/headerlookup.go 84.61% <0.00%> (-1.40%) ⬇️
pkg/object/autocertmanager/autocertmanager.go 93.46% <0.00%> (-0.82%) ⬇️
pkg/object/mqttproxy/broker.go 74.37% <0.00%> (-0.43%) ⬇️
pkg/object/mqttproxy/spec.go 100.00% <0.00%> (ø)
pkg/object/mqttproxy/mqttproxy.go 46.83% <0.00%> (ø)
pkg/object/mqttproxy/nocachetopicmgr.go 92.85% <0.00%> (ø)
pkg/object/mqttproxy/topicmgr.go 100.00% <0.00%> (ø)
... and 7 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.


Run: func(cmd *cobra.Command, args []string) {
handleRequest(http.MethodDelete, makeURL(objectURL, args[0]), nil, cmd)
Copy link
Collaborator

Choose a reason for hiding this comment

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

args[0] could be invalid after this change.
and delete is different from create or update as it only requires a name instead of full YAML spec, so it is much more easier for the user to make a fault operation. and we should do more checks for the arguments, like what to do if there're both --all and spec file in the command line?

pkg/api/object.go Show resolved Hide resolved
coderabbit214 and others added 3 commits December 23, 2022 09:21
don't use the short version to help users avoid faulty operation.

Co-authored-by: Bomin Zhang <[email protected]>
add parameter check
update delete all,avoid misusing curl
cmd/client/command/object.go Outdated Show resolved Hide resolved
cmd/client/command/object.go Outdated Show resolved Hide resolved
pkg/api/object.go Outdated Show resolved Hide resolved
coderabbit214 and others added 3 commits December 23, 2022 16:13
Co-authored-by: Bomin Zhang <[email protected]>
Co-authored-by: Bomin Zhang <[email protected]>
Co-authored-by: Bomin Zhang <[email protected]>
@suchen-sci suchen-sci merged commit d5edf28 into easegress-io:main Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants