runner/act
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
..
artifactcache chore: cache: handler: test coverage for fatal errors 2025-09-05 17:30:08 +02:00
cacheproxy chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
common chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
container fix: remove LXC working directory when it completes (#1003) 2025-09-16 19:42:04 +00:00
exprparser feat: the forgejo context is equivalent to the github context (#999) 2025-09-15 09:14:11 +00:00
filecollector chore: modernize code (#857) 2025-08-15 04:54:13 +00:00
jobparser chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
lookpath chore: use the same .golangci.yml as the runner & gofumpt over gofmt (#206) 2025-07-28 12:26:41 +00:00
model chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
runner fix: remove LXC working directory when it completes (#1003) 2025-09-16 19:42:04 +00:00
schema feat: the forgejo context is equivalent to the github context (#999) 2025-09-15 09:14:11 +00:00
workflowpattern chore: modernize code (#857) 2025-08-15 04:54:13 +00:00