knapsack_pro 2.3.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/README.md +4 -3
- data/lib/knapsack_pro/crypto/branch_encryptor.rb +15 -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: be2eb19b6bc60ed03791ae1fd85b0893d85a42f96be0a584f7774174572e4982
|
4
|
+
data.tar.gz: e500f47322535c432f3cc89eed024708cf5e9e66162cecf3af5e6793d90a6794
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2303b72bfe98c25b1b7ec464f0632ce80ae20233457d990c0f92755fff63173bfad4da9dd2f9dc12873892c5157919cdd618d9b3999bef82f46242758bbc18b7
|
7
|
+
data.tar.gz: f3f49a0618a13876aaec016e3458a673a4a1ce7a6fb168f8f44409c10d00791a8e2e8c4c542f6c015951d4bcb17c2052e613dcbba69cf898f1d653818ce3eca1
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,18 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
### 2.4.0
|
4
|
+
|
5
|
+
* Update list of non encryptable branches
|
6
|
+
|
7
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/125
|
8
|
+
|
9
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v2.3.0...v2.4.0
|
10
|
+
|
3
11
|
### 2.3.0
|
4
12
|
|
5
13
|
* When you use Regular Mode then try 6 attempts to connect to the API instead of 3 attempts
|
6
14
|
|
7
|
-
Add `KNAPSACK_PRO_MAX_REQUEST_RETRIES` environment variable to let user define their own number of request retries to the API. It is useful to set it to `0` for [forked repos](https://knapsackpro.com/faq/question/how-to-make-knapsack_pro-works-for-forked-repositories-of-my-project) when you want to
|
15
|
+
Add `KNAPSACK_PRO_MAX_REQUEST_RETRIES` environment variable to let user define their own number of request retries to the API. It is useful to set it to `0` for [forked repos](https://knapsackpro.com/faq/question/how-to-make-knapsack_pro-works-for-forked-repositories-of-my-project) when you want to rely on Fallback Mode.
|
8
16
|
|
9
17
|
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/124
|
10
18
|
|
data/README.md
CHANGED
@@ -2320,7 +2320,7 @@ There are a few ways to reproduce tests executed on CI node in your development
|
|
2320
2320
|
|
2321
2321
|
##### for knapsack_pro regular mode
|
2322
2322
|
|
2323
|
-
knapsack_pro gem will retry requests to Knapsack Pro API multiple times every few seconds till it
|
2323
|
+
knapsack_pro gem will retry requests to Knapsack Pro API multiple times every few seconds till it switches to fallback behavior (Fallback Mode) and it will split test files across CI nodes based on popular test directory names. When knapsack_pro starts Fallback Mode then you will see a warning in the output.
|
2324
2324
|
|
2325
2325
|
Note there is an unlikely scenario when some of the CI nodes may start in Fallback Mode but others don't and then it could happen that some of test files might be skipped. You should [read this to learn more](https://github.com/KnapsackPro/knapsack_pro-ruby/pull/124) and decide if you like to use Fallback Mode when running tests with knapsack_pro Regular Mode.
|
2326
2326
|
|
@@ -2330,7 +2330,7 @@ If your CI provider allows to retry only one of parallel CI nodes then please [r
|
|
2330
2330
|
|
2331
2331
|
knapsack_pro gem will retry requests to Knapsack Pro API multiple times every few seconds till it switches to fallback behavior (Fallback Mode) and it will split test files across CI nodes based on popular test directory names.
|
2332
2332
|
|
2333
|
-
Note that if one of the CI nodes
|
2333
|
+
Note that if one of the CI nodes loses connection to Knapsack Pro API but others don't, then some of the test files may be executed on multiple CI nodes. **Fallback Mode guarantees each of the test files is run at least once across CI nodes when you use knapsack_pro in Queue Mode.** Thanks to that we know if the whole test suite is green or not. When knapsack_pro starts Fallback Mode then you will see a warning in the output.
|
2334
2334
|
|
2335
2335
|
If your CI provider allows to retry only one of parallel CI nodes then please [read about this edge case as well](#required-ci-configuration-if-you-use-retry-single-failed-ci-node-feature-on-your-ci-server-when-knapsack_pro_fixed_queue_splittrue-in-queue-mode-or-knapsack_pro_fixed_test_suite_splittrue-in-regular-mode).
|
2336
2336
|
|
@@ -2472,12 +2472,13 @@ Below example is for rspec. You can change `$KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC
|
|
2472
2472
|
if [ "$KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC" = "" ]; then
|
2473
2473
|
KNAPSACK_PRO_ENDPOINT=https://api-disabled-for-fork.knapsackpro.com \
|
2474
2474
|
KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC=disabled-for-fork \
|
2475
|
+
KNAPSACK_PRO_MAX_REQUEST_RETRIES=0 \
|
2475
2476
|
bundle exec rake knapsack_pro:rspec # use Regular Mode here always
|
2476
2477
|
else
|
2477
2478
|
# Regular Mode
|
2478
2479
|
bundle exec rake knapsack_pro:rspec
|
2479
2480
|
|
2480
|
-
#
|
2481
|
+
# or you can use Queue Mode instead of Regular Mode if you like
|
2481
2482
|
# bundle exec rake knapsack_pro:queue:rspec
|
2482
2483
|
fi
|
2483
2484
|
```
|
@@ -1,7 +1,21 @@
|
|
1
1
|
module KnapsackPro
|
2
2
|
module Crypto
|
3
3
|
class BranchEncryptor
|
4
|
-
NON_ENCRYPTABLE_BRANCHES =
|
4
|
+
NON_ENCRYPTABLE_BRANCHES = [
|
5
|
+
'master',
|
6
|
+
'main',
|
7
|
+
'develop',
|
8
|
+
'development',
|
9
|
+
'dev',
|
10
|
+
'staging',
|
11
|
+
# GitHub Actions has branch names starting with refs/heads/
|
12
|
+
'refs/heads/master',
|
13
|
+
'refs/heads/main',
|
14
|
+
'refs/heads/develop',
|
15
|
+
'refs/heads/development',
|
16
|
+
'refs/heads/dev',
|
17
|
+
'refs/heads/staging',
|
18
|
+
]
|
5
19
|
|
6
20
|
def self.call(branch)
|
7
21
|
if KnapsackPro::Config::Env.branch_encrypted?
|
data/lib/knapsack_pro/version.rb
CHANGED
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: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|