splitclient-rb 8.3.1.pre.rc1-java → 8.3.2.pre.rc2-java
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/CHANGES.txt +2 -1
 - data/lib/splitclient-rb/cache/repositories/events/memory_repository.rb +4 -0
 - data/lib/splitclient-rb/cache/repositories/events_repository.rb +4 -0
 - data/lib/splitclient-rb/cache/repositories/splits_repository.rb +42 -1
 - data/lib/splitclient-rb/clients/split_client.rb +10 -1
 - data/lib/splitclient-rb/sse/notification_manager_keeper.rb +2 -2
 - data/lib/splitclient-rb/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: bc4f2e19abe6e79a942ce7806d833d639aaf0e0e
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 001c55c50084095442e4c0955ef885dc42e6d995
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 82c9886635f7c1fbfabae4636b6771e97b600538975f0bbd8a0d5334570e626e2c380b0f2c4b42d56997ec90fff9eb4bb76fedcb68f17adc56967291390378be
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: c25fbf094b5a2e70ea22f2ecf1ac29c049a2a13b4f37bba68befd2b3f572feb63f7414869bb00ecda19d8056032577525418dc42eb0eceed8d7f61f00be66985
         
     | 
    
        data/CHANGES.txt
    CHANGED
    
    | 
         @@ -1,7 +1,8 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            CHANGES
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
      
 3 
     | 
    
         
            +
            8.3.1 (Mar 22, 2024)
         
     | 
| 
       4 
4 
     | 
    
         
             
            - Fixed ruby process hanging due to failed thread.join command, when calling destroy and a http request still active.
         
     | 
| 
      
 5 
     | 
    
         
            +
            - Fixed streaming notification parser. Issue ref: https://github.com/splitio/ruby-client/issues/511
         
     | 
| 
       5 
6 
     | 
    
         | 
| 
       6 
7 
     | 
    
         
             
            8.3.0 (Dec 11, 2023)
         
     | 
| 
       7 
8 
     | 
    
         
             
            - Added support for Flag Sets on the SDK, which enables grouping feature flags and interacting with the group rather than individually (more details in our documentation):
         
     | 
| 
         @@ -5,7 +5,32 @@ module SplitIoClient 
     | 
|
| 
       5 
5 
     | 
    
         
             
                module Repositories
         
     | 
| 
       6 
6 
     | 
    
         
             
                  class SplitsRepository < Repository
         
     | 
| 
       7 
7 
     | 
    
         
             
                    attr_reader :adapter
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
      
 8 
     | 
    
         
            +
                    DEFAULT_CONDITIONS_TEMPLATE = [{
         
     | 
| 
      
 9 
     | 
    
         
            +
                      conditionType: "ROLLOUT",
         
     | 
| 
      
 10 
     | 
    
         
            +
                      matcherGroup: {
         
     | 
| 
      
 11 
     | 
    
         
            +
                          combiner: "AND",
         
     | 
| 
      
 12 
     | 
    
         
            +
                          matchers: [
         
     | 
| 
      
 13 
     | 
    
         
            +
                          {
         
     | 
| 
      
 14 
     | 
    
         
            +
                              keySelector: nil,
         
     | 
| 
      
 15 
     | 
    
         
            +
                              matcherType: "ALL_KEYS",
         
     | 
| 
      
 16 
     | 
    
         
            +
                              negate: false,
         
     | 
| 
      
 17 
     | 
    
         
            +
                              userDefinedSegmentMatcherData: nil,
         
     | 
| 
      
 18 
     | 
    
         
            +
                              whitelistMatcherData: nil,
         
     | 
| 
      
 19 
     | 
    
         
            +
                              unaryNumericMatcherData: nil,
         
     | 
| 
      
 20 
     | 
    
         
            +
                              betweenMatcherData: nil,
         
     | 
| 
      
 21 
     | 
    
         
            +
                              dependencyMatcherData: nil,
         
     | 
| 
      
 22 
     | 
    
         
            +
                              booleanMatcherData: nil,
         
     | 
| 
      
 23 
     | 
    
         
            +
                              stringMatcherData: nil
         
     | 
| 
      
 24 
     | 
    
         
            +
                          }]
         
     | 
| 
      
 25 
     | 
    
         
            +
                      },
         
     | 
| 
      
 26 
     | 
    
         
            +
                      partitions: [
         
     | 
| 
      
 27 
     | 
    
         
            +
                          {
         
     | 
| 
      
 28 
     | 
    
         
            +
                          treatment: "control",
         
     | 
| 
      
 29 
     | 
    
         
            +
                          size: 100
         
     | 
| 
      
 30 
     | 
    
         
            +
                          }
         
     | 
| 
      
 31 
     | 
    
         
            +
                      ],
         
     | 
| 
      
 32 
     | 
    
         
            +
                      label: "unsupported matcher type"
         
     | 
| 
      
 33 
     | 
    
         
            +
                  }]
         
     | 
