Skip to content

fix(ci): remove isStaleCiRun to prevent ci pr hang on SSH host-key prompt#10300

Merged
davidfirst merged 1 commit intomasterfrom
fix/ci-pr-git-fetch-hang-on-ssh-prompt
Apr 15, 2026
Merged

fix(ci): remove isStaleCiRun to prevent ci pr hang on SSH host-key prompt#10300
davidfirst merged 1 commit intomasterfrom
fix/ci-pr-git-fetch-hang-on-ssh-prompt

Conversation

@davidfirst
Copy link
Copy Markdown
Member

@davidfirst davidfirst commented Apr 15, 2026

Follow-up to #10297. The new `isStaleCiRun` helper runs `git fetch origin` inside the hash-mismatch retry path. In the `bit_pr` CircleCI job, `origin` is the default SSH remote and GitHub's host key isn't seeded in `known_hosts` for that job's shell — so the fetch hits an interactive "yes/no" host-key prompt and hangs the job until the 50-minute step timeout (seen on #10257). The `bit_merge` job avoids this only because it rewrites `origin` to an HTTPS+token URL via `update_ssh_agent`; `bit_pr` does not.

`isStaleCiRun` was added during PR review to guard a hypothetical race: an older CI run finishing later could delete a newer run's lane and re-export stale snaps. In practice that race is unlikely, self-correcting (the next CI run on the latest commit publishes the correct lane), and only affects a PR lane — not main. Removing the guard restores the original simple retry from #10297, which is enough.

Copilot AI review requested due to automatic review settings April 15, 2026 19:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the CI PR staleness check to avoid hanging CI runners when git fetch origin triggers an interactive SSH host-key prompt, ensuring bit ci pr can continue its retry flow without waiting for a step timeout.

Changes:

  • Run the git fetch origin inside isStaleCiRun() with a non-interactive SSH configuration (BatchMode + bounded ConnectTimeout).
  • Keep existing behavior on failure: fall back to treating the run as “fresh” so the retry logic proceeds.

Comment thread scopes/git/ci/ci.main.runtime.ts Outdated
@davidfirst davidfirst force-pushed the fix/ci-pr-git-fetch-hang-on-ssh-prompt branch from bdc881a to 44b806f Compare April 15, 2026 20:00
@davidfirst davidfirst changed the title fix(ci): prevent bit ci pr hang on SSH host-key prompt during stale-run check fix(ci): remove isStaleCiRun to prevent ci pr hang on SSH host-key prompt Apr 15, 2026
@davidfirst davidfirst enabled auto-merge (squash) April 15, 2026 20:02
@davidfirst davidfirst merged commit 626727b into master Apr 15, 2026
12 checks passed
@davidfirst davidfirst deleted the fix/ci-pr-git-fetch-hang-on-ssh-prompt branch April 15, 2026 20:31
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.

3 participants