Skip to content

feat: deploy lock guardrail - #9584

Closed
dennisp42 wants to merge 2 commits into
mainfrom
dennis/cur2-2038-deploy-lock-guardrail-for-spellbook
Closed

dennisp42 wants to merge 2 commits into
mainfrom
dennis/cur2-2038-deploy-lock-guardrail-for-spellbook

Conversation

@dennisp42

Copy link
Copy Markdown
Contributor

Summary

Manual guardrail to hold merges to main while someone debugs a prod issue. Lock a scope, fix, unlock. Auto-releases after the TTL.

Files

  • .github/workflows/deploy_lock.yml: lock/unlock via workflow_dispatch
  • .github/workflows/deploy_lock_check.yml: posts deploy-lock status on PR events
  • .github/workflows/deploy_lock_expiry.yml: cron every 15 min, auto-release
  • .github/scripts/deploy_lock_status.sh: shared status logic
  • .github/labeler.yml: adds dbt: shared for sources/ and dbt_macros/
  • docs/deploy_lock.md: usage

One-time setup

  • Add deploy-lock to required status checks in branch protection
  • Create the hotfix PR label
  • Add SLACK_WEBHOOK_URL secret (optional, step no-ops if absent)

Verification

Tested in a private sandbox mirroring spellbook's labeler and directory layout.

# Case Observed
1 No lock, in-scope PR success
2 Lock dex, in-scope PR pending
3 Lock dex, out-of-scope PR success
4 hotfix under active lock success (bypass)
5 Remove hotfix pending
6 Lock all, any PR pending
7 Unlock all refreshed to success
8 TTL expiry auto-released, refreshed
9 Merge API while locked HTTP 405, "Required status check 'deploy-lock' is pending"
10 Merge API after unlock succeeds

Post-merge

  • Run one-time setup above
  • Test lock on dex, confirm state issue + in-scope PRs flip to pending
  • hotfix bypass
  • Unlock refresh

workflow_dispatch lock blocks merges to main for a given dbt scope
(dex, daily, hourly, solana, tokens, shared, all) via a required
deploy-lock commit status. hotfix PR label bypasses. Auto-releases
after a TTL.

See docs/deploy_lock.md.
@github-actions github-actions Bot added the WIP work in progress label Apr 20, 2026
@dennisp42
dennisp42 requested a review from 0xRobin April 20, 2026 20:01
@dennisp42 dennisp42 self-assigned this Apr 20, 2026
@dennisp42
dennisp42 marked this pull request as ready for review April 22, 2026 13:23
@github-actions github-actions Bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Apr 22, 2026
@dennisp42

Copy link
Copy Markdown
Contributor Author

Closing as deprioritized. Will refile if we revisit the deploy-lock guardrail.

@dennisp42 dennisp42 closed this Jun 3, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ready-for-review this PR development is complete, please review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant