Closed thschue closed 1 year ago
FYI: @grabnerandi
@thschue can I work on it?
Hello @thschue I want to work on this issue, can you tell me what should I look for to solve this?
Sorry for the late reply, and thanks for the offer to work on this. @nitinmewar: do you still want to work on this?
@thschue yes , I want to work on this. can you please provide little bit more details in order to fix this issue?
hey @nitinmewar , I think you can modify the configuration of keptn quality gate service to include the details in JSON format. You just need to modify the evaluation-done event to include the details : )
hey @nitinmewar , I think you can modify the configuration of keptn quality gate service to include the details in JSON format. You just need to modify the evaluation-done event to include the details : )
Hey @prakrit55! In the lifecycle-toolkit this looks a bit different, there are no events atm :-)
@thschue yes , I want to work on this. can you please provide little bit more details in order to fix this issue?
Yes, We are running tasks in the KeptnTask Controller, and in this part we're issuing failed events in the OTel span: https://github.com/keptn/lifecycle-toolkit/blob/6a7b0c1328027c4111f8f7aba0641409f62a63ad/operator/controllers/common/evaluationhandler.go#L134.
The task would be to write more detailed results there.
@thschue
this is what we need to change, right? ->
for k, v := range evaluation.Status.EvaluationStatus {
if v.Status == apicommon.StateFailed {
msg := fmt.Sprintf("evaluation of '%s' failed with value: '%s' and reason: '%s'", k, v.Value, v.Message)
spanTrace.AddEvent(msg, trace.WithTimestamp(time.Now().UTC()))
k8sEventMessage = fmt.Sprintf("%s\n%s", k8sEventMessage, msg)
}
}
right now it only writes failed evaluations to trace. Do we want to write for both pass and fail, so it would look like this, right?
for k, v := range evaluation.Status.EvaluationStatus {
var result string
switch v.Status{
case apicommon.StateSucceeded:
result = "Pass"
case apicommon.StateFailed:
result = "Fail"
}
msg := fmt.Sprintf("evaluating '%s': result='%s', value='%s', threshold='%s', message='%s'", k, result, v.Value, v.Threshold, v.Message)
spanTrace.AddEvent(msg, trace.WithTimestamp(time.Now().UTC()))
k8sEventMessage = fmt.Sprintf("%s\n%s", k8sEventMessage, msg)
}
And what is threshold?
am I going in a completely different direction here?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
this issue is outdated, closing it
At the moment, Evaluation Results are not written to the Trace (not sure if this wasn't already implemented). It would make sense to have this available in a format like:
Evaluation Result: <pass|fail>, Value: <Value>, Threshold: <Treshold>