specwrk 0.15.2 → 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 +4 -4
- data/CHANGELOG.md +114 -0
- data/README.md +17 -0
- data/lib/specwrk/list_examples.rb +2 -0
- data/lib/specwrk/version.rb +1 -1
- data/lib/specwrk/web/endpoints.rb +4 -4
- metadata +2 -2
- /data/{LICENSE.txt → LICENSE} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dfdda735e233530059c547ef897824d74169be0a5bbd95e806b69902aafe984
|
4
|
+
data.tar.gz: 101e932e579f2f3e396b4e93e0ce9f4cb1f2675fe972b113b0a2280f69e3d15b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
data/lib/specwrk/version.rb
CHANGED
@@ -231,13 +231,13 @@ module Specwrk
|
|
231
231
|
def examples
|
232
232
|
@examples ||= begin
|
233
233
|
examples = pending.shift_bucket
|
234
|
-
|
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:
|
240
|
+
example[:id], example.merge(completion_threshold: completion_threshold.to_f)
|
241
241
|
]
|
242
242
|
end
|
243
243
|
|
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.
|
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
|
205
|
+
- LICENSE
|
206
206
|
- README.md
|
207
207
|
- Rakefile
|
208
208
|
- Specwrk.watchfile.rb
|
/data/{LICENSE.txt → LICENSE}
RENAMED
File without changes
|