-
Notifications
You must be signed in to change notification settings - Fork 180
feat: Add evaluation status monitoring and run-target-live-gui target #5631
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -241,6 +241,32 @@ func handleGlobalConfigImpl(ctxArg interface{}, key string, | |||||||||||||
| log.Functionf("handleGlobalConfigImpl done for %s", key) | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| func handleEvalStatusCreate(ctxArg interface{}, key string, statusArg interface{}) { | ||||||||||||||
| log.Functionf("handleEvalStatusCreate called: key=%s, type=%T", key, statusArg) | ||||||||||||||
| handleEvalStatusUpdate(ctxArg, key, statusArg) | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| func handleEvalStatusModify(ctxArg interface{}, key string, statusArg interface{}, oldStatusArg interface{}) { | ||||||||||||||
| log.Functionf("handleEvalStatusModify called: key=%s, type=%T", key, statusArg) | ||||||||||||||
| oldStatus := oldStatusArg.(types.EvalStatus) | ||||||||||||||
| newStatus := statusArg.(types.EvalStatus) | ||||||||||||||
| log.Functionf("handleEvalStatusModify: old phase=%s -> new phase=%s, allowOnboard %t -> %t", | ||||||||||||||
| oldStatus.Phase, newStatus.Phase, oldStatus.AllowOnboard, newStatus.AllowOnboard) | ||||||||||||||
| handleEvalStatusUpdate(ctxArg, key, statusArg) | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| func handleEvalStatusDelete(ctxArg interface{}, key string, statusArg interface{}) { | ||||||||||||||
| log.Functionf("handleEvalStatusDelete called: key=%s", key) | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| func handleEvalStatusUpdate(ctxArg interface{}, key string, statusArg interface{}) { | ||||||||||||||
| ctx := ctxArg.(*monitor) | ||||||||||||||
| status := statusArg.(types.EvalStatus) | ||||||||||||||
| log.Functionf("handleEvalStatusUpdate: EvalStatus details - platform=%t, slot=%s, phase=%s, allowOnboard=%t, inventory=%t", | ||||||||||||||
| status.IsEvaluationPlatform, status.CurrentSlot, status.Phase, status.AllowOnboard, status.InventoryCollected) | ||||||||||||||
| ctx.IPCServer.sendIpcMessage("EvalStatus", status) | ||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jsfakian , quick question, I don't see any updates on eve-monitor... does the current version have support for these messages? |
||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| func (ctx *monitor) subscribe(ps *pubsub.PubSub) error { | ||||||||||||||
| var err error | ||||||||||||||
|
|
||||||||||||||
|
|
@@ -441,6 +467,26 @@ func (ctx *monitor) subscribe(ps *pubsub.PubSub) error { | |||||||||||||
| ErrorTime: errorTime, | ||||||||||||||
| }) | ||||||||||||||
|
||||||||||||||
| }) | |
| }) | |
| if err != nil { | |
| log.Error("Cannot create subscription for GlobalConfig") | |
| return err | |
| } |
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.
@jsfakian , please, put Makefile changes into a dedicated commit.....