refactor: harden diagnostics and consolidate runtime code
This commit is contained in:
@@ -454,10 +454,19 @@ func satFailureDetailFromKV(kv map[string]string) string {
|
||||
continue
|
||||
}
|
||||
job := strings.TrimSuffix(k, "_status")
|
||||
detail := strings.TrimSpace(kv[job+"_detail"])
|
||||
if rc, ok := kv[job+"_rc"]; ok && strings.TrimSpace(rc) != "" {
|
||||
failed = append(failed, fmt.Sprintf("%s=%s (rc=%s)", job, v, rc))
|
||||
entry := fmt.Sprintf("%s=%s (rc=%s)", job, v, rc)
|
||||
if detail != "" {
|
||||
entry += ": " + detail
|
||||
}
|
||||
failed = append(failed, entry)
|
||||
} else {
|
||||
failed = append(failed, fmt.Sprintf("%s=%s", job, v))
|
||||
entry := fmt.Sprintf("%s=%s", job, v)
|
||||
if detail != "" {
|
||||
entry += ": " + detail
|
||||
}
|
||||
failed = append(failed, entry)
|
||||
}
|
||||
}
|
||||
if len(failed) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user