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

update store/event/event.go #526

Merged
merged 16 commits into from
May 22, 2020
Merged

update store/event/event.go #526

merged 16 commits into from
May 22, 2020

Conversation

fewdan
Copy link
Member

@fewdan fewdan commented May 19, 2020

What problem does this PR solve?

In order to implement event-related interfaces, store/event/event.go was completed.

What is changed and how does it work?

update store/event/event.go

Check List

Tests

  • No code

Code changes

  • Has Go code change

Side effects

  • NO

Related changes

  • NO

Does this PR introduce a user-facing change?:

NONE

@codecov-commenter
Copy link

codecov-commenter commented May 19, 2020

Codecov Report

Merging #526 into master will decrease coverage by 5.35%.
The diff coverage is 36.49%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #526      +/-   ##
==========================================
- Coverage   61.39%   56.03%   -5.36%     
==========================================
  Files          64       66       +2     
  Lines        4069     4256     +187     
==========================================
- Hits         2498     2385     -113     
- Misses       1383     1700     +317     
+ Partials      188      171      -17     
Impacted Files Coverage Δ
api/v1alpha1/kernelchaos_types.go 13.84% <0.00%> (+9.40%) ⬆️
api/v1alpha1/timechaos_types.go 17.14% <0.00%> (+7.14%) ⬆️
controllers/kernelchaos_controller.go 0.00% <0.00%> (ø)
controllers/podchaos/types.go 65.95% <0.00%> (ø)
controllers/stresschaos_controller.go 0.00% <0.00%> (ø)
pkg/chaosdaemon/netem_linux.go 26.66% <0.00%> (ø)
pkg/chaosdaemon/netlink_linux.go 0.00% <ø> (ø)
pkg/chaosdaemon/stress_server_linux.go 0.00% <0.00%> (ø)
pkg/utils/chaosdaemon.go 51.21% <ø> (ø)
pkg/webhook/config/config.go 17.14% <0.00%> (-72.86%) ⬇️
... and 45 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf8d82f...2c97fa9. Read the comment docs.

Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

This looks good generally. Only few small nits 💪

@@ -47,11 +51,45 @@ func NewService(

// Register mounts our HTTP handler on the mux.
func Register(r *gin.RouterGroup, s *Service) {
endpoint := r.Group("/event")
endpoint := r.Group("/events")

// TODO: add more api handlers
endpoint.GET("/all", s.listEvents)
Copy link
Contributor

Choose a reason for hiding this comment

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

We can use "endpoint.GET("l", s.listEvents)" here if this makes sense to you

Copy link
Member Author

Choose a reason for hiding this comment

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

Why is it "l"?

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry a typo

Copy link
Contributor

Choose a reason for hiding this comment

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

Any update on this?

Copy link
Member Author

Choose a reason for hiding this comment

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

There is no modification here, I don't quite understand what you mean.

pkg/store/event/event.go Outdated Show resolved Hide resolved
pkg/store/event/event.go Outdated Show resolved Hide resolved
pkg/store/event/event.go Outdated Show resolved Hide resolved
pkg/store/event/event.go Outdated Show resolved Hide resolved
pkg/store/event/event.go Outdated Show resolved Hide resolved
pkg/store/event/event.go Outdated Show resolved Hide resolved
pkg/apiserver/event/event.go Outdated Show resolved Hide resolved
pkg/store/event/event.go Outdated Show resolved Hide resolved
@lgtm-com
Copy link

lgtm-com bot commented May 21, 2020

This pull request introduces 1 alert when merging 5331a28 into c762830 - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

namespace := c.Query("namespace")
eventList := make([]*core.Event, 0)

if name == "" && namespace == "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Did we need to define a funtion like CheckNameAndNamespace(It can be done in other PR)

Copy link
Contributor

@zhouqiang-cl zhouqiang-cl left a comment

Choose a reason for hiding this comment

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

rest LGTM

pkg/apiserver/event/event.go Outdated Show resolved Hide resolved
pkg/apiserver/event/event.go Outdated Show resolved Hide resolved
pkg/apiserver/event/event.go Outdated Show resolved Hide resolved
pkg/apiserver/event/event.go Outdated Show resolved Hide resolved
pkg/store/event/event.go Outdated Show resolved Hide resolved
pkg/store/event/event.go Outdated Show resolved Hide resolved
@lgtm-com
Copy link

lgtm-com bot commented May 22, 2020

This pull request introduces 1 alert when merging 44ed01f into 13ea19f - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

cwen0
cwen0 previously approved these changes May 22, 2020
Copy link
Member

@cwen0 cwen0 left a comment

Choose a reason for hiding this comment

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

LGTM

@lgtm-com
Copy link

lgtm-com bot commented May 22, 2020

This pull request introduces 1 alert when merging 44ed01f into 13ea19f - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

zhouqiang-cl
zhouqiang-cl previously approved these changes May 22, 2020
Copy link
Contributor

@zhouqiang-cl zhouqiang-cl left a comment

Choose a reason for hiding this comment

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

LGTM

@fewdan fewdan dismissed stale reviews from zhouqiang-cl and cwen0 via 6e90930 May 22, 2020 12:09
@lgtm-com
Copy link

lgtm-com bot commented May 22, 2020

This pull request introduces 1 alert when merging 6e90930 into ce3afb7 - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

cwen0
cwen0 previously approved these changes May 22, 2020
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

LGTM

pkg/apiserver/event/event.go Outdated Show resolved Hide resolved
@cwen0
Copy link
Member

cwen0 commented May 22, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented May 22, 2020

/run-all-tests

@yeya24
Copy link
Contributor

yeya24 commented May 22, 2020

Umm, I don't know why this is still not merged even if the E2E is passed. Let me merge this manually.

@yeya24 yeya24 merged commit 2046dfd into chaos-mesh:master May 22, 2020
@fewdan fewdan deleted the events branch May 22, 2020 17:45
@fewdan fewdan linked an issue May 25, 2020 that may be closed by this pull request
sjwsl pushed a commit to sjwsl/chaos-mesh that referenced this pull request May 6, 2021
* events/all

* update store/event

* update

* update StatusCode

* address comment

* address comment

* address comment

* address conflict

* conflict

* update events

* fix typo

* address comment

* update url

* address comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API] get the list of events
7 participants