The GitHub Actions job "Required Checks" on texera.git/fix/idle-kubernetes-cus 
has succeeded.
Run started by GitHub user yrenat (triggered by yrenat).

Head commit for run:
be910af6b551bc128ca951f72723a5b27ad5a543 / zaoduyuan <[email protected]>
fix(kubernetes): terminate idle computing units

Adds backend-side cleanup for idle Kubernetes computing units, following
the conclusion of discussion #6264.

A scheduled task in the computing unit managing service periodically scans
active Kubernetes computing units and terminates those idle longer than a
configurable timeout:

- new `computing-unit-idle-timeout-minutes` and
  `computing-unit-idle-check-interval-minutes` settings, both overridable
  by environment variable
- one grouped query per sweep answers "is any execution still active",
  "when did one last report progress" and "when did one last start" for
  every unit at once
- pod deletion happens outside the scan transaction and each unit's DB
  update runs in its own transaction, so one failure does not undo the batch
- a non-positive check interval is logged and skipped rather than aborting
  service startup
- `termination_reason` records whether a unit was terminated by the user or
  garbage collected

`workflow_executions.cuid` gets its own index: Postgres indexes only the
referenced side of a foreign key, so every per-computing-unit lookup on that
table was a sequential scan.

Closes #5362

Co-Authored-By: Claude Opus 5 <[email protected]>

Report URL: https://github.com/apache/texera/actions/runs/35690910645

With regards,
GitHub Actions via GitBox

Reply via email to