| 
       9 
34 
     | 
    
         
             
                    def initialize(config, flag_sets_repository, flag_set_filter)
         
     | 
| 
       10 
35 
     | 
    
         
             
                      super(config)
         
     | 
| 
       11 
36 
     | 
    
         
             
                      @tt_cache = {}
         
     | 
| 
         @@ -155,6 +180,10 @@ module SplitIoClient 
     | 
|
| 
       155 
180 
     | 
    
         
             
                        remove_from_flag_sets(existing_split)
         
     | 
| 
       156 
181 
     | 
    
         
             
                      end
         
     | 
| 
       157 
182 
     | 
    
         | 
| 
      
 183 
     | 
    
         
            +
                      if check_undefined_matcher(split)
         
     | 
| 
      
 184 
     | 
    
         
            +
                        @config.logger.warn("Feature Flag #{split[:name]} has undefined matcher, setting conditions to default template.")
         
     | 
| 
      
 185 
     | 
    
         
            +
                        split[:conditions] = SplitsRepository::DEFAULT_CONDITIONS_TEMPLATE
         
     | 
| 
      
 186 
     | 
    
         
            +
                      end
         
     | 
| 
       158 
187 
     | 
    
         
             
                      if !split[:sets].nil?
         
     | 
| 
       159 
188 
     | 
    
         
             
                        for flag_set in split[:sets]
         
     | 
| 
       160 
189 
     | 
    
         
             
                          if !@flag_sets.flag_set_exist?(flag_set)
         
     | 
| 
         @@ -170,6 +199,18 @@ module SplitIoClient 
     | 
|
| 
       170 
199 
     | 
    
         
             
                      @adapter.set_string(namespace_key(".split.#{split[:name]}"), split.to_json)
         
     | 
| 
       171 
200 
     | 
    
         
             
                    end
         
     | 
| 
       172 
201 
     | 
    
         | 
| 
      
 202 
     | 
    
         
            +
                    def check_undefined_matcher(split)
         
     | 
| 
      
 203 
     | 
    
         
            +
                      for condition in split[:conditions]
         
     | 
| 
      
 204 
     | 
    
         
            +
                        for matcher in condition[:matcherGroup][:matchers]
         
     | 
| 
      
 205 
     | 
    
         
            +
                          if !SplitIoClient::Condition.instance_methods(false).map(&:to_s).include?("matcher_#{matcher[:matcherType].downcase}")
         
     | 
| 
      
 206 
     | 
    
         
            +
                            @config.logger.error("Detected undefined matcher #{matcher[:matcherType].downcase} in feature flag #{split[:name]}")
         
     | 
| 
      
 207 
     | 
    
         
            +
                            return true
         
     | 
| 
      
 208 
     | 
    
         
            +
                          end
         
     | 
| 
      
 209 
     | 
    
         
            +
                        end
         
     | 
| 
      
 210 
     | 
    
         
            +
                      end
         
     | 
