record_store 6.2.1 → 6.3.0

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
  SHA256:
3
- metadata.gz: f2933700da7288ff5085d9865364776031896ea9efada8cf75fea37e5edb27b1
4
- data.tar.gz: 5d1420e6df2c086d7d98ce655f8b8512bd65467ff4825a6f00b628b16b5fa180
3
+ metadata.gz: 6476b30f3ef1df05642b1645783e2186e8ca6a3f489d99c4724fb252d6b26b97
4
+ data.tar.gz: 84ddb2d0e34076198bc1df633ab51714253c8c4ced05ef8b5b60eb777714eacb
5
5
  SHA512:
6
- metadata.gz: eee575d27faa042e9db956aa842b5d0f8a35aac56784cff7369a56970554f0430cdec4dbd67d904364a97bf5f53d5769dbf3ff8f46db4c5ce3822a8d1c39412d
7
- data.tar.gz: 796fcd383e7df7621f21b63356c7634afb0a8a71447f0775801ec93297bd5754f48250fd28390cbfde412fe1a51d85329d8f0fd0f5358073810a98fa1ad08e2b
6
+ metadata.gz: '01136420252835b0ce65abf03d0466f88f879cf52c55f1db5e3db0753121bd55610c78fec31ee552b0d95c02b1922e8aefd4d91679872b1f16af16188fff0cde'
7
+ data.tar.gz: 512eb4f464314c298c07367e52dc9a3e6cec126da174f19c52cd4d32c12be7ab1d1a565c653b6f853a346582db9076e078ee530914272c1fbf6317306c911176
@@ -1,7 +1,7 @@
1
1
  cache: bundler
2
2
  language: ruby
3
3
  rvm:
4
- - 2.4.3
4
+ - 2.6.4
5
5
 
6
6
  before_install:
7
7
  - gem update --system
@@ -1,5 +1,17 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 6.3.0
4
+ - Support for configurable number of threads via environment variable [FEATURE]
5
+
6
+ ## 6.2.1
7
+ - Improved error reporting after timeouts [FEATURE]
8
+
9
+ ## 6.2.0
10
+ - Add validation for non-terminal conflict with wildcard [FEATURE]
11
+
12
+ ## 6.1.2
13
+ - Retry on connection errors [FEATURE]
14
+
3
15
  ## 6.1.1
4
16
  - Emit messages when waiting for rate-limit to elapse for DNSimple and NS1 providers, so deployment does not timeout [BUGFIX]
5
17
 
data/README.md CHANGED
@@ -112,6 +112,10 @@ Changesets are how Record Store knows what updates to make. A `Changeset` is gen
112
112
 
113
113
  When running `bin/record-store apply`, a `Changeset` is generated by comparing the current records in a zone's YAML file with the records the provider defines. A zone's YAML file is always considered the primary source of truth.
114
114
 
115
+ ### Parallelism
116
+
117
+ Record store attempts to parallelize some of the bulk zone fetching operations. It does so by spawning multiple threads (default: 10). This value can be configured by setting the RECORD_STORE_MAX_THREADS environment variable to a positive integer value.
118
+
115
119
  ----
116
120
 
117
121
  # Development
data/dev.yml CHANGED
@@ -2,7 +2,7 @@
2
2
  name: recordstore
3
3
 
4
4
  up:
5
- - ruby: 2.5.0
5
+ - ruby: 2.6.4
6
6
  - bundler
7
7
 
8
8
  commands:
@@ -1,3 +1,3 @@
1
1
  module RecordStore
2
- VERSION = '6.2.1'.freeze
2
+ VERSION = '6.3.0'.freeze
3
3
  end
@@ -45,13 +45,18 @@ module RecordStore
45
45
  end
46
46
  end
47
47
 
48
- MAX_PARALLEL_THREADS = 10
48
+ DEFAULT_MAX_PARALLEL_THREADS = 10
49
+
50
+ def max_parallel_threads
51
+ (ENV['RECORD_STORE_MAX_THREADS'] || DEFAULT_MAX_PARALLEL_THREADS).to_i
52
+ end
53
+
49
54
  def modified(verbose: false) # rubocop:disable Lint/UnusedMethodArgument
50
55
  modified_zones = []
51
56
  mutex = Mutex.new
52
57
  zones = all
53
58
 
54
- (1..MAX_PARALLEL_THREADS).map do
59
+ (1..max_parallel_threads).map do
55
60
  Thread.new do
56
61
  current_zone = nil
57
62
  while zones.any?
@@ -267,11 +272,11 @@ module RecordStore
267
272
  suffix = wildcard[1..-1]
268
273
 
269
274
  terminal_records = records.map(&:fqdn)
270
- .select { |record| record.match?(/^([a-zA-Z0-9-_]+\.[a-zA-Z0-9-_])#{Regexp.escape(suffix)}$/) }
275
+ .select { |record| record.match?(/^([a-zA-Z0-9\-_]+\.[a-zA-Z0-9\-_])#{Regexp.escape(suffix)}$/) }
271
276
  next unless terminal_records.any?
272
277
 
273
278
  intermediate_records = records.map(&:fqdn)
274
- .select { |record| record.match?(/^([a-zA-Z0-9-_]+)#{Regexp.escape(suffix)}$/) }
279
+ .select { |record| record.match?(/^([a-zA-Z0-9\-_]+)#{Regexp.escape(suffix)}$/) }
275
280
  terminal_records.each do |terminal_record|
276
281
  non_terminal = terminal_record.partition('.').last
277
282
  errors.add(:records, "found empty non-terminal #{non_terminal} "\
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: record_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.1
4
+ version: 6.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Willem van Bergen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-08-27 00:00:00.000000000 Z
12
+ date: 2020-08-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor