fix: warn instead of silently suppress pid_ts write failure in acquire_boilerplates_lock#54
Open
kitsuyui wants to merge 1 commit into
Open
Conversation
…e_boilerplates_lock
Previously, the pid_ts write was suppressed with `2>/dev/null || true`.
If the write failed (disk full, quota, permissions), stale lock detection
would be silently disabled: the `[ -f "${lock_dir}/pid_ts" ]` guard in the
polling loop would never fire, so a SIGKILL-killed holder would cause a
full 300-second timeout with no diagnostic.
Replace the silent suppression with an explicit warning. The lock is already
held (mkdir succeeded), so we continue, but the degraded stale-detection
state is now visible in the action log.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
acquire_boilerplates_lock()writespid_tsafter acquiring the lock so that waiting processes can detect a stale lock (owner died via SIGKILL). The write was previously suppressed with2>/dev/null || true, meaning a failure (disk full, quota, permissions) would silently disable stale detection without any visible signal.With this change, if the write fails the action logs a warning and continues. The lock is already held (the
mkdirsucceeded), so operation proceeds, but the degraded state is visible in the action log for diagnosis.Change
Impact
[ -f "${lock_dir}/pid_ts" ]) still behaves the same — it simply won't fire if the file was never created.pid_tsstill causes a 300-second wait; this PR makes that scenario diagnosable rather than mysterious.Test plan
pid_tswrite succeeds (normal path)