fix: correctly extract archive path from ActionResult-wrapped SAT results

extractArchivePath only stripped the "Archive written to " prefix when
the string ended in ".tar.gz", but SAT packs write bare run directories,
never actual tar.gz archives. Any task routed through an
ActionResult-wrapping pack function (e.g. RunNvidiaAcceptancePackWithOptions,
used by the DCGM L1-L4 diag task) passed the whole prefixed string into
ReadSATOverallStatus, which then failed to find summary.txt and silently
returned "", masking real job failures as task-level "done".

Strip the prefix directly instead of gating on a suffix that SAT run
dirs never have.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-07-06 13:33:43 +03:00
parent 9db651c75a
commit ee43a8e6ad
2 changed files with 46 additions and 7 deletions
+4 -7
View File
@@ -223,8 +223,8 @@ func satStatusToDBStatus(overall string) string {
}
}
// ExtractArchivePath extracts a bare .tar.gz path from a string that may be
// "Archive written to /path/foo.tar.gz" or already a bare path.
// ExtractArchivePath extracts a bare path from a string that may be
// "Archive written to /path/to/run-dir" or already a bare path.
func ExtractArchivePath(s string) string {
return extractArchivePath(s)
}
@@ -247,11 +247,8 @@ func ReadSATOverallStatus(archivePath string) string {
func extractArchivePath(s string) string {
s = strings.TrimSpace(s)
if strings.HasSuffix(s, ".tar.gz") {
parts := strings.Fields(s)
if len(parts) > 0 {
return parts[len(parts)-1]
}
if rest, ok := strings.CutPrefix(s, "Archive written to "); ok {
return strings.TrimSpace(rest)
}
return s
}