[PR #2895] [MERGED] Nightly: the scheduled run deletes nightly/build-* branches older than 7 days #4676

Closed
opened 2026-11-03 05:07:07 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2895
Author: @ludovic111
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: feat/nightly-prune-builds


📝 Commits (1)

  • f6e96e4 Nightly: the scheduled run deletes nightly/build-* branches older than 7 days

📊 Changes

4 files changed (+95 additions, -0 deletions)

View changed files

📝 .github/workflows/nightly-build.yml (+8 -0)
📝 docs/release-flow.md (+3 -0)
📝 tests/test_nightly.py (+36 -0)
📝 tools/ci/nightly.py (+48 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Ludovic's decision (2026-10-27): delete nightly/build-* branches older than 7 days. Each reviewer-picked Nightly (#2859) pushes one, up to 6 a day.

  • tools/ci/nightly.py prune-builds --days 7 deletes, through the API, only branches named nightly/build-<date>-<n> whose date is more than 7 days old. It never deletes:
    • the newest build (compared by date, then by number, so -10 counts as newer than -9);
    • a build whose commit a published nightly or nightly-<date> release points to;
    • nightly-state, or any branch not named exactly like a build.
  • nightly-build.yml: a step in pick, on scheduled runs only, with main's code. It writes each deletion and a count to the run summary.
  • Tests: tests/test_nightly.py covers what goes and what stays at the 7-day edge, the newest build, published builds, look-alike names, and the workflow step being schedule-only.
  • Checked against origin, read-only: today it would delete nothing. In 9 days it would delete only nightly/build-2026-10-27-1, the dry run's build. -2, the newest, stays.
  • docs/release-flow.md: one bullet under the reviewers' Nightly.
python3 -m unittest discover -s tests   # OK
actionlint .github/workflows/nightly-build.yml   # clean

.github/ and tools/ci/ are Ludovic's under CODEOWNERS: merged by hand.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2895 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/nightly-prune-builds` --- ### 📝 Commits (1) - [`f6e96e4`](https://github.com/horizon-rust/horizon/commit/f6e96e484c5ba974b4d87e200c8be609e9d0a935) Nightly: the scheduled run deletes nightly/build-* branches older than 7 days ### 📊 Changes **4 files changed** (+95 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/nightly-build.yml` (+8 -0) 📝 `docs/release-flow.md` (+3 -0) 📝 `tests/test_nightly.py` (+36 -0) 📝 `tools/ci/nightly.py` (+48 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Ludovic's decision (2026-10-27): delete `nightly/build-*` branches older than 7 days. Each reviewer-picked Nightly (#2859) pushes one, up to 6 a day. - **`tools/ci/nightly.py prune-builds --days 7`** deletes, through the API, only branches named `nightly/build-<date>-<n>` whose date is more than 7 days old. It never deletes: - the newest build (compared by date, then by number, so `-10` counts as newer than `-9`); - a build whose commit a published `nightly` or `nightly-<date>` release points to; - `nightly-state`, or any branch not named exactly like a build. - **`nightly-build.yml`:** a step in `pick`, on scheduled runs only, with main's code. It writes each deletion and a count to the run summary. - **Tests:** `tests/test_nightly.py` covers what goes and what stays at the 7-day edge, the newest build, published builds, look-alike names, and the workflow step being schedule-only. - **Checked against origin, read-only:** today it would delete nothing. In 9 days it would delete only `nightly/build-2026-10-27-1`, the dry run's build. `-2`, the newest, stays. - **docs/release-flow.md:** one bullet under the reviewers' Nightly. ``` python3 -m unittest discover -s tests # OK actionlint .github/workflows/nightly-build.yml # clean ``` `.github/` and `tools/ci/` are Ludovic's under CODEOWNERS: merged by hand. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07:07 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4676
No description provided.