Skip to content

fix(deploy): recover stale webhook deploy lock - #144

Merged
LucasSantana-Dev merged 1 commit into
mainfrom
fix/deploy-stale-lock-recovery
Mar 10, 2026
Merged

LucasSantana-Dev merged 1 commit into
mainfrom
fix/deploy-stale-lock-recovery

Conversation

@LucasSantana-Dev

@LucasSantana-Dev LucasSantana-Dev commented Mar 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add PID-aware lock acquisition to scripts/deploy.sh
  • recover stale /tmp/lucky-deploy.lock directories left by interrupted deploys
  • switch cleanup trap to rm -rf so lock metadata is always removed
  • update README + CHANGELOG deploy notes

Validation

  • bash -n scripts/deploy.sh
  • webhook logs confirmed stale lock condition (another deploy is already running) before this patch

Summary by CodeRabbit

  • Bug Fixes

    • Deploy process now automatically recovers from stale locks left by interrupted deployments, allowing subsequent deployment attempts to proceed instead of being permanently blocked.
  • Documentation

    • Updated documentation to clarify that interrupted deployments will automatically recover stale lock directories on the next run, improving reliability in remote deployment workflows.

@netlify

netlify Bot commented Mar 10, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for regal-bunny-0c8efe ready!

Name Link
🔨 Latest commit 33d0472
🔍 Latest deploy log https://app.netlify.com/projects/regal-bunny-0c8efe/deploys/69b05322c2a8c300082b17b6
😎 Deploy Preview https://deploy-preview-144--regal-bunny-0c8efe.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the infra label Mar 10, 2026
@vercel

vercel Bot commented Mar 10, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lucky Ready Ready Preview, Comment Mar 10, 2026 5:22pm

@coderabbitai

coderabbitai Bot commented Mar 10, 2026 •

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The pull request implements a PID-aware deploy lock recovery mechanism in the deploy script. A new acquire_lock() function detects and recovers from stale lock files, allowing deployments to resume after interruptions. Documentation updates clarify this new behavior.

Changes

Cohort / File(s) Summary
Documentation
CHANGELOG.md, README.md
Added entries documenting that interrupted deploys now auto-recover stale lock directories on subsequent runs.
Deploy Locking Mechanism
scripts/deploy.sh
Introduced PID-aware file-level locking with new acquire_lock() function and LOCK_PID_FILE variable to detect and recover from stale /tmp/lucky-deploy.lock directories. Updated cleanup routine to remove lock directory on exit.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

size/m

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(deploy): recover stale webhook deploy lock' directly and clearly summarizes the main change: implementing stale lock recovery in the deploy script.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/deploy-stale-lock-recovery

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@LucasSantana-Dev
LucasSantana-Dev merged commit 36937e4 into main Mar 10, 2026
13 of 14 checks passed
@LucasSantana-Dev
LucasSantana-Dev deleted the fix/deploy-stale-lock-recovery branch March 10, 2026 17:28

This branch was successfully deployed

1 active deployment
Preview — 33d0472a Deployed Mar 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant