Skip to content

ci: increase tidy-up retention to 30 days / 5 runs - #3962

Open
metux wants to merge 1 commit into
masterfrom
fix/ci-tidyup-retain-days
Open

metux wants to merge 1 commit into
masterfrom
fix/ci-tidyup-retain-days

Conversation

@metux

@metux metux commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

The global cleanup job in tidy-up-auto.yml was deleting PR build jobs because of two issues:

Issue 1: Aggressive retention settings

  • retain_days: 14 → 30 (keeps PR CI history for a month)
  • keep_minimum_runs: 2 → 5 (preserves more runs per workflow)

Issue 2: Purge script deletes fork PR runs immediately (root cause)
The gh-purge-deleted-branch-workflows.sh script only checked branch existence in the main repo (X11Libre/xserver). PRs from forks have their head_branch in the fork, not in the main repo — so the script didn't find the branch and deleted the runs overnight.

Fix: The script now fetches the pull_requests field from the workflow run API and skips deletion if any associated PR is still open. This preserves CI history for all open PRs (main repo + forks) while still cleaning up runs for closed/merged PRs and deleted branches.

The per-branch cleanup job (delete_old_workflow_runs_branches) remains disabled (if: false) — its hardcoded branch list is stale. The smarter per-branch retention logic in gh-purge-pipelines.sh (keeps failed runs + neighbors) could be enabled later as a follow-up.

@metux
metux force-pushed the fix/ci-tidyup-retain-days branch from 27be344 to f409d45 Compare October 14, 2026 11:22
The global cleanup job was deleting PR build jobs after 14 days and keeping
only 2 runs per workflow, which erased CI history for open PRs longer than
two weeks. Increase to 30 days and 5 runs to preserve debuggability.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
@metux
metux force-pushed the fix/ci-tidyup-retain-days branch from 0d002c7 to 2220c90 Compare October 15, 2026 09:45
@metux
metux force-pushed the master branch 5 times, most recently from eae2c21 to 483a172 Compare October 30, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant