knapsack_pro 10.0.0 → 10.0.1
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/lib/knapsack_pro/client/api/v2/queues.rb +1 -1
- data/lib/knapsack_pro/config/env.rb +0 -5
- data/lib/knapsack_pro/formatters/time_tracker.rb +3 -1
- data/lib/knapsack_pro/queue_allocator.rb +9 -7
- data/lib/knapsack_pro/runners/queue/rspec_runner.rb +0 -1
- data/lib/knapsack_pro/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: df1bd6fed96717579eafe72fc0587d8be51fc0542eecce91b663e37c8a239235
|
|
4
|
+
data.tar.gz: ac1c8349e0285f2f45d25690a3a5f4a237f8a61d221ba66946fead53e3a2b3bb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a7bd6ebbfd0760f8423207d2927d7f170fa1b81279ea0b4517d5727bf09195364b5aa4f8963cd6126120e18331385bab62c0bfd3d774bd36de7a9c8c32fccb54
|
|
7
|
+
data.tar.gz: 52b6553e650532ea35db97663d7619a7e34f9b8040ce9d50d000a0ef18fcf632e1a2e0c75e33e3c9227ae5dd51fce7bcaeac9d8a7c36a0a9cec0c23e97b1b377
|
|
@@ -18,7 +18,7 @@ module KnapsackPro
|
|
|
18
18
|
fixed_queue_split: KnapsackPro::Config::Env.fixed_queue_split_?,
|
|
19
19
|
node_index: args.fetch(:node_index),
|
|
20
20
|
node_total: args.fetch(:node_total),
|
|
21
|
-
node_uuid:
|
|
21
|
+
node_uuid: args.fetch(:node_uuid),
|
|
22
22
|
test_queue_id: KnapsackPro::Config::Env.test_queue_id,
|
|
23
23
|
user_seat: KnapsackPro::Config::Env.masked_user_seat
|
|
24
24
|
}
|
|
@@ -285,11 +285,6 @@ module KnapsackPro
|
|
|
285
285
|
raise("Missing test_queue_id. See: #{KnapsackPro::Urls::KNAPSACK_PRO_TEST_QUEUE_ID}")
|
|
286
286
|
end
|
|
287
287
|
|
|
288
|
-
def node_uuid
|
|
289
|
-
env_name = 'KNAPSACK_PRO_NODE_UUID'
|
|
290
|
-
ENV[env_name] || raise("Missing environment variable #{env_name}. Please report this as a bug: #{KnapsackPro::Urls::SUPPORT}")
|
|
291
|
-
end
|
|
292
|
-
|
|
293
288
|
private
|
|
294
289
|
|
|
295
290
|
def required_env(env_name)
|
|
@@ -35,10 +35,12 @@ module KnapsackPro
|
|
|
35
35
|
paths =
|
|
36
36
|
examples_by_file_path.flat_map do |file_path, examples|
|
|
37
37
|
failed_id_paths = examples.filter { |example| example.execution_result.status.to_s == "failed" }.map(&:id)
|
|
38
|
-
|
|
38
|
+
next [] if failed_id_paths.none?
|
|
39
|
+
next file_path if KnapsackPro::Config::Env.test_files_encrypted?
|
|
39
40
|
# Other nodes may have run some examples from this file, it's not safe to compact.
|
|
40
41
|
next failed_id_paths if rspec_split_by_test_example?(file_path)
|
|
41
42
|
next file_path if failed_id_paths.size == examples.size
|
|
43
|
+
|
|
42
44
|
failed_id_paths
|
|
43
45
|
end
|
|
44
46
|
|
|
@@ -48,6 +48,7 @@ module KnapsackPro
|
|
|
48
48
|
@fallback_mode = false
|
|
49
49
|
@batch_index = -1
|
|
50
50
|
@batch_id = nil
|
|
51
|
+
@node_uuid = SecureRandom.uuid
|
|
51
52
|
end
|
|
52
53
|
|
|
53
54
|
def test_file_paths(can_initialize_queue, executed_test_files, batch_uuid: SecureRandom.uuid, time_tracker: nil)
|
|
@@ -111,16 +112,17 @@ module KnapsackPro
|
|
|
111
112
|
end
|
|
112
113
|
|
|
113
114
|
KnapsackPro::Client::API::V2::Queues.queue(
|
|
114
|
-
can_initialize_queue: can_initialize_queue,
|
|
115
115
|
attempt_connect_to_queue: attempt_connect_to_queue,
|
|
116
|
-
|
|
116
|
+
batch_id: @batch_id,
|
|
117
|
+
batch_index: @batch_index,
|
|
117
118
|
branch: encrypted_branch,
|
|
118
|
-
|
|
119
|
+
can_initialize_queue: can_initialize_queue,
|
|
120
|
+
commit_hash: repository_adapter.commit_hash,
|
|
121
|
+
failed_paths: KnapsackPro::Crypto::Encryptor.paths(time_tracker.current_batch_failed_paths),
|
|
119
122
|
node_index: ci_node_index,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
batch_id: @batch_id
|
|
123
|
+
node_total: ci_node_total,
|
|
124
|
+
node_uuid: @node_uuid,
|
|
125
|
+
paths: paths
|
|
124
126
|
)
|
|
125
127
|
end
|
|
126
128
|
|
|
@@ -13,7 +13,6 @@ module KnapsackPro
|
|
|
13
13
|
KnapsackPro::Extensions::RSpecExtension.setup!
|
|
14
14
|
|
|
15
15
|
ENV['KNAPSACK_PRO_TEST_SUITE_TOKEN'] = KnapsackPro::Config::Env.test_suite_token_rspec
|
|
16
|
-
ENV['KNAPSACK_PRO_NODE_UUID'] = SecureRandom.uuid
|
|
17
16
|
|
|
18
17
|
rspec_pure = KnapsackPro::Pure::Queue::RSpecPure.new
|
|
19
18
|
|
data/lib/knapsack_pro/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: knapsack_pro
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 10.0.
|
|
4
|
+
version: 10.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ArturT
|
|
@@ -321,7 +321,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
321
321
|
- !ruby/object:Gem::Version
|
|
322
322
|
version: '0'
|
|
323
323
|
requirements: []
|
|
324
|
-
rubygems_version: 4.0.
|
|
324
|
+
rubygems_version: 4.0.10
|
|
325
325
|
specification_version: 4
|
|
326
326
|
summary: Knapsack Pro splits tests across parallel CI nodes and ensures each parallel
|
|
327
327
|
job finish work at a similar time.
|