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 action dispatching that was using ActionType instead of InputType as before #973

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (h *AppAction) Handle(ctx context.Context, a fleetapi.Action, acker acker.A
h.log.Debugf("handlerAppAction: action '%v' started with timeout: %v", action.ActionType, timeout)
ctx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()
res, err = h.coord.PerformAction(ctx, unit, action.ActionType, params)
res, err = h.coord.PerformAction(ctx, unit, action.InputType, params)
}
end := time.Now().UTC()

Expand Down Expand Up @@ -111,11 +111,12 @@ var (
)

// appendActionResponse appends the action response property with all the action response values excluding the ones specified in excludeActionResponseFields
// "action_response": {
// "endpoint": {
// "acked": true
// }
// }
//
// "action_response": {
// "endpoint": {
// "acked": true
// }
// }
func appendActionResponse(action *fleetapi.ActionApp, inputType string, res map[string]interface{}) {
if len(res) == 0 {
return
Expand Down