Skip to content

Return errors instead of log.Fatalf in lifecycle/cli_adaptor.go - #12

Merged
jim-junior merged 1 commit into
urunc-dev:mainfrom
magic-peach:fix/10-lifecycle-cli-adaptor-no-fatal
Sep 18, 2026
Merged

jim-junior merged 1 commit into
urunc-dev:mainfrom
magic-peach:fix/10-lifecycle-cli-adaptor-no-fatal

Conversation

@magic-peach

Copy link
Copy Markdown
Contributor

Description

Part of #10 (a single failed trial currently kills the entire benchmark harness process via log.Fatalf). This PR covers just internal/runtime/lifecycle/cli_adaptor.go: replaces its 7 log.Fatalf calls with wrapped errors, since every affected method already returns (StageResult, error) -- no signature/caller changes needed.

Issues Resolved

Updates #10 (one of four small PRs against this issue, one per file -- not closing it alone)

Testing

go build, go vet, gofmt -l, go test ./... all clean.

log.Fatalf calls os.Exit(1) directly, which kills the whole harness
process on a single trial's command failure instead of letting the
orchestrator record the trial as failed and move on. Each CLI* helper
here already returns (StageResult, error) as part of its signature, so
no caller changes were needed: the fatal calls are replaced with
returning the underlying error wrapped with fmt.Errorf, matching the
error-wrapping style already used elsewhere in the codebase (e.g.
internal/runtime/storage/adapter.go's getOrPullImage).

log.Printf calls that were already non-fatal (e.g. best-effort stop/
cleanup logging) are left as-is.

Updates urunc-dev#10

Signed-off-by: Akanksha Trehun <akankshatrehun@gmail.com>
@jim-junior
jim-junior merged commit baec2c0 into urunc-dev:main Sep 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants