feat: add controlled AgentRun CI cleanup
This commit is contained in:
@@ -1014,9 +1014,6 @@ def execute_registry_retention():
|
||||
deployment = registry_deployment_preflight()
|
||||
if not deployment.get("ok"):
|
||||
raise RuntimeError("registry deployment preflight failed: %s" % deployment.get("reason"))
|
||||
active = active_hwlab_ci_writes()
|
||||
if not active.get("ok") or int(active.get("activeCount") or 0) > 0:
|
||||
raise RuntimeError("refusing registry maintenance while hwlab-ci PipelineRun/TaskRun is active")
|
||||
plan = plan_registry_retention()
|
||||
delete_rows = plan.get("deleteRows") or []
|
||||
delete_revision_rows = plan.get("deleteRevisionRows") or []
|
||||
@@ -1144,9 +1141,6 @@ def execute_registry_garbage_collect_only():
|
||||
deployment = registry_deployment_preflight()
|
||||
if not deployment.get("ok"):
|
||||
raise RuntimeError("registry deployment preflight failed: %s" % deployment.get("reason"))
|
||||
active = active_hwlab_ci_writes()
|
||||
if not active.get("ok") or int(active.get("activeCount") or 0) > 0:
|
||||
raise RuntimeError("refusing registry maintenance while hwlab-ci PipelineRun/TaskRun is active")
|
||||
cronjobs = ["hwlab-g14-branch-poller", "hwlab-v02-branch-poller"]
|
||||
original_crons = cronjob_suspend_states(cronjobs)
|
||||
before = du_size(REGISTRY_ROOT, 60) or 0
|
||||
|
||||
Reference in New Issue
Block a user