Skip to content

Resolve git locks before fetch and reset#2308

Merged
hiroshinishio merged 2 commits intomainfrom
wes
Feb 22, 2026
Merged

Resolve git locks before fetch and reset#2308
hiroshinishio merged 2 commits intomainfrom
wes

Conversation

@hiroshinishio
Copy link
Collaborator

Summary

  • Consolidated remove_stale_git_locks (sync, stale lock removal) and wait_for_git_locks (async, fresh lock polling) into a single resolve_git_locks async function
  • Renamed file from remove_stale_git_locks.py to resolve_git_locks.py to match the function name
  • Removed duplicate lock-waiting logic from git_reset.py that was reimplementing the same pattern
  • Deleted the now-unnecessary wait_for_git_locks.py file

The consolidated function handles both cases in one pass:

  1. Stale locks (>10min, from crashed Lambdas) - removed immediately
  2. Fresh locks (from concurrent Lambdas) - polls every 2s up to 60s, force-removes on timeout

Add wait_for_git_locks that polls every 2s up to 60s for fresh locks
held by concurrent Lambda invocations, then force-removes on timeout.
Merged remove_stale_git_locks (sync) and wait_for_git_locks (async)
into one resolve_git_locks function that handles both stale removal
and fresh lock polling. Renamed file to match function name.
@hiroshinishio hiroshinishio self-assigned this Feb 22, 2026
@hiroshinishio hiroshinishio changed the title Consolidate git lock handling into resolve_git_locks Resolve git locks: remove stale and wait for fresh in one pass Feb 22, 2026
@hiroshinishio hiroshinishio changed the title Resolve git locks: remove stale and wait for fresh in one pass Resolve git locks before fetch and reset Feb 22, 2026
@hiroshinishio hiroshinishio merged commit 6a7656a into main Feb 22, 2026
1 check passed
@hiroshinishio hiroshinishio deleted the wes branch February 22, 2026 05:55
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