record_store 6.2.1 → 6.3.0
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/.travis.yml +1 -1
- data/CHANGELOG.md +12 -0
- data/README.md +4 -0
- data/dev.yml +1 -1
- data/lib/record_store/version.rb +1 -1
- data/lib/record_store/zone.rb +9 -4
- 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: 6476b30f3ef1df05642b1645783e2186e8ca6a3f489d99c4724fb252d6b26b97
         | 
| 4 | 
            +
              data.tar.gz: 84ddb2d0e34076198bc1df633ab51714253c8c4ced05ef8b5b60eb777714eacb
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: '01136420252835b0ce65abf03d0466f88f879cf52c55f1db5e3db0753121bd55610c78fec31ee552b0d95c02b1922e8aefd4d91679872b1f16af16188fff0cde'
         | 
| 7 | 
            +
              data.tar.gz: 512eb4f464314c298c07367e52dc9a3e6cec126da174f19c52cd4d32c12be7ab1d1a565c653b6f853a346582db9076e078ee530914272c1fbf6317306c911176
         | 
    
        data/.travis.yml
    CHANGED
    
    
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -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
    
    
    
        data/lib/record_store/version.rb
    CHANGED
    
    
    
        data/lib/record_store/zone.rb
    CHANGED
    
    | @@ -45,13 +45,18 @@ module RecordStore | |
| 45 45 | 
             
                    end
         | 
| 46 46 | 
             
                  end
         | 
| 47 47 |  | 
| 48 | 
            -
                   | 
| 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.. | 
| 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 | 
| 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 | 
| 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. | 
| 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- | 
| 12 | 
            +
            date: 2020-08-31 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: thor
         |