Per-job memory and CPU limits
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 40/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- backend, infrastructure
Research direction
Start with secondshift/jobs/limits.py and the RunLimitOverrides model, where the existing limits and their _CEILING caps are defined. Then follow how the execution plan is built and where the runner turns it into --memory, --memory-swap and --cpus. Done when the fallback order (job, workspace, server default) and the ceiling checks pass in tests, and a repository .secondshift.yaml cannot change these flags.
Written by the indexing model from the issue text.
Description
Problem
Every run gets the same memory and CPU (RUNNER_MEMORY, RUNNER_CPUS). A heavy job can't get more, and a light job can't be held to less.
Proposal
- Add
memory_mbandcpu_millistoRunLimitOverrides. Workspaces and jobs inherit them like the other limits. - Fallback order: job, then workspace, then server default. The server default stays
RUNNER_MEMORYandRUNNER_CPUS. - Add server maximums,
RUNNER_MEMORY_CEILINGandRUNNER_CPUS_CEILING, following the_CEILINGnaming of the other limits, that cap every value, assecondshift/jobs/limits.pydoes for the other limits. - Resolve the values into the execution plan. The runner uses them for
--memory,--memory-swapand--cpus. - Editing follows
Action.CHANGE_RUN_LIMITS, the same as other run limits. - Show the effective values on the job's limits screen.
Out of scope
Disk, process count, GPU.
Acceptance criteria
- A job value overrides the workspace value, which overrides the server default.
- Values above the server maximum are rejected when saving and capped at run time.
- The runner command gets the resolved values.
-
.secondshift.yamlcannot set these values. - Tests show repository input cannot change memory or CPU flags.
🤖 Generated with Claude Code
- Dominant language
- Python
- Stars
- 1
- Forks
- 1
- Avg merge
- 1h 9m
- Merged PRs (30d)
- 322
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from piotrekno1/second-shift
-
code-review secondshift
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
piotrekno1/second-shift#419 ·
Maintainers usually reply within 1 day
-
area: deployment
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
piotrekno1/second-shift#310 ·
Maintainers usually reply within 1 day
-
code-review secondshift
Difficulty 4/5 3-5 days Newbie friendliness 46/100
piotrekno1/second-shift#421 ·
Maintainers usually reply within 1 day
-
code-review secondshift
Difficulty 4/5 3-5 days Newbie friendliness 56/100
piotrekno1/second-shift#420 ·
Maintainers usually reply within 1 day
-
Fix failed-delivery retries on PostgreSQLPossibly taken @piotrekno1 claimed this today. Opencode-review fix-approved secondshift
Difficulty 3/5 1-2 days Newbie friendliness 35/100
piotrekno1/second-shift#418 ·
Maintainers usually reply within 1 day
All issues in piotrekno1/second-shift
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
area:cli area:security enhancement priority:medium size:small
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
RonaldHensbergen/composable-data-stack#1338 ·
Maintainers usually reply within 1 day
-
area:stdlib effort:S impact:med platform:linux type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
automated endpoint-dead needs-curation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
almanac-data/climate-almanac#139 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
UKGovernmentBEIS/inspect_ai#6695 · 1 comment ·
Maintainers usually reply within 1 day