feat: allow --memory in workflow container options #1079
Labels
No labels
FreeBSD
Kind/Breaking
Kind/Bug
Kind/Chore
Kind/DependencyUpdate
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Windows
linux-powerpc64le
linux-riscv64
linux-s390x
run-end-to-end-tests
run-forgejo-tests
run-multi-platform-tests
No milestone
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
forgejo/runner!1079
Loading…
Reference in a new issue
No description provided.
Delete branch "earl-warren/runner:wip-resources"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First hand experience to implement this feature can be found at https://codeberg.org/forgejo/forgejo/issues/9406. In a nutshell it is a service container in the CI that randomly uses massive amounts of memory (>50GB RSS) but normally less than 100MB.
See also the matching documentation pull request.
It is already possible to limit the memory used by all containers in the config file:
This limit can be further reduced (but not increased) by the same option in a job:
or a service container:
Refs https://docs.docker.com/engine/containers/resource_constraints/#limit-a-containers-access-to-memory
6b2eb36b32f4d3a2c3a4cascading-pr updated at actions/setup-forgejo#715
cascading-pr updated at https://codeberg.org/forgejo/forgejo/pulls/9613
writing test was more complex than the implementation 😁
Indeed, but not that much: most of the code is copy/pasted from other tests. There probably is enough to keep them DRY, adding helpers. But that will be fore another time.