specwrk 0.21.0 → 0.21.2
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 +9 -1
- data/lib/specwrk/cli.rb +1 -1
- data/lib/specwrk/version.rb +1 -1
- data/lib/specwrk/web/endpoints/report.rb +23 -1
- data/lib/specwrk/web/endpoints/seed.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 52b6a68ed1cf336c660524fcd9c5e668450b0ce5a28046ccfb7dc7140bf64070
|
|
4
|
+
data.tar.gz: 532ab297997be008455c5bd02cade0ff03ef86fb2b4e8a988bd3981feb08f7b2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 903e0cb393b6a7a2001336aa5792df9485b5b0975206aae3906500acafbdd88bed5d8f0ad824dc565e2b5c4a4dd48d3a3db47c19ad4b9fea3e3d2828fa987e10
|
|
7
|
+
data.tar.gz: 38056a0a56c20a5a8de5b6cacc6e161ba153c6b4466d6145c599a8ad1d1b693ee5d81e330d6f77878ecc43d9422a905afa447d5157e287f8df4e4271f069759d
|
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
|
-
[Compare](https://github.com/danielwestendorf/specwrk/compare/v0.21.
|
|
4
|
+
[Compare](https://github.com/danielwestendorf/specwrk/compare/v0.21.2...main)
|
|
5
|
+
|
|
6
|
+
## v0.21.2 — 2026-10-10
|
|
7
|
+
[Compare](https://github.com/danielwestendorf/specwrk/compare/v0.21.1...v0.21.2)
|
|
8
|
+
- Cache generated reports — [#197](https://github.com/danielwestendorf/specwrk/pull/197) by [@danielwestendorf](https://github.com/danielwestendorf)
|
|
9
|
+
|
|
10
|
+
## v0.21.1 — 2026-09-29
|
|
11
|
+
[Compare](https://github.com/danielwestendorf/specwrk/compare/v0.21.0...v0.21.1)
|
|
12
|
+
- Treat any non-zero worker exit as a failure — [#196](https://github.com/danielwestendorf/specwrk/pull/196) by [@scottjacobsen](https://github.com/scottjacobsen)
|
|
5
13
|
|
|
6
14
|
## v0.21.0 — 2026-09-13
|
|
7
15
|
[Compare](https://github.com/danielwestendorf/specwrk/compare/v0.20.2...v0.21.0)
|
data/lib/specwrk/cli.rb
CHANGED
data/lib/specwrk/version.rb
CHANGED
|
@@ -7,11 +7,33 @@ module Specwrk
|
|
|
7
7
|
module Endpoints
|
|
8
8
|
class Report < Base
|
|
9
9
|
def with_response
|
|
10
|
+
cached_report = metadata[:report_json]
|
|
11
|
+
return report_response(cached_report) if cached_report
|
|
12
|
+
|
|
13
|
+
with_lock do
|
|
14
|
+
cached_report = metadata[:report_json]
|
|
15
|
+
if cached_report
|
|
16
|
+
report_response(cached_report)
|
|
17
|
+
else
|
|
18
|
+
report_json = JSON.generate(report_data)
|
|
19
|
+
metadata[:report_json] = report_json
|
|
20
|
+
report_response(report_json)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
private
|
|
26
|
+
|
|
27
|
+
def report_data
|
|
10
28
|
completed_dump = completed.dump
|
|
11
29
|
completed_dump[:meta][:unexecuted] = pending.length + processing.length
|
|
12
30
|
completed_dump[:flakes] = failure_counts.to_h.reject { |id, _count| completed_dump.dig(:examples, id, :status) == "failed" }
|
|
13
31
|
|
|
14
|
-
|
|
32
|
+
completed_dump
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def report_response(report_json)
|
|
36
|
+
[200, {"content-type" => "application/json"}, [report_json]]
|
|
15
37
|
end
|
|
16
38
|
end
|
|
17
39
|
end
|
|
@@ -17,6 +17,8 @@ module Specwrk
|
|
|
17
17
|
|
|
18
18
|
pending.max_retries = payload.fetch(:max_retries, "0").to_i
|
|
19
19
|
|
|
20
|
+
metadata.delete("report_json")
|
|
21
|
+
|
|
20
22
|
pending.update_run_time_bucket_maximum(
|
|
21
23
|
@seeds_run_time_bucket_maximum,
|
|
22
24
|
target_bucket_timing_duration: payload.fetch(:target_bucket_timing_duration, 0)
|