diff --git a/api/agent/pure_runner.go b/api/agent/pure_runner.go index e49caa06c..00973eeee 100644 --- a/api/agent/pure_runner.go +++ b/api/agent/pure_runner.go @@ -5,6 +5,7 @@ import ( "context" "crypto/tls" "crypto/x509" + "encoding/hex" "encoding/json" "errors" "fmt" @@ -537,7 +538,12 @@ func (pr *pureRunner) handleTryCall(tc *runner.TryCall, state *callHandle) error state.c = agent_call.(*call) if tc.SlotHashId != "" { - state.c.slotHashId = tc.SlotHashId + hashId, err := hex.DecodeString(tc.SlotHashId) + if err != nil { + state.enqueueCallResponse(err) + return err + } + state.c.slotHashId = string(hashId[:]) } state.allocatedTime = strfmt.DateTime(time.Now()) pr.spawnSubmit(state) diff --git a/api/agent/runner_client.go b/api/agent/runner_client.go index 7ac67eae8..1b8c56008 100644 --- a/api/agent/runner_client.go +++ b/api/agent/runner_client.go @@ -2,6 +2,7 @@ package agent import ( "context" + "encoding/hex" "encoding/json" "errors" "io" @@ -126,7 +127,7 @@ func (r *gRPCRunner) TryExec(ctx context.Context, call pool.RunnerCall) (bool, e // send explicit NACK err = runnerConnection.Send(&pb.ClientMsg{Body: &pb.ClientMsg_Try{Try: &pb.TryCall{ ModelsCallJson: string(modelJSON), - SlotHashId: call.SlotHashId(), + SlotHashId: hex.EncodeToString([]byte(call.SlotHashId())), }}}) if err != nil { logrus.WithError(err).Error("Failed to send message to runner node")