Skip to content

fix(audit): make bundle:audit:update safe under concurrency - #58

Merged
pboling merged 1 commit into
mainfrom
fix/audit-update-concurrency
Nov 14, 2026
Merged

pboling merged 1 commit into
mainfrom
fix/audit-update-concurrency

Conversation

@pboling

@pboling pboling commented Nov 14, 2026

Copy link
Copy Markdown
Member

Closes #57

  • bundle:audit:update now holds a blocking flock on <advisory-db>.lock (next to the database), so concurrent processes wait instead of failing on the ref lock.
  • KETTLE_DEV_SKIP_AUDIT_UPDATE (1/true/yes/on) skips only the update; bundle:audit still runs and stays a default.
  • A failed update warns and audits with the existing database when one exists; with no local database it still fails.
  • Documented in kettle-release --help next to KETTLE_DEV_SKIP_BUNDLE_AUDIT; CHANGELOG updated.

Verified: new specs for each behavior (lock held during update, waiter blocks, skip switch, non-fatal failure, fatal without DB); full suite 924 examples, 0 failures; rubocop-gradual clean. Not verified: a real multi-process run against the live ruby-advisory-db.

@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Health
kettle-dev 91% 75% ➖
Summary 91% (5803 / 6356) 75% (2228 / 2960) ➖

Minimum allowed line rate is 91%

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 43567172506

Coverage decreased (-0.3%) to 86.207%

Details

  • Coverage decreased (-0.3%) from the base build.
  • Patch coverage: 7 uncovered changes across 1 file (16 of 23 lines covered, 69.57%).
  • 37 coverage regressions across 5 files.

Uncovered Changes

File Changed Covered %
lib/kettle/dev/rakelib/bundle_audit.rake 23 16 69.57%

Coverage Regressions

37 previously-covered lines in 5 files lost coverage.

File Lines Losing Coverage Coverage
lib/kettle/dev/rakelib/bench.rake 12 30.23%
lib/kettle/dev/tasks/ci_task.rb 11 87.59%
lib/kettle/dev/rakelib/appraisal.rake 8 47.52%
lib/kettle/dev/rakelib/bundle_audit.rake 5 54.35%
lib/kettle/dev/rakelib/yard.rake 1 70.0%

Coverage Stats

Coverage Status
Relevant Lines: 6356
Covered Lines: 5803
Line Coverage: 91.3%
Relevant Branches: 2960
Covered Branches: 2228
Branch Coverage: 75.27%
Branches in Coverage %: Yes
Coverage Strength: 61.96 hits per line

💛 - Coveralls

@pboling
pboling merged commit 555699c into main Nov 14, 2026
34 checks passed
@pboling
pboling deleted the fix/audit-update-concurrency branch November 14, 2026 07:25
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.

Parallel releases race in the shared ruby-advisory-db: bundle:audit:update fails with 'cannot lock ref'

2 participants