-
Notifications
You must be signed in to change notification settings - Fork 850
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
Support updating chaos experiments by API #570
Conversation
Signed-off-by: cwen0 <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #570 +/- ##
==========================================
- Coverage 55.98% 55.78% -0.21%
==========================================
Files 67 68 +1
Lines 4324 4383 +59
==========================================
+ Hits 2421 2445 +24
- Misses 1733 1768 +35
Partials 170 170
Continue to review full report at Codecov.
|
f, ok := updateFuncs[exp.Target.Kind] | ||
if !ok { | ||
c.Status(http.StatusBadRequest) | ||
_ = c.Error(utils.ErrInvalidRequest.New("Target kind is not available")) |
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.
How about changing to "_ = c.Error(utils.ErrInvalidRequest.New(exp.Target.Kind + " is not supported")) "?
} | ||
|
||
f, ok := createFuncs[exp.Target.Kind] | ||
if !ok { | ||
c.Status(http.StatusBadRequest) | ||
_ = c.Error(utils.ErrInvalidRequest.New("Target kind is not available")) |
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.
How about changing to "_ = c.Error(utils.ErrInvalidRequest.New(exp.Target.Kind + " is not supported")) "?
Signed-off-by: cwen0 <[email protected]>
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 very good.
Signed-off-by: cwen0 <[email protected]>
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.
LGTM
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.
LGTM
}, | ||
{ | ||
"Repository": "github.com/swaggo/swag", | ||
"Commit": "eebe67fc31c39a02a763bcaa815baab805112cf3" |
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.
Is it intended?
/merge |
/run-all-tests |
@cwen0 merge failed. |
* update chaos experiments by API Signed-off-by: cwen0 <[email protected]> * address comments Signed-off-by: cwen0 <[email protected]> Co-authored-by: pingcap-github-bot <[email protected]>
Signed-off-by: cwen0 [email protected]
What problem does this PR solve?
#520
What is changed and how does it work?
Support updating chaos experiments by API
Check List
Tests
Code changes
Side effects
Related changes
Does this PR introduce a user-facing change?: