open-webui / open-webui/terminals
`TERMINALS_IDLE_TIMEOUT_MINUTES=0` is documented as "disabled" but is a 30-minute reap on the kubernetes-operator backend
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 108
- Forks
- 23
- Avg merge
- 12h 8m
- Merged PRs (30d)
- 1
Description
Version: terminals / terminals-operator 0.2.4 (unchanged on main) · backend kubernetes-operator · installed via the terminals Helm chart 0.7.0
What happens
terminals/config.py:
# Idle reaper — tear down terminals after N minutes of inactivity (0 = disabled)
idle_timeout_minutes: int = 0
but backends/kubernetes_operator.py only forwards the value when it is positive:
if idle_timeout and idle_timeout > 0:
cr_spec["idleTimeoutMinutes"] = idle_timeout
so a CR created with the setting at 0 has no idleTimeoutMinutes, and the operator fills the gap with 30 — twice over: manifests/terminal-crd.yaml declares default: 30 / minimum: 1, and operator/handler.py does spec.get("idleTimeoutMinutes", 30). Every idle-check log line reads (timeout=30). The same applies to a policy with idle_timeout_minutes: 0.
Net effect: "disabled" is the one value that cannot be expressed on this backend, and because the default terminal has no PVC, the user's files are deleted 30 minutes after their last request. We ran with 0 for three weeks believing pods were never reaped; every model-produced file was silently vanishing.
Expected
Either of:
0means disabled all the way down — orchestrator passesidleTimeoutMinutes: 0, CRDminimum: 0, operator'sidle_checkreturns early when the value is0; or- the setting/policy field rejects
0on this backend with a clear error and the config comment says so.
(1) matches the documented contract.
Workaround
Any large positive value (we use 1440 with a PVC-backed policy).
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by tracing the timeout from terminals/config.py through backends/kubernetes_operator.py, manifests/terminal-crd.yaml, and operator/handler.py. Check the relevant backend and operator tests, then verify that a configured value of 0 remains disabled for both direct settings and policies, without triggering the 30-minute default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes, python
- Domain
- backend, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100