Skip to content

fix: Abort stuck rebase before pulling from remote - #8

Draft
petergaultney wants to merge 1 commit into
No-Instructions:mainfrom
TrilliantHealth:fix/abort-stuck-rebase
Draft

fix: Abort stuck rebase before pulling from remote#8
petergaultney wants to merge 1 commit into
No-Instructions:mainfrom
TrilliantHealth:fix/abort-stuck-rebase

Conversation

@petergaultney

Copy link
Copy Markdown
Contributor

A failed git pull --rebase (network timeout, SSH glitch mid-rebase) leaves
.git/rebase-merge behind. Every subsequent pull attempt hits "already a
rebase-merge directory" and the connector stays wedged until a pod restart.

Adds _abort_stuck_rebase which checks for leftover rebase state directories
and cleans them up. Called in two places:

  • At the top of _pull_from_remote, before any git operation
  • Before re-raising a non-conflict rebase error, so the failed rebase doesn't
    persist for the next cycle

If git rebase --abort itself fails, the rebase state directories are removed
manually as a last resort.

A failed `git pull --rebase` (network timeout, SSH glitch mid-rebase)
leaves `.git/rebase-merge` behind. Every subsequent pull attempt then
hits "already a rebase-merge directory" and the connector stays wedged
until a pod restart.

Detect and abort in-progress rebases at the top of `_pull_from_remote`
and before re-raising non-conflict rebase errors. If `git rebase --abort`
itself fails, remove the rebase state directories manually.
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