Skip to content

Return errors instead of log.Fatal in storage/adapter.go - #15

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

jim-junior merged 1 commit into
urunc-dev:mainfrom
magic-peach:fix/10-storage-adapter-no-fatal

Conversation

@magic-peach

Copy link
Copy Markdown
Contributor

Description

Part of #10. Covers internal/runtime/storage/adapter.go: replaces its 6 log.Fatal calls (in Prepare/CreateTask/StartTask/DeleteTask) with wrapped errors -- same reasoning as the other three PRs in this series.

Issues Resolved

Updates #10 (last of four small PRs against this issue, one per file)

Testing

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

log.Fatal calls os.Exit(1) directly, which kills the whole harness
process on a single trial's containerd error instead of letting the
orchestrator record the trial as failed and move on to the next one.

Every log.Fatal call here lives inside Prepare, CreateTask, StartTask,
or DeleteTask, which already return (harnessruntime.StageResult,
error) to satisfy the Adapter interface, so no caller changes were
needed: each fatal call is replaced with returning the underlying
error wrapped with fmt.Errorf, matching the error-wrapping style
already used elsewhere in this file (getOrPullImage).

Updates urunc-dev#10

Signed-off-by: Akanksha Trehun <akankshatrehun@gmail.com>
@jim-junior

Copy link
Copy Markdown
Collaborator

@magic-peach incase you are to open other PRs, please commit following the [urunc commit message style guide] https://urunc.io/developer-guide/contribute/#git-commit-messages

@jim-junior
jim-junior merged commit ac4349a 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