Skip to content

Report a failed release lock as what it is - #171

Merged
arnelirobles merged 3 commits into
mainfrom
fix-release-lock-permission-error
Nov 12, 2026
Merged

arnelirobles merged 3 commits into
mainfrom
fix-release-lock-permission-error

Conversation

@arnelirobles

Copy link
Copy Markdown
Contributor

The release lock command hid mkdir's stderr and treated every failure as a held lock. It now prints "busy" only when the lock directory exists, and otherwise returns the mkdir message in a new ErrLock error that names the directory and says to set sudo or use a writable remoteRoot. The envelope has no error codes, so there is no new code, only the message and the sentinel.

--dry-run does not connect to the host, so it cannot check that the lock directory is writable. Not done here.

Closes #168

- test: TestAcquireReportsAPermissionErrorAsNotBusy
  breaks: internal/releasestate/releasestate.go "if msg, ok := strings.CutPrefix(out, \"error:\"); ok {"
- test: TestLockCmdSeparatesAHeldLockFromAFailure
  breaks: internal/releasestate/releasestate.go "{ [ -d \" + lock + \" ] && echo busy || echo"
- untested: CHANGELOG.md
  why: docs

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@arnelirobles
arnelirobles marked this pull request as ready for review November 12, 2026 13:28
@arnelirobles
arnelirobles merged commit 667cef0 into main Nov 12, 2026
2 checks passed
@arnelirobles
arnelirobles deleted the fix-release-lock-permission-error branch November 12, 2026 13:28
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.

stack release reports a permission error on the lock as 'another release is starting'

1 participant