fix: Do not fail on nil error #87

Merged
earl-warren merged 1 commit from vpotyarkin/act:fix/nil-error into main 2024-12-28 08:02:23 +00:00
Contributor

Commit 92ddcdae09 has introduced a regression due to which copyDir() would fail after closing the archive successfully. We should not do that.

I've encountered this bug in Forgejo Runner, so I'm sending the PR here. Feel free to forward upstream.

Troubleshooting this bug has been made difficult by an unhelpful <nil> message in logs:

Stripping prefix:/var/lib/forgejo_runner/actions-checkout@v3/ src:/var/lib/forgejo_runner/actions-checkout@v3/
<nil>
  ❌  Failure - Main actions/checkout@v3

Would you accept another PR where I'd change all bare log.Error(err) calls to log.Errorf("helpful context message: %v", err)?

Commit 92ddcdae098873ad6d9c05748ce5b6c7be83b811 has introduced a regression due to which copyDir() would fail after closing the archive successfully. We should not do that. I've encountered this bug in Forgejo Runner, so I'm sending the PR here. Feel free to forward upstream. Troubleshooting this bug has been made difficult by an unhelpful `<nil>` message in logs: ``` Stripping prefix:/var/lib/forgejo_runner/actions-checkout@v3/ src:/var/lib/forgejo_runner/actions-checkout@v3/ <nil> ❌ Failure - Main actions/checkout@v3 ``` Would you accept another PR where I'd change all bare `log.Error(err)` calls to `log.Errorf("helpful context message: %v", err)`?
fix: Do not fail on nil error
All checks were successful
checks / unit (pull_request) Successful in 2m33s
checks / integration (pull_request) Successful in 42s
/ cascade (pull_request_target) Has been skipped
16ed4b72c7
Commit 92ddcdae09 has introduced a
regression due to which copyDir() would fail after closing the archive
successfully

Signed-off-by: Vitaliy Potyarkin <[email protected]>
viceice approved these changes 2024-12-27 19:56:55 +00:00
viceice left a comment
Owner

feel free to send improvements for logging in separate PRs

feel free to send improvements for logging in separate PRs
Contributor

cascading-pr updated at forgejo/runner#402

cascading-pr updated at https://code.forgejo.org/forgejo/runner/pulls/402
earl-warren deleted branch fix/nil-error 2024-12-28 08:02:23 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No milestone
No project
No assignees
3 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/act!87
No description provided.