From f34251f956ce010c8a9f25ecd9e9df05b66572ea Mon Sep 17 00:00:00 2001 From: Aleksandr Maus Date: Mon, 22 Aug 2022 17:32:16 -0400 Subject: [PATCH] Fix action dispatching that was using ActionType instead of InputType as before --- .../actions/handlers/handler_action_application.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/internal/pkg/agent/application/actions/handlers/handler_action_application.go b/internal/pkg/agent/application/actions/handlers/handler_action_application.go index a5de2384bd1..d83d536dfc0 100644 --- a/internal/pkg/agent/application/actions/handlers/handler_action_application.go +++ b/internal/pkg/agent/application/actions/handlers/handler_action_application.go @@ -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() @@ -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