1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-30 19:22:09 +00:00
forgejo-runner/internal/app/run
Earl Warren e1e7d0e85a
fix: remove LXC working directory when it completes (#1003)
The working directory was not cleaned up upon completion of a LXC job because rc.stopJobContainer() -> rc.cleanUpJobContainer() -> rc.JobContainer.Remove() was never called for LXC containers.

- stopContainer() and closeContainer() must not call
  rc.stopHostEnvironment(ctx) for LXC containers because
  - it will needlessly be called twice
  - it intercepts the call to
    - rc.stopJobContainer()
    - rc.JobContainer.Close()
- rc.stopHostEnvironment(ctx) must be called in rc.cleanUpJobContainer which is indirectly called by rc.stopJobContainer()
- since rc.JobContainer.Close() is a noop, not calling it for LXC containers had no consequence

Resolves forgejo/runner#442

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1003): <!--number 1003 --><!--line 0 --><!--description Zml4OiByZW1vdmUgTFhDIHdvcmtpbmcgZGlyZWN0b3J5IHdoZW4gaXQgY29tcGxldGVz-->fix: remove LXC working directory when it completes<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1003
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-09-16 19:42:04 +00:00
..
mocks test: add mocks for RunnerInterface & Poller 2025-09-07 13:52:47 -06:00
logging.go Cherry-pick gitea act_runner #543 2024-11-03 13:57:34 +00:00
runner.go fix: send job outputs & job result to Forgejo in sync with each other (#995) 2025-09-14 20:02:43 +00:00
runner_test.go fix: remove LXC working directory when it completes (#1003) 2025-09-16 19:42:04 +00:00
workflow.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
workflow_test.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00