Repository navigation
wurk v1.9.0
Changed
concurrent-rubyis no longer a runtime dependency.wurk.gemspecdroppedspec.add_dependency 'concurrent-ruby', '~> 1.2': Wurk never required it directly. An app that pulls it in through Rails or another gem keeps it; nothing else in the dependency set moved (#792).- Dashboard metrics history is 30 days, not 3.
Wurk::Metrics::History::MID_TERMmoved from 3 days to 30 days, so every 10-minutej|…bucket now lives ten times longer — up to 4320 keys per 30-day window instead of 432 per 3 days — and the dashboard's 7d/30d tabs are backed by data end-to-end. Sidekiq'sExecutionTrackerkeeps the 3-day TTL upstream; this is a deliberate divergence, and retention alone changes no key, field, or score, so a mixed Sidekiq/Wurk fleet still reads the same buckets. With it, the class-levelWurk::Metrics::Query.top_jobs/for_jobcap moved fromMAX_HOURS = 72toMAX_HOURS = 720, and aminutes:window past 480 promotes onto the 10-minute buckets instead of raising — only a window past 43200 minutes raisesWindowTooWide. The Sidekiq-compatible instance API (Sidekiq::Metrics::Query#top_jobs/#for_job) is unchanged: it still clamps silently at 480 minutes / 72 hours, exactly as upstream, and the parity oracle pins it.GET /api/metrics?minutes=…now serves the requested window out to 30 days and answers 400 past it (it used to clamp silently to 480 minutes), and the SPA requests the 7d/30d tabs as?hours=168/?hours=720with the response echoing bothhoursandminutesso the label matches the served period. - The demo's error reporting is opt-in and sanitized. Sentry turns on only when
WURK_DEMO_REPORT_ERRORS=1andSENTRY_DSNare both set; with either one missing the demo never loads the SDK, never initialises Sentry and never installsWurk::Sentry, so Wurk's server middleware and error handlers stay exactly as they were. Events from the demo's two deliberately-failing jobs (BrokenJob,FlakyWebhookJob) and soak-tagged events are dropped, and request headers, cookies and job arguments are scrubbed of credential- and personal-data-shaped material before an event leaves the demo. The rules live in the demo app (demo/lib/demo_sentry_policy.rb), not in the gem: the gem ships the integration, the demo decides what it may send.
Fixed
-
The reaper's
stopnow bounds its sweep to the list it is already draining.Reaper#stopwaits for a running sweep only up to its bounded join timeout, and a sweep that outlasts that bound is deliberately left alive to wind down — still tracked, so a restart cannot start a second sweep alongside it. That sweep now finishes the one private list it is already draining (those jobs are still put back on their queue for a live worker to pick up: at-least-once, so nothing is lost even though a job may run twice), starts no further list, and makes at most one more Redis round trip instead of walking the rest of the keyspace. A stopping worker therefore no longer keeps requeueing orphans or holding the reaper's sweep locks past its shutdown. The reaper's cadence and grace period are unchanged, and nothing on the wire moves: no Redis key, job-JSON field or score format changed. -
Re-registering the auto-registered
Wurk::Batch::ServerMiddlewareno longer moves it insideExpiryand the Limiter. Adding the batch middleware to the server chain again — aconfigure_serverblock, a test helper, a lateradd— now keeps it outsideWurk::Middleware::Expiry, which skips an expired job, and outsideWurk::Limiter::ServerMiddleware, which reschedules an over-limit job. An expired job is therefore counted as its batch's success instead of stranding the batch: the batch's pending count drops, the batch can complete, and its:completeand:successcallbacks fire rather than the batch staying open forever. An over-limit job is no longer booked as a batch failure for a job that never ran. A middleware class may now declare anouter_ofanchor — the classes it must stay outside of — andChain#addplaces it before the first of them that is registered, keeping the slot it already holds if it is already outside them; a class that declares no anchor keeps Sidekiq's documented append (spec §10.1), andprepend,insert_before,insert_afterandremovestill relocate middleware deliberately, as before. The default server chain order is unchanged, and nothing on the wire moves: no Redis key, job-JSON field or score format changed. -
A promoted
minutes:window no longer rounds up to whole hours. The class-level dashboard API (Wurk::Metrics::Query.top_jobs/for_job) promotes aminutes:window past 480 onto the 10-minute buckets, but computed the promoted window asceil(minutes / 60)hours and readhours × 6of them — sominutes: 490served 9 hours (54 buckets) while/api/metricsechoed 490, and thetop_jobstotals included up to 50 extra minutes of executions that fell outside the window the caller asked for. The promotion now counts 10-minute buckets directly (ceil(minutes / 10); 490 minutes is exactly 49), so the served data stays inside the echoed window up to the trailing partial bucket. Explicithours:windows are unchanged. -
The demo's error-reporting scrubber no longer passes a serialized cookie jar through untouched.
scrub_request_fieldreturned early for any header or cookie field that was not a Hash, so an event whose request carried its cookies as a String ("session=abc123"— the shape a raw request env or a reconstructed event arrives in) was sent with the session value intact. A populated field in any shape but a Hash now fails closed like the rest of the policy: a per-entry scrub has no entries to work on, so nothing inside such a field can be vouched for and the event is dropped rather than sent half-scrubbed. An empty one still passes — it holds nothing. -
push_bulkno longer silently normalizes symbol-keyed option hashes.Sidekiq::Client#pushhas always raisedArgumentErroron symbol keys (spec §31.1) but the bulk path stringified them and pushed, so{class: MyJob, args: [[1]]}quietly worked while the single-job push did not — two entry points, two answers on what a valid push is.push_bulknow rejects any Symbol key, whole or mixed with String keys, withArgumentErrorbefore any Redis write, matchingpushexactly. String-keyed bulks are unchanged:perform_bulk, the ActiveJob adapter's bulk path and the API's bulk endpoint all handpush_bulkString keys. -
The release lane now classifies a GitHub Release's state explicitly instead of guessing at it. The scheduled release-due checkup read a Release as gem-less when its author was
developerz-ai[bot]OR it carried zero assets, so a sanctioned break-glass manual release — adeveloperz-ai[bot]-authored Release with the.gemattached — was reported as a defect and aborted the checkup before the diff window was computed. The trigger is now the asset count: zero assets is the gem-less marker (and the only state the release-deletion runbook applies to), while a Release that carries the.gemis a real release whoever authored it. The author is read for context only. When no Release can be read at all, the state is left unclassified rather than collapsed into one undifferentiated error — arelease.ymlpreflight no-op (the version is already on RubyGems), a break-glass publication, and a failure before the Release was created all stay open until the RubyGems per-version probe and the lastrelease.ymlrun corroborate which one it was. RubyGems, not the absence of a Release, is the authority on publication. -
A zero-asset GitHub Release no longer counts as proof that no gem shipped.
release.ymlpushes the gem before it creates the Release and uploads the.gemasset, so a succeeded push whose asset upload failed leaves zero assets on a version RubyGems has already burned. The release-due brief's gem-less diagnostic and prose now require the RubyGems per-version probe to confirm non-publication before the release-deletion runbook is named — the precondition the "Release states" table already put on the zero-asset row. -
The
Wurk::Queuepause/unpause docs no longer promise an unconditionaltrue. The "Pausing a queue" section ofdocs/api.mdclaimed that both calls "returntruewhether or not they changed anything", butWurk::Queue#pause!and#unpause!returntrueonly when the call changed the queue's paused state —pause!when it added the queue to thepausedSET,unpause!when it removed it — andfalsewhen there was no transition. That is the Sidekiq Pro behaviour, and it is what the method table in the same file already described. Documentation-only: no runtime behaviour changed, and the return values are still theSADD/SREMstate-change booleans the unit and parity suites assert. -
The migration guide's
b-<bid>*compatibility row no longer promises unqualified Pro batch-schema compatibility. Theb-<bid>*,batchesrow in §4 ofdocs/migrate-from-sidekiq.mdread "✅ Pro batch schema", contradicting the guide's own §9 cutover warning: Wurk'sb-<bid>-success/b-<bid>-completemarkers mean "already fired" (callbacks enqueued, not necessarily executed), while Sidekiq Pro §2.8 describes the same keys as "callbacks pending", so a Pro batch in flight at the swap may miss its callbacks. The row now names that limitation and points at the §9 cutover warning, and §4's prose says the same in its own words. Documentation-only: no runtime behaviour changed. -
The Pro §3.2 spec no longer says the
processesmembership SET expires. The bullet read "Process death: heartbeat keyprocessesexpires after 60s", butprocessesis a TTL-less membership SET: the 60s TTL belongs to the per-identity heartbeat hash<identity>, and liveness is judged by existence — an identity is alive only while its heartbeat hash still exists, so a SET member whose hash has expired is dead even though it is still listed.docs/target/sidekiq-pro.mdnow says so, and every place that repeated the claim was aligned to match it: the operator doc (docs/reliability.md), the HTTP API doc (docs/api-http.md), the reaper's liveness comment (lib/wurk/fetcher/reaper.rb), the launcher's heartbeat comment (lib/wurk/launcher.rb) and the launcher test's comment (test/unit/launcher_test.rb). Documentation-only: no runtime behaviour changed. -
The reaper's unparseable-key warning now states its scope. The WARN a worker logs for a
queue:*|*key that is not a private list it can read the owner of — a list whose owner tail does not parse,queue:<queue>|<host>|not-a-pid|<index>, say — said what to do about the list, but not how often the warning repeats, and the dedup behind it is not what an operator would assume: the already-reported keys are an in-memorySetheld by the reaper, one instance per worker process and built after the fork, so there is no Redis key, no TTL, and nothing shared with the other workers. The message now ends with "Reported once per process: every worker that sees the key logs it for itself, and it is reported again after a restart.", and the reliability page and the incident runbook describe the repetition it implies: one identical line per booting worker pid (the boot sweep is unguarded), the same key reported again by a later sweep's lock winner only when that process has not reported it yet (each process's own set is the only memory), or after any restart, and the cluster-wide sweep lock deciding who sweeps, not who has already reported the key. No fleet-wide deduplication and no Redis key were added, and nothing changed beyond the message — the same keys are reported, by the same processes, at the same times.