| 
      
 211 
     | 
    
         
            +
                      return false
         
     | 
| 
      
 212 
     | 
    
         
            +
                    end
         
     | 
| 
      
 213 
     | 
    
         
            +
             
     | 
| 
       173 
214 
     | 
    
         
             
                    def remove_feature_flag(split)
         
     | 
| 
       174 
215 
     | 
    
         
             
                      decrease_tt_name_count(split[:trafficTypeName])
         
     | 
| 
       175 
216 
     | 
    
         
             
                      remove_from_flag_sets(split)
         
     | 
| 
         @@ -96,7 +96,16 @@ module SplitIoClient 
     | 
|
| 
       96 
96 
     | 
    
         | 
| 
       97 
97 
     | 
    
         
             
                def destroy
         
     | 
| 
       98 
98 
     | 
    
         
             
                  @config.logger.info('Split client shutdown started...') if @config.debug_enabled
         
     | 
| 
       99 
     | 
    
         
            -
             
     | 
| 
      
 99 
     | 
    
         
            +
                  if !@config.cache_adapter.is_a?(SplitIoClient::Cache::Adapters::RedisAdapter) && @config.impressions_mode != :none &&
         
     | 
| 
      
 100 
     | 
    
         
            +
                      (!@impressions_repository.empty? || !@events_repository.empty?)
         
     | 
| 
      
 101 
     | 
    
         
            +
                    @config.logger.debug("Impressions and/or Events cache is not empty")
         
     | 
| 
      
 102 
     | 
    
         
            +
                    # Adding small delay to ensure sender threads are fully running
         
     | 
| 
      
 103 
     | 
    
         
            +
                    sleep(0.1)
         
     | 
| 
      
 104 
     | 
    
         
            +
                    if !@config.threads.key?(:impressions_sender) || !@config.threads.key?(:events_sender)
         
     | 
| 
      
 105 
     | 
    
         
            +
                      @config.logger.debug("Periodic data recording thread has not started yet, waiting for service startup.")
         
     | 
| 
      
 106 
     | 
    
         
            +
                      @config.threads[:start_sdk].join(5) if @config.threads.key?(:start_sdk)
         
     | 
| 
      
 107 
     | 
    
         
            +
                    end
         
     | 
| 
      
 108 
     | 
    
         
            +
                  end
         
     | 
| 
       100 
109 
     | 
    
         
             
                  @config.threads.select { |name, thread| name.to_s.end_with? 'sender' }.values.each do |thread|
         
     | 
| 
       101 
110 
     | 
    
         
             
                    thread.raise(SplitIoClient::SDKShutdownException)
         
     | 
| 
       102 
111 
     | 
    
         
             
                    thread.join
         
     | 
| 
         @@ -14,8 +14,8 @@ module SplitIoClient 
     | 
|
| 
       14 
14 
     | 
    
         
             
                    @telemetry_runtime_producer = telemetry_runtime_producer
         
     | 
| 
       15 
15 
     | 
    
         
             
                    @status_queue = status_queue
         
     | 
| 
       16 
16 
     | 
    
         
             
                    @publisher_available = Concurrent::AtomicBoolean.new(true)
         
     | 
| 
       17 
     | 
    
         
            -
                    @publishers_pri = Concurrent::AtomicFixnum.new
         
     | 
| 
       18 
     | 
    
         
            -
                    @publishers_sec = Concurrent::AtomicFixnum.new
         
     | 
| 
      
 17 
     | 
    
         
            +
                    @publishers_pri = Concurrent::AtomicFixnum.new(2)
         
     | 
| 
      
 18 
     | 
    
         
            +
                    @publishers_sec = Concurrent::AtomicFixnum.new(2)
         
     | 
| 
       19 
19 
     | 
    
         
             
                  end
         
     | 
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
                  def handle_incoming_occupancy_event(event)
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: splitclient-rb
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 8.3. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 8.3.2.pre.rc2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: java
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Split Software
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2024- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2024-04-25 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     |