specwrk 0.15.1 → 0.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3de4bb5f29a1c817db2c766d49fcd20d2153e6bf9708fc7b5ece2e1101fbb839
4
- data.tar.gz: 3fb0dc079f9d85461ec245e2b1019d03e94ba7f3403813f2c7558504140b2c37
3
+ metadata.gz: 9dfdda735e233530059c547ef897824d74169be0a5bbd95e806b69902aafe984
4
+ data.tar.gz: 101e932e579f2f3e396b4e93e0ce9f4cb1f2675fe972b113b0a2280f69e3d15b
5
5
  SHA512:
6
- metadata.gz: 3bfbec41f429426bcd85e81c2d879c1e3171ce2f0dba908a420890b5fa37373e803540ef92d4bfada74f4e465e4babc558c3e18cf8fa941376eb6e2d0d08cea2
7
- data.tar.gz: 9096f33b527c0ae8233ae22a01d7e6b53e446b6684b63417120ba9181f7780e2590a4ff59ee5777a06d750341c5f3781f2f3f705c65874b69ae422db812a1ed2
6
+ metadata.gz: cb76e30cd4a80bf4d4678c9fcffa863138b4740f1c6cad666e16276381e831554ec316f35dde7d672c3a384aa779c4fdb35c8b61793b4188473a518ba5982529
7
+ data.tar.gz: 309e8a705d452b5a62214b398990864d26d8c265c4a9a07f9e9240d4911273ec8633bf2452a4c689c0cabc37778bc6b610e99ce680b168ff37903529ba77f9ea
data/CHANGELOG.md CHANGED
@@ -1,5 +1,119 @@
1
1
  ## [Unreleased]
2
2
 
