knapsack_pro 5.0.0 → 5.1.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/CHANGELOG.md +21 -0
- data/lib/knapsack_pro/client/api/v1/build_distributions.rb +1 -1
- data/lib/knapsack_pro/client/api/v1/queues.rb +1 -1
- data/lib/knapsack_pro/config/ci/gitlab_ci.rb +1 -1
- data/lib/knapsack_pro/config/env.rb +3 -2
- data/lib/knapsack_pro/version.rb +1 -1
- data/spec/knapsack_pro/client/api/v1/build_distributions_spec.rb +4 -4
- data/spec/knapsack_pro/client/api/v1/queues_spec.rb +5 -5
- data/spec/knapsack_pro/config/env_spec.rb +12 -8
- 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: 58063b1846ea84151755a05ad9f4cca8297246b78ff0c47d140576cb0d32e19c
|
4
|
+
data.tar.gz: bf36f5e4232ae62eb835dea8f6aeb0d767f5bef88e7aabf7fea2508c8017068a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 756a63cd54c3e35e60cd09ba057c026d5ab279dab5bdd295bccfb49c6f235f68835e956171a19d9a8c5ca21db46de204e22867c879dae331fe482ffefe906189
|
7
|
+
data.tar.gz: 54e7d11084f8eab1ace9e225f0a1455dd9b391f33742cafa475b2ce144024f8509d7afcb0915f663784f0ead5407b7accee33d90acb19c44a6ab845c8507e0b5
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
### 5.1.1
|
4
|
+
|
5
|
+
* Use `KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true` as default value in Queue Mode for GitLab CI
|
6
|
+
|
7
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/206
|
8
|
+
|
9
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v5.1.0...v5.1.1
|
10
|
+
|
11
|
+
### 5.1.0
|
12
|
+
|
13
|
+
* Mask user seats data instead of hashing it
|
14
|
+
|
15
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/202
|
16
|
+
|
17
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v5.0.0...v5.1.0
|
18
|
+
|
19
|
+
|
3
20
|
### 5.0.0
|
4
21
|
|
5
22
|
* __(breaking change)__ Use `KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true` as default value in Queue Mode and use `false` for proper CI providers
|
@@ -10,6 +27,10 @@
|
|
10
27
|
|
11
28
|
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/201
|
12
29
|
|
30
|
+
__(breaking change)__ for Buildkite. You need to pass the `BUILDKITE` environment variable to Docker Compose.
|
31
|
+
|
32
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/issues/204
|
33
|
+
|
13
34
|
* Set `RAILS_ENV=test` / `RACK_ENV=test` in Queue Mode
|
14
35
|
|
15
36
|
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/199
|
@@ -15,7 +15,7 @@ module KnapsackPro
|
|
15
15
|
:node_total => args.fetch(:node_total),
|
16
16
|
:node_index => args.fetch(:node_index),
|
17
17
|
:ci_build_id => KnapsackPro::Config::Env.ci_node_build_id,
|
18
|
-
:user_seat => KnapsackPro::Config::Env.
|
18
|
+
:user_seat => KnapsackPro::Config::Env.masked_user_seat,
|
19
19
|
}
|
20
20
|
|
21
21
|
unless request_hash[:cache_read_attempt]
|
@@ -16,7 +16,7 @@ module KnapsackPro
|
|
16
16
|
:node_total => args.fetch(:node_total),
|
17
17
|
:node_index => args.fetch(:node_index),
|
18
18
|
:node_build_id => KnapsackPro::Config::Env.ci_node_build_id,
|
19
|
-
:user_seat => KnapsackPro::Config::Env.
|
19
|
+
:user_seat => KnapsackPro::Config::Env.masked_user_seat,
|
20
20
|
}
|
21
21
|
|
22
22
|
if request_hash[:can_initialize_queue] && !request_hash[:attempt_connect_to_queue]
|
data/lib/knapsack_pro/version.rb
CHANGED
@@ -6,7 +6,7 @@ describe KnapsackPro::Client::API::V1::BuildDistributions do
|
|
6
6
|
let(:node_total) { double }
|
7
7
|
let(:node_index) { double }
|
8
8
|
let(:ci_build_id) { double }
|
9
|
-
let(:
|
9
|
+
let(:masked_user_seat) { double }
|
10
10
|
let(:test_files) { double }
|
11
11
|
|
12
12
|
subject do
|
@@ -23,7 +23,7 @@ describe KnapsackPro::Client::API::V1::BuildDistributions do
|
|
23
23
|
before do
|
24
24
|
expect(KnapsackPro::Config::Env).to receive(:fixed_test_suite_split).and_return(fixed_test_suite_split)
|
25
25
|
expect(KnapsackPro::Config::Env).to receive(:ci_node_build_id).and_return(ci_build_id)
|
26
|
-
expect(KnapsackPro::Config::Env).to receive(:
|
26
|
+
expect(KnapsackPro::Config::Env).to receive(:masked_user_seat).and_return(masked_user_seat)
|
27
27
|
end
|
28
28
|
|
29
29
|
context 'when cache_read_attempt=true' do
|
@@ -42,7 +42,7 @@ describe KnapsackPro::Client::API::V1::BuildDistributions do
|
|
42
42
|
node_total: node_total,
|
43
43
|
node_index: node_index,
|
44
44
|
ci_build_id: ci_build_id,
|
45
|
-
user_seat:
|
45
|
+
user_seat: masked_user_seat,
|
46
46
|
}
|
47
47
|
}).and_return(action)
|
48
48
|
expect(subject).to eq action
|
@@ -65,7 +65,7 @@ describe KnapsackPro::Client::API::V1::BuildDistributions do
|
|
65
65
|
node_total: node_total,
|
66
66
|
node_index: node_index,
|
67
67
|
ci_build_id: ci_build_id,
|
68
|
-
user_seat:
|
68
|
+
user_seat: masked_user_seat,
|
69
69
|
test_files: test_files
|
70
70
|
}
|
71
71
|
}).and_return(action)
|
@@ -7,7 +7,7 @@ describe KnapsackPro::Client::API::V1::Queues do
|
|
7
7
|
let(:node_index) { double }
|
8
8
|
let(:test_files) { double }
|
9
9
|
let(:node_build_id) { double }
|
10
|
-
let(:
|
10
|
+
let(:masked_user_seat) { double }
|
11
11
|
|
12
12
|
subject do
|
13
13
|
described_class.queue(
|
@@ -24,7 +24,7 @@ describe KnapsackPro::Client::API::V1::Queues do
|
|
24
24
|
before do
|
25
25
|
expect(KnapsackPro::Config::Env).to receive(:fixed_queue_split).and_return(fixed_queue_split)
|
26
26
|
expect(KnapsackPro::Config::Env).to receive(:ci_node_build_id).and_return(node_build_id)
|
27
|
-
expect(KnapsackPro::Config::Env).to receive(:
|
27
|
+
expect(KnapsackPro::Config::Env).to receive(:masked_user_seat).and_return(masked_user_seat)
|
28
28
|
end
|
29
29
|
|
30
30
|
context 'when can_initialize_queue=true and attempt_connect_to_queue=true' do
|
@@ -45,7 +45,7 @@ describe KnapsackPro::Client::API::V1::Queues do
|
|
45
45
|
node_total: node_total,
|
46
46
|
node_index: node_index,
|
47
47
|
node_build_id: node_build_id,
|
48
|
-
user_seat:
|
48
|
+
user_seat: masked_user_seat,
|
49
49
|
}
|
50
50
|
}).and_return(action)
|
51
51
|
expect(subject).to eq action
|
@@ -70,7 +70,7 @@ describe KnapsackPro::Client::API::V1::Queues do
|
|
70
70
|
node_total: node_total,
|
71
71
|
node_index: node_index,
|
72
72
|
node_build_id: node_build_id,
|
73
|
-
user_seat:
|
73
|
+
user_seat: masked_user_seat,
|
74
74
|
test_files: test_files
|
75
75
|
}
|
76
76
|
}).and_return(action)
|
@@ -96,7 +96,7 @@ describe KnapsackPro::Client::API::V1::Queues do
|
|
96
96
|
node_total: node_total,
|
97
97
|
node_index: node_index,
|
98
98
|
node_build_id: node_build_id,
|
99
|
-
user_seat:
|
99
|
+
user_seat: masked_user_seat,
|
100
100
|
}
|
101
101
|
}).and_return(action)
|
102
102
|
expect(subject).to eq action
|
@@ -207,22 +207,26 @@ describe KnapsackPro::Config::Env do
|
|
207
207
|
end
|
208
208
|
end
|
209
209
|
|
210
|
-
describe '.
|
211
|
-
subject { described_class.
|
210
|
+
describe '.masked_seat_hash' do
|
211
|
+
subject { described_class.masked_user_seat }
|
212
212
|
|
213
213
|
before do
|
214
214
|
expect(described_class).to receive(:user_seat).at_least(1).and_return(user_seat)
|
215
215
|
end
|
216
216
|
|
217
|
-
context 'when the user seat
|
217
|
+
context 'when the user seat is a name' do
|
218
218
|
let(:user_seat) { 'John Doe' }
|
219
219
|
|
220
|
-
it
|
221
|
-
|
222
|
-
|
220
|
+
it { expect(subject).to eq 'Jo** Do*' }
|
221
|
+
end
|
222
|
+
|
223
|
+
context 'when the user seat is an e-mail' do
|
224
|
+
let(:user_seat) { 'john.doe@example.com' }
|
225
|
+
|
226
|
+
it { expect(subject).to eq 'jo**.do*@ex*****.co*' }
|
223
227
|
end
|
224
228
|
|
225
|
-
context 'when the user seat
|
229
|
+
context 'when the user seat is nil' do
|
226
230
|
let(:user_seat) { nil }
|
227
231
|
|
228
232
|
it { expect(subject).to be_nil }
|
@@ -724,7 +728,7 @@ describe KnapsackPro::Config::Env do
|
|
724
728
|
['Codefresh', { 'CF_BUILD_ID' => '123' }, false],
|
725
729
|
['Codeship', { 'CI_NAME' => 'codeship' }, true],
|
726
730
|
['GitHub Actions', { 'GITHUB_ACTIONS' => 'true' }, true],
|
727
|
-
['GitLab CI', { 'GITLAB_CI' => 'true' },
|
731
|
+
['GitLab CI', { 'GITLAB_CI' => 'true' }, true],
|
728
732
|
['Heroku CI', { 'HEROKU_TEST_RUN_ID' => '123' }, false],
|
729
733
|
['Semaphore CI 1.0', { 'SEMAPHORE_BUILD_NUMBER' => '123' }, false],
|
730
734
|
['Semaphore CI 2.0', { 'SEMAPHORE' => 'true', 'SEMAPHORE_WORKFLOW_ID' => '123' }, false],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knapsack_pro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|