ci(renovate): run hourly so auto-merge can actually fire; squash strategy #51
No reviewers
Labels
No labels
dependencies
major
security-pin
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
trails-cool/trails!51
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/renovate-automerge-strategy-and-hourly"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Answers "do I need to do anything?" — no, but the config did.
The diagnosis, and my wrong guess
I suspected
automergeStrategywas unsupported and that Renovate had therefore "stopped automerging". A debug dry-run disproved that:Nothing was blocked. Renovate was willing to merge the instant it looked — it just had no run in which to look while CI was green.
platformAutomergeonly enqueues at PR creation, so for an already-open PR Renovate does the merging itself, from inside a run. On the weekly cron that meant waiting up to a week.The
rebaseWhentrap I shipped in #34Worse than a plain wait, and my fault.
rebaseWhen: "behind-base-branch"re-pushes any branch whose base has moved, which restarts CI — so the branch goes green ~10 minutes after the run that touched it has already passed it by. Observed precisely that:mainmoved (#31, #34 merged)Repeat weekly and, whenever
mainmoves between runs, the safeguard I added to close the stale-base gap defers the merge it was guarding, potentially forever.Changes
Hourly cron (
0 * * * *) — bounds the wait to an hour and largely defuses the starvation. Most runs find nothing to open, becauserenovate.json5's ownschedulestill restricts PR creation to Monday mornings (docker images monthly). Waking up hourly is about merging, not creating.automergeSchedule: ["at any time"]— explicit, so merging never inherits the weekly creation window rather than relying on that staying the default.automergeStrategy: "squash"— a preference, not part of the fix, and the first draft of this PR wrongly justified it as required. One commit per dependency update onmaininstead of a merge commit plus parent: easier to read, easier to revert, and it matches the squash policy CONTRIBUTING.md documents for non-human contributions.Verified rather than assumed: the repo allows squash (
allow_squash_merge: true), and Forgejo signs squash commits with the instance key (repository.signing.MERGES: always), sorequire_signed_commitsonmainstays satisfied without Renovate holding a signing key.Validated
Config parses via
json5with all five keys resolving on the auto-merge rule (squash,at any time,platformAutomerge: true,3 days,behind-base-branch, typesminor/patch/pin/digest). Workflowon:block still has exactly one cron andworkflow_dispatchintact.Worth watching
A full run that opens PRs took ~21 minutes, and there are two runner slots shared with CI. No-op runs are far cheaper, but if CI starts queuing behind Renovate, dial this to every few hours rather than back to weekly.
Once this merges, #33 and #35 should merge on their own within the hour — both are green and up to date. Note they touch
pnpm-lock.yaml, which is incd-apps' path filter, so each will trigger a production deploy.