knapsack 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e9917104f810c3361175811b6bb1b82ebfd8503
4
- data.tar.gz: 3b07a94beca2e14f4cb98bcd1f00808edb2c294f
3
+ metadata.gz: 3e0c6e0155db9874413db7e03df64a0f62c8f185
4
+ data.tar.gz: a668e3c36473d5c6422352974b546de613e12dca
5
5
  SHA512:
6
- metadata.gz: c00e5c1c442e0c2a45f206b254de22d480a2d3ef7b3abec902878defd98857a669c2e05630b54b22226dc0511cdb779904f8965495248a84e2301ea621168076
7
- data.tar.gz: 85fbaab6ff333b3197546f8ec5808f7c16d5cbd7f408a6a0b5dd2fb36c6bcc91362fc38d7edb2943165c50e4343138db5b6ea8464dc6ce4dd492201e40df2087
6
+ metadata.gz: 62b7636c2a124a66bb7e794a55cf1af786f98a5991dbdec997a1ff9b0f8b4d189f2e12c11958598ecd68305e01df515e398eb59b0ce1bf88023033b2f6107df5
7
+ data.tar.gz: df7ac31711b33ea9b2252fe67fb2e88ec75db0679e43154adb74587456feaad26b7ad173705361ba7e7fd05547875b7392eb725e8644281b0deccbf711121861
@@ -2,6 +2,12 @@
2
2
 
3
3
  * TODO
4
4
 
5
+ ### 1.5.1
6
+
7
+ * Add link to FAQ at the end of time offset warning
8
+
9
+ https://github.com/ArturT/knapsack/compare/v1.5.0...v1.5.1
10
+
5
11
  ### 1.5.0
6
12
 
7
13
  * Add support for snap-ci.com
data/README.md CHANGED
@@ -21,7 +21,7 @@ Presentations about gem:
21
21
  * [X 2014 Kraków Ruby User Group](http://slides.com/arturt/parallel-tests-in-comparable-time)
22
22
  * [VII 2014 Lunar Logic Dev Meeting](http://slides.com/arturt/knapsack)
23
23
 
24
- **Would you like to try [knapsack_pro gem](https://github.com/KnapsackPro/knapsack_pro-ruby) with more features and free access for beta users? Please [fill the form](https://docs.google.com/forms/d/1S8b5I-W2wr4_8C0tKu9AiW9y_5vq3SW9j2MMUql-hjE/viewform?c=0&w=1&hl=en).**
24
+ **Would you like to try [knapsack_pro gem](https://github.com/KnapsackPro/knapsack_pro-ruby) with more features and free access for beta users? Please [visit Knapsack Pro](http://knapsackpro.com).**
25
25
 
26
26
  ### Without Knapsack
27
27
 
@@ -67,6 +67,7 @@ Presentations about gem:
67
67
  - [Info for snap-ci.com users](#info-for-snap-cicom-users)
68
68
  - [Step 1](#step-1-4)
69
69
  - [Step 2](#step-2-4)
70
+ - [FAQ](#faq)
70
71
  - [Gem tests](#gem-tests)
71
72
  - [Spec](#spec)
72
73
  - [Spec examples](#spec-examples)
@@ -489,6 +490,31 @@ Knapsack supports snap-ci.com ENVs `SNAP_WORKER_TOTAL` and `SNAP_WORKER_INDEX`.
489
490
  # Step for Minitest
490
491
  bundle exec rake knapsack:minitest
491
492
 
493
+ ## FAQ
494
+
495
+ * What time offset warning means?
496
+
497
+ At the end of tests execution results you can see warning like this:
498
+
499
+ ```
500
+ ========= Knapsack Time Offset Warning ==========
501
+ Time offset: 30s
502
+ Max allowed node time execution: 02m 30s
503
+ Exceeded time: 37s
504
+ ```
505
+
506
+ `Time offset: 30s` - this is the current time offset value, by default it’s 30s. Let’s assume whole test suite takes 4 minutes and you do split across 2 CI nodes so the optimal split is 2 minutes per node. Time offset 30s means when tests on single CI node will take longer than 2 minutes and 30s then you see warning about regenerating report because probably test suite files changed and the knapsack report contains old time execution data about each test file so regenerating knapsack report should help you provide a more optimal test suite split.
507
+
508
+ `Max allowed node time execution: 02m 30s` - it’s average time execution of tests per CI node + time offset. In this case average tests time execution per CI node is 2 minutes.
509
+
510
+ `Exceeded time: 37s` - it means tests on particular CI node took 37s longer than `max allowed node time execution`. Sometimes this value is negative when tests executed faster than `max allowed node time execution`.
511
+
512
+ If you want to regenerate report take a look [here](#common-step).
513
+
514
+ `KNAPSACK_GENERATE_REPORT=true bundle exec rspec spec`
515
+
516
+ If you run command like this on your development machine then test suite time execution might be different than if you generate a report on CI machine (for instance tests might be faster on your machine then on CI node) so that might be a reason why you see warning about regenerating report. You can generate the report on single CI node which should give you result specific for your CI node instead of your development machine. In case you don't want to bother about manually regenerating knapsack report please take a look on [knapsack_pro gem](http://knapsackpro.com).
517
+
492
518
  ## Gem tests
493
519
 
494
520
  ### Spec
@@ -534,3 +560,4 @@ Many thanks to [Małgorzata Nowak](https://github.com/informatykgosia) for beaut
534
560
  * Semaphore | [Running RSpec specs in parallel](https://semaphoreapp.com/docs/running-rspec-specs-in-threads.html)
535
561
  * Semaphore | [Running Cucumber scenarios in parallel](https://semaphoreapp.com/docs/running-cucumber-scenarios-in-threads.html)
536
562
  * Buildkite | [Libraries](https://buildkite.com/docs/guides/parallelizing-builds#libraries)
563
+ * Snap CI | [Knapsack: optimal test suite split based on time execution](https://docs.snap-ci.com/speeding-up-builds/test-parallelism/#parallelism-using-third-party-tools%23knapsack-optimal-test-suite-split-based-on-time-execution)
@@ -43,7 +43,7 @@ module Knapsack
43
43
  }
44
44
  if Knapsack.tracker.time_exceeded?
45
45
  str << %{
46
- Tests on this CI node took more than time offset.
46
+ Tests on this CI node took more than max allowed node time execution.
47
47
  Please regenerate your knapsack report.
48
48
  If that didn't help then split your heavy test file
49
49
  or bump time_offset_in_seconds setting.}
@@ -52,9 +52,11 @@ or bump time_offset_in_seconds setting.}
52
52
  Global time execution for this CI node is fine.
53
53
  Happy testing!}
54
54
  end
55
+ str << "\n\nNeed explanation? See FAQ:"
56
+ str << "\nhttps://github.com/ArturT/knapsack#faq"
55
57
  str << "\n=================================================\n"
56
58
  str << %{Sign up for beta Knapsack Pro here:
57
- http://knapsack.launchrock.com}
59
+ http://knapsackpro.com}
58
60
  str << "\n=================================================\n"
59
61
  str
60
62
  end
@@ -1,3 +1,3 @@
1
1
  module Knapsack
2
- VERSION = '1.5.0'
2
+ VERSION = '1.5.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knapsack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ArturT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-28 00:00:00.000000000 Z
11
+ date: 2015-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake