From 9bba9753120f2849abd6760c26653a205f73174b Mon Sep 17 00:00:00 2001 From: Aleksandr Maus Date: Wed, 24 Aug 2022 10:05:59 -0400 Subject: [PATCH] Fix action dispatching that was using ActionType instead of InputType as before (#973) --- .../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