Skip to content

Commit

Permalink
chore: probes are lost when streaming actions are not specified (apec…
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-inf authored Nov 25, 2024
1 parent 108f7fc commit 62f1be0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/kbagent/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func getActionProbeNStreamingEnvValues(envVars map[string]string) (string, strin
}
ds, ok := envVars[streamingEnvName]
if !ok {
return da, "", ""
return da, dp, ""
}
return da, dp, ds
}
Expand All @@ -192,8 +192,10 @@ func deserializeActionNProbe(da, dp string) ([]proto.Action, []proto.Probe, erro
return nil, nil, err
}
probes := make([]proto.Probe, 0)
if err := json.Unmarshal([]byte(dp), &probes); err != nil {
return nil, nil, err
if len(dp) > 0 {
if err := json.Unmarshal([]byte(dp), &probes); err != nil {
return nil, nil, err
}
}
return actions, probes, nil
}
Expand Down

0 comments on commit 62f1be0

Please sign in to comment.