Skip to content

ci(dependabot): cap the auto-merge job at 30 minutes - #415

Merged
glebedel merged 1 commit into
mainfrom
ci/dependabot-auto-merge-timeout
Nov 20, 2026
Merged

glebedel merged 1 commit into
mainfrom
ci/dependabot-auto-merge-timeout

Conversation

@glebedel

@glebedel glebedel commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

On 2026-11-16 the Dependabot auto-merge job on #413 waited in lewagon/wait-on-check-action for 6 hours until GitHub's default job timeout cancelled it, so auto-merge was never enabled and the runner was held for 361 billed minutes. This caps the job at 30 minutes.

Before and after

Before After
Job timeout 360 min (GitHub default) 30 min
Longest CI run on a PR, last 7 days about 9 min unchanged

Verification

  • actionlint clean.
  • A timed-out job is cancelled, so the gh pr merge --auto step cannot run after it: that step keeps its implicit success() condition.
  • No permissions, triggers or actions change.

Risk

If a check takes longer than 30 minutes, auto-merge is not enabled for that Dependabot PR and the job needs a re-run, which is what happens today after 6 hours.

No runtime change, no demo.

Requested by [email protected]

🤖 Generated with Claude Code


Summary by cubic

Caps the Dependabot auto-merge job at 30 minutes. Previously, the wait-on-check step polled until GitHub's 6-hour default job timeout cancelled the run, which held a runner for 361 billed minutes and left the PR without auto-merge. CI's longest run in the last 7 days took about 9 minutes, so 30 minutes leaves ample headroom; if a check takes longer, auto-merge is skipped and the job needs a re-run, which already happens today after 6 hours.

Written for commit 20c0aba. Summary will update on new commits.

View guided diff Turn on auto-fix

lewagon/wait-on-check-action polls until every other check on the head
finishes. On 2026-11-16 (run 43838013402, PR #413) it polled for 6 hours
until the default job timeout cancelled it. CI's longest run in the last
7 days took about 9 minutes, so 30 minutes leaves room while freeing the
runner if a check never finishes.

Requested by [email protected]

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@glebedel
glebedel requested a review from a team as a code owner November 19, 2026 03:24
@glebedel glebedel self-assigned this Nov 19, 2026
@pkg-pr-new

pkg-pr-new Bot commented Nov 19, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/StackOneHQ/stackone-ai-node/@stackone/ai@415

commit: 20c0aba

@glebedel
glebedel merged commit 800ea49 into main Nov 20, 2026
19 checks passed
@glebedel
glebedel deleted the ci/dependabot-auto-merge-timeout branch November 20, 2026 17:17
@glebedel

Copy link
Copy Markdown
Contributor Author

Automated post-merge check by s2d2 for [email protected]

Verdict: no signal yet. Merged at 17:17:34Z as 800ea49.

  • Since the merge, Dependabot auto-merge ran once, on the release-please PR. It ended action_required with no job because the actor is not Dependabot. No Dependabot PR has started the job yet, so the 30 minute cap hasn't been tested on a real run.

I'll check again in about 24 hours.

@glebedel

Copy link
Copy Markdown
Contributor Author

Automated post-merge check by s2d2 for [email protected] (second look, 2026-11-21 17:30 UTC)

Verdict: no signal yet. Nothing has regressed.

  • Since the merge (800ea49), dependabot-auto-merge.yaml has run once: run 44781969550 on the release-please branch, by github-actions[bot]. It ended action_required and created no job, which is the expected skip for a non-Dependabot actor.
  • Dependabot has not opened or updated a PR since then, so the 30 minute cap has not been exercised yet.

There will be one more look by 2026-11-27. If no Dependabot run happens before then, it will be reported as "never observed".

@glebedel

Copy link
Copy Markdown
Contributor Author

Automated post-merge check by s2d2 for [email protected] (final look, 2026-11-27 17:00 UTC)

Verdict: works. The 30 minute cap fired as intended. The same run also exposed the bug behind the hang.

Observed. On 2026-11-23, Dependabot PR #413 started run 45145167052.

  • By 09:19:38Z every other check on head 4c7fde7 had finished (ci-ok, lint, build-and-test and the rest).
  • Wait for CI to pass kept polling anyway. At 09:44:16Z the job timed out after 30 minutes and was cancelled.
  • Before this change, that job would have held the runner until the 6 hour default.
  • No regression: ci(deps): bump the actions group across 1 directory with 7 updates #413 was merged by hand on 2026-11-24. The other runs since the merge were non-Dependabot actors and were skipped as expected.

Why it hung. The wait step sets running-workflow-name: Dependabot auto-merge, which is the workflow name. lewagon/wait-on-check-action matches that value against check run names, and the check for this job is named after the job id, dependabot-auto-merge. So the step never excludes itself and waits for its own check to finish, which cannot happen.

  • Result: every Dependabot run now ends at the 30 minute cap.
  • Enable auto-merge never runs, so Dependabot PRs are not being auto-merged.

Suggested follow-up (not applied here). One line in .github/workflows/dependabot-auto-merge.yaml: running-workflow-name: dependabot-auto-merge. With that, the wait should end about a minute after the last real check, and auto-merge would work again. Keep the 30 minute cap as a backstop.

This is the last automated look at this PR.

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.

2 participants