3
+ # Changelog
4
+
5
+ ## v0.15.2 — 2025-08-15
6
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.15.1...v0.15.2)
7
+ - Fix bug where ruby objects were being written to ndjson files isntead of json — [#119](https://github.com/danielwestendorf/specwrk/pull/119) by @danielwestendorf
8
+
9
+ ## v0.15.1 — 2025-08-14
10
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.15.0...v0.15.1)
11
+ - Add `watch` command to split spec files across processes as they change — [#117](https://github.com/danielwestendorf/specwrk/pull/117) by @danielwestendorf
12
+ - Readme formatting tweaks — @danielwestendorf
13
+
14
+ ## v0.15.0 — 2025-08-08
15
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.14.1...v0.15.0)
16
+ - When output path is specified, write an `.ndjson` file per worker of all examples executed — [#113](https://github.com/danielwestendorf/specwrk/pull/113) (fixes [#10](https://github.com/danielwestendorf/specwrk/issues/10)) by @danielwestendorf
17
+ - Print re-run commands for failures — [#114](https://github.com/danielwestendorf/specwrk/pull/114) (fixes [#7](https://github.com/danielwestendorf/specwrk/issues/7)) by @danielwestendorf
18
+ - Show count of examples that did not execute; make runs resumable by only clearing stores on seed — [#115](https://github.com/danielwestendorf/specwrk/pull/115) by @danielwestendorf
19
+ - Report flake counts and provide flake re-run commands — [#116](https://github.com/danielwestendorf/specwrk/pull/116) (fixes [#112](https://github.com/danielwestendorf/specwrk/issues/112)) by @danielwestendorf
20
+
21
+ ## v0.14.1 — 2025-08-07
22
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.14.0...v0.14.1)
23
+ - Fix CLI typo — @danielwestendorf
24
+
25
+ ## v0.14.0 — 2025-08-07
26
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.13.1...v0.14.0)
27
+ - Add support for example retries (`--max-retries` for `start` and `seed`) — [#111](https://github.com/danielwestendorf/specwrk/pull/111) (addresses [#96](https://github.com/danielwestendorf/specwrk/issues/96)) by @danielwestendorf
28
+
29
+ ## v0.13.1 — 2025-08-07
30
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.13.0...v0.13.1)
31
+ - Require `securerandom` in the FileAdapter to ensure availability — @danielwestendorf
32
+
33
+ ## v0.13.0 — 2025-08-07
34
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.12.0...v0.13.0)
35
+ - Avoid multi-process tempfile conflicts by adding a UUID to tempfile names — [#108](https://github.com/danielwestendorf/specwrk/pull/108) (fixes [#107](https://github.com/danielwestendorf/specwrk/issues/107)) by @danielwestendorf
36
+ - Remove deprecated `complete` endpoint — [#109](https://github.com/danielwestendorf/specwrk/pull/109) (fixes [#95](https://github.com/danielwestendorf/specwrk/issues/95)) by @danielwestendorf
37
+ - Track worker success metrics (succeeded/pending/failed) and use them to instruct worker exit behavior — [#110](https://github.com/danielwestendorf/specwrk/pull/110) (fixes [#97](https://github.com/danielwestendorf/specwrk/issues/97)) by @danielwestendorf
38
+
39
+ ## v0.12.0 — 2025-08-06
40
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.11.1...v0.12.0)
41
+ - Don’t return a body for `HEAD` requests in auth middleware — refs [#102](https://github.com/danielwestendorf/specwrk/issues/102) — @danielwestendorf
42
+ - Filter `specwrk` from backtraces — @danielwestendorf
43
+ - Move store order tracking to the only store class that needs it (performance improvement) — [#105](https://github.com/danielwestendorf/specwrk/pull/105) by @danielwestendorf
44
+ - Humanize seconds output — [#106](https://github.com/danielwestendorf/specwrk/pull/106) (fixes [#11](https://github.com/danielwestendorf/specwrk/issues/11)) by @danielwestendorf
45
+
46
+ ## v0.11.1 — 2025-08-05
47
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.11.0...v0.11.1)
48
+ - Avoid doing work in `before_lock` for `complete` and `pop` endpoints — [#104](https://github.com/danielwestendorf/specwrk/pull/104) (fixes [#103](https://github.com/danielwestendorf/specwrk/issues/103)) by @danielwestendorf
49
+
50
+ ## v0.10.2 — 2025-08-01
51
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.10.1...v0.10.2)
52
+ - Add `complete_and_pop` endpoint to reduce HTTP requests ~50% — [#88](https://github.com/danielwestendorf/specwrk/pull/88) by @danielwestendorf
53
+ - File-per-example file store — [#87](https://github.com/danielwestendorf/specwrk/pull/87) by @danielwestendorf
54
+ - Remove thread safety (follow-up to thread pool changes) — [#89](https://github.com/danielwestendorf/specwrk/pull/89) by @danielwestendorf
55
+ - Fix thread pool start — [#90](https://github.com/danielwestendorf/specwrk/pull/90) by @danielwestendorf
56
+
57
+ ## v0.10.1 — 2025-08-01
58
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.10.0...v0.10.1)
59
+ - Internal cleanups and versioning adjustments for the 0.10.x line
60
+
61
+ ## v0.10.0 — 2025-08-01
62
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.9.1...v0.10.0)
63
+ - Prep for 0.10 baseline (no PRs explicitly tied beyond those in 0.10.1/0.10.2)
64
+
65
+ ## v0.9.1 — 2025-08-01
66
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.9.0...v0.9.1)
67
+ - Minor fixes and tag adjustments
68
+
69
+ ## v0.9.0 — 2025-07-30
70
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.8.0...v0.9.0)
71
+ - File-per-example store groundwork — see [#87](https://github.com/danielwestendorf/specwrk/pull/87) by @danielwestendorf
72
+
73
+ ## v0.8.0 — 2025-07-22
74
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.7.1...v0.8.0)
75
+ - Revert datastore and related adjustments — [#86](https://github.com/danielwestendorf/specwrk/pull/86) by @danielwestendorf
76
+ - Just return response if no `run_id` header — [#85](https://github.com/danielwestendorf/specwrk/pull/85) by @danielwestendorf
77
+ - On `INT`, if RSpec is defined set `wants_to_quit = true` — [#84](https://github.com/danielwestendorf/specwrk/pull/84) by @danielwestendorf
78
+ - Datastore for queues — [#83](https://github.com/danielwestendorf/specwrk/pull/83) by @danielwestendorf
79
+
80
+ ## v0.7.1 — 2025-07-22
81
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.7.0...v0.7.1)
82
+ - Minor tag-only bump
83
+
84
+ ## v0.7.0 — 2025-07-22
85
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.6.3...v0.7.0)
86
+ - Only exit 1 when no examples processed and run not completed — [#82](https://github.com/danielwestendorf/specwrk/pull/82) by @danielwestendorf
87
+ - Switch from Puma to Pitchfork — [#79](https://github.com/danielwestendorf/specwrk/pull/79) by @danielwestendorf
88
+ - Dump all runs as unique — [#78](https://github.com/danielwestendorf/specwrk/pull/78) by @danielwestendorf
89
+
90
+ ## v0.6.3 — 2025-07-17
91
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.6.2...v0.6.3)
92
+ - Reap queues based on staleness of workers — [#76](https://github.com/danielwestendorf/specwrk/pull/76) by @danielwestendorf
93
+ - Track worker `first_seen_at` / `last_seen_at` — [#75](https://github.com/danielwestendorf/specwrk/pull/75) by @danielwestendorf
94
+ - Unique default ID when no `SPECWRK_ID` provided — [#74](https://github.com/danielwestendorf/specwrk/pull/74) by @danielwestendorf
95
+ - Send `X-Specwrk-Id` and `User-Agent` headers — [#71](https://github.com/danielwestendorf/specwrk/pull/71) by @danielwestendorf
96
+
97
+ ## v0.6.2 — 2025-07-17
98
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.6.1...v0.6.2)
99
+ - Tag-only bump
100
+
101
+ ## v0.6.1 — 2025-07-17
102
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.6.0...v0.6.1)
103
+ - Tag-only bump
104
+
105
+ ## v0.6.0 — 2025-07-17
106
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.5.0...v0.6.0)
107
+ - Output success message when seeding succeeds — [#67](https://github.com/danielwestendorf/specwrk/pull/67) by @danielwestendorf
108
+
109
+ ## v0.5.0 — 2025-07-15
110
+ [Compare](https://github.com/danielwestendorf/specwrk/compare/v0.4.11...v0.5.0)
111
+ - Support specifying if subsequent seeds should be ignored for a run — [#37](https://github.com/danielwestendorf/specwrk/pull/37) by @danielwestendorf
112
+ - Make number of seed waits configurable — [#35](https://github.com/danielwestendorf/specwrk/pull/35) by @danielwestendorf
113
+ - Worker wait for seeding — [#32](https://github.com/danielwestendorf/specwrk/pull/32) by @danielwestendorf
114
+ - Track if the worker has processed *any* examples — [#31](https://github.com/danielwestendorf/specwrk/pull/31) by @danielwestendorf
115
+
116
+
3
117
  ## v0.4.11
4
118
 
5
119
  - Move logic out of CLI methods ([#64](https://github.com/danielwestendorf/specwrk/issues/64)) by @danielwestendorf
data/README.md CHANGED
@@ -26,6 +26,7 @@ Commands:
26
26
  specwrk serve # Start a queue server
27
27
  specwrk start [DIR] # Start a server and workers, monitor until complete
28
28
  specwrk version # Print version
29
+ specwrk watch # Start a server and workers, watch for file changes in the current directory, and execute specs
29
30
  specwrk work # Start one or more worker processes
30
31
  ```
31
32
 
@@ -261,6 +262,22 @@ end
261
262
  # end
262
263
  ```
263
264
 
265
+ ## Prior/other works
266
+ There are many prior works for running rspec tests across multiple processes. Most of them combine process output making failures hard to grok. Some are good at running tests locally, but not on CI, while others are invserly true. Others are comercial or impactical without making a purchase.
267
+
268
+ specwrk is different because it:
269
+ 1. Puts your developer experience first. Easy execution. No messy outputs. Retries built in. Easy(er) debugging of flaky tests.
270
+ 2. Is the same tool you use in development on your local box, in CI with a single runner, or CI with N number of runners.
271
+ 3. Is easy to deploy and manage a queue server.
272
+ 4. RSpec-only.
273
+ 5. Is free.
274
+
275
+ [parallel_rspec](https://github.com/willbryant/parallel_rspec)
276
+ [Knapsack](https://github.com/KnapsackPro/knapsack)
277
+ [parallel_tests](https://github.com/grosser/parallel_tests)
278
+ [rspecq](https://github.com/skroutz/rspecq)
279
+ [RSpec ABQ](https://github.com/rwx-research/rspec-abq)
280
+
264
281
  ## Contributing
265
282
 
266
283
  Bug reports and pull requests are welcome on GitHub at https://github.com/dwestendorf/specwrk.
@@ -59,6 +59,8 @@ module Specwrk
59
59
  RSpec.world.wants_to_quit = Specwrk.force_quit
60
60
 
61
61
  RSpec.configuration.silence_filter_announcements = true
62
+ RSpec.configuration.filter_manager.inclusions.clear
63
+ RSpec.configuration.filter_manager.exclusions.clear
62
64
 
63
65
  true
64
66
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Specwrk
4
- VERSION = "0.15.1"
4
+ VERSION = "0.15.3"
5
5
  end
@@ -231,13 +231,13 @@ module Specwrk
231
231
  def examples
232
232
  @examples ||= begin
233
233
  examples = pending.shift_bucket
234
- maximum_completion_threshold = (Time.now + ((pending.run_time_bucket_maximum || 30) * 2)).to_i
234
+ bucket_run_time_total = examples.map { |example| example.fetch(:expected_run_time, 10.0) }.compact.sum * 2
235
+ maximum_completion_threshold = (pending.run_time_bucket_maximum || 30.0) * 2
236
+ completion_threshold = Time.now + [bucket_run_time_total, maximum_completion_threshold, 20.0].max
235
237
 
236
238
  processing_data = examples.map do |example|
237
- example_run_time_completion_threshold = (Time.now + example[:expected_run_time].to_f * 2).to_i
238
-
239
239
  [
240
- example[:id], example.merge(completion_threshold: [maximum_completion_threshold, example_run_time_completion_threshold].compact.max)
240
+ example[:id], example.merge(completion_threshold: completion_threshold.to_f)
241
241
  ]
242
242
  end
243
243
 
@@ -73,7 +73,7 @@ module Specwrk
73
73
  end
74
74
 
75
75
  def flush_log
76
- completion_formatter.examples.each { |example| json_log_file.puts example }
76
+ completion_formatter.examples.each { |example| json_log_file.puts JSON.generate(example) }
77
77
  end
78
78
 
79
79
  def json_log_file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specwrk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.1
4
+ version: 0.15.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Westendorf
@@ -202,7 +202,7 @@ files:
202
202
  - ".rspec"
203
203
  - ".standard.yml"
204
204
  - CHANGELOG.md
205
- - LICENSE.txt
205
+ - LICENSE
206
206
  - README.md
207
207
  - Rakefile
208
208
  - Specwrk.watchfile.rb
File without changes