Separate events subsystem#7370
Separate events subsystem#7370LK4D4 wants to merge 1 commit intomoby:masterfrom LK4D4:separate_events_#7342
Conversation
|
ping @shykes @vieux @unclejack @crosbymichael @tiborvass @erikh |
|
@LK4D4 Not sure if you can do this for this one; it might be for next time: when you're doing big changes like these, it's easier to review if it's broken down into multiple commits (IMHO). |
|
@tiborvass Yeah, sorry for this :) when I realized how big it is it was too late. |
events/events.go
Outdated
There was a problem hiding this comment.
maybe make this more dynamic?
There was a problem hiding this comment.
I'm not sure that I follow :) you mean something like table name -> method?
|
LGTM, but I feel like we should either always be using the |
|
Actually now event logging always does through |
|
my mistake, carry on :) |
|
@LK4D4 You can still break it up. Just |
|
@cyphar Yeah, I know, but it will be pretty hard to make atomic commits, each not breaking tests. This is actually not very complicated change, but requires changes in many places at once. |
|
Fair 'nuff. |
daemon/container.go
Outdated
There was a problem hiding this comment.
I'm wondering whether we want to leave the error handling to the client, or if we want to log to the daemon in case the log_event job failed. Since we never check for the error of LogEvent, I think we could internalize it here. WDYT?
|
@tiborvass Thank you for review, I've added log message on |
|
@tiborvass PTAL |
|
LGTM Ping @unclejack @crosbymichael |
|
I'm not getting any other events except "die". I'm not seeing start, stop, create, .... |
|
@crosbymichael sorry, functionality was lost in some rebase. Fixed, PTAL. |
* Events subsystem merged from `server/events.go` and `utils/jsonmessagepublisher.go` and moved to `events/events.go` * Only public interface for this subsystem is engine jobs * There is two new engine jobs - `log_event` and `subscribers_count` * There is auxiliary function `container.LogEvent` for logging events for containers Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
|
LGTM |
|
@shykes @tiborvass do you want this merged before or after your stuff? |
|
@crosbymichael If we can, I'd rather merge this after @shykes's stuff is merged. |
|
I would prefer after. I will try rebasing this on top of mine. Should be easier than the other way around. |
|
Also whoever carries this, please rename the job from |
|
Doesn't |
|
I don't see the distinction between message and event here. As far as I know we only plan on logging 1 type of object - call them event or message or whatever. So I don't see the need to qualify what we're logging. There's already a |
|
ok |
|
I'll take it. @tiborvass I'm tracking your #7427 |
|
#assignee=shykes |
|
I'm carrying it at https://github.com/shykes/docker/tree/7370-on-7427 |
|
Closing in favor of #7452 |
server/events.goandutils/jsonmessagepublisher.goand moved toevents/events.golog_eventandsubscribers_countcontainer.LogEventfor logging events forcontainers