splitclient-rb 7.3.2.pre.rc2-java → 7.3.3.pre.rc1-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16d41224ffaa5d35b5e7b452a2874603466301a2
4
- data.tar.gz: 88c70650b2948cef0cb93ea00c2453900ae27eee
3
+ metadata.gz: 72b22d6b3446af850fee0417b6dc6007ce490a0d
4
+ data.tar.gz: b11ed32b98f867c426f8d81da85e3422853acdb9
5
5
  SHA512:
6
- metadata.gz: ce93919c5848f7394282caa57dc3dc2ab1a0818ddb4a73be206f5754debe613787c2983314b8f98e54c5bbb4aed0d6bffa3962a043fe907afc6a937a27a20583
7
- data.tar.gz: 36d929f0894488db664d3b8fecb37e1e0f9f2014bf856edcce89d40ee041943f4e2c92bd82f9e596934314b800db5de4fa766e3d38de558b85ff183cd3b340d7
6
+ metadata.gz: 78c2dc2fb8e7b234f5bdba6235693a5df9738935ea663a9931a48b4f70322dac7be15af55df4ea703cd8cdfff10b1eb10ad3b1c746def72b002c489b21c9dd04
7
+ data.tar.gz: 1d0c89bc37511d1b3e131ac7c56cddb5b52a0098a684a92b974ecbfb71e21d964e933a4b644cfece9fa55b6dee8b20266342e0243bff9d9de7081a79ef470f38
data/.rubocop.yml CHANGED
@@ -64,3 +64,4 @@ AllCops:
64
64
  - lib/splitclient-rb/engine/parser/**/*
65
65
  - spec/telemetry/synchronizer_spec.rb
66
66
  - lib/splitclient-rb/engine/synchronizer.rb
67
+ - tmp/**/*
data/CHANGES.txt CHANGED
@@ -1,5 +1,9 @@
1
1
  CHANGES
2
2
 
3
+ 7.3.2 (Dec 10, 2021)
4
+ - Updated the readiness flow to be more consistent with the other sdks and improve the readiness time.
5
+ - Updated the name of telemety key latencies in Redis.
6
+
3
7
  7.3.1 (Jul 26, 2021)
4
8
  - Updated the synchronization flow to be more reliable in the event of an edge case generating delay in cache purge propagation, keeping the SDK cache properly synced.
5
9
 
@@ -15,15 +15,10 @@ module SplitIoClient
15
15
  def call
16
16
  if ENV['SPLITCLIENT_ENV'] == 'test'
17
17
  fetch_segments
18
- else
19
- segments_thread
20
-
21
- if defined?(PhusionPassenger)
22
- PhusionPassenger.on_event(:starting_worker_process) do |forked|
23
- segments_thread if forked
24
- end
25
- end
18
+ return
26
19
  end
20
+
21
+ segments_thread
27
22
  end
28
23
 
29
24
  def fetch_segments_if_not_exists(names, cache_control_headers = false)
@@ -15,15 +15,10 @@ module SplitIoClient
15
15
  def call
16
16
  if ENV['SPLITCLIENT_ENV'] == 'test'
17
17
  fetch_splits
18
- else
19
- splits_thread
20
-
21
- if defined?(PhusionPassenger)
22
- PhusionPassenger.on_event(:starting_worker_process) do |forked|
23
- splits_thread if forked
24
- end
25
- end
18
+ return
26
19
  end
20
+
21
+ splits_thread
27
22
  end
28
23
 
29
24
  def fetch_splits(fetch_options = { cache_control_headers: false, till: nil })
@@ -11,12 +11,6 @@ module SplitIoClient
11
11
 
12
12
  def call
13
13
  events_thread
14
-
15
- if defined?(PhusionPassenger)
16
- PhusionPassenger.on_event(:starting_worker_process) do |forked|
17
- events_thread if forked
18
- end
19
- end
20
14
  end
21
15
 
22
16
  private
@@ -14,12 +14,6 @@ module SplitIoClient
14
14
 
15
15
  def call
16
16
  impressions_count_thread
17
-
18
- if defined?(PhusionPassenger)
19
- PhusionPassenger.on_event(:starting_worker_process) do |forked|
20
- impressions_count_thread if forked
21
- end
22
- end
23
17
  end
24
18
 
25
19
  private
@@ -12,12 +12,6 @@ module SplitIoClient
12
12
 
13
13
  def call
14
14
  impressions_thread
15
-
16
- if defined?(PhusionPassenger)
17
- PhusionPassenger.on_event(:starting_worker_process) do |forked|
18
- impressions_thread if forked
19
- end
20
- end
21
15
  end
22
16
 
23
17
  private
@@ -38,6 +38,13 @@ module SplitIoClient
38
38
  end
39
39
 
40
40
  def start
41
+ start_thread
42
+ PhusionPassenger.on_event(:starting_worker_process) { |forked| start_thread if forked } if defined?(PhusionPassenger)
43
+ end
44
+
45
+ private
46
+
47
+ def start_thread
41
48
  @config.threads[:start_sdk] = Thread.new do
42
49
  sleep(0.5) until @synchronizer.sync_all(false)
43
50
 
@@ -49,10 +56,6 @@ module SplitIoClient
49
56
  if @config.streaming_enabled
50
57
  @config.logger.debug('Starting Straming mode ...')
51
58
  connected = @push_manager.start_sse
52
-
53
- if defined?(PhusionPassenger)
54
- PhusionPassenger.on_event(:starting_worker_process) { |forked| sse_thread_forked if forked }
55
- end
56
59
  end
57
60
 
58
61
  unless connected
@@ -63,8 +66,6 @@ module SplitIoClient
63
66
  end
64
67
  end
65
68
 
66
- private
67
-
68
69
  def process_action(action)
69
70
  case action
70
71
  when Constants::PUSH_CONNECTED
@@ -28,6 +28,10 @@ module SplitIoClient
28
28
 
29
29
  raise 'Invalid SDK mode' unless valid_mode
30
30
 
31
+ validate_api_key
32
+
33
+ register_factory
34
+
31
35
  build_telemetry_components
32
36
 
33
37
  @splits_repository = SplitsRepository.new(@config)
@@ -44,14 +48,16 @@ module SplitIoClient
44
48
 
45
49
  @client = SplitClient.new(@api_key, repositories, @status_manager, @config, @impressions_manager, @evaluation_producer)
46
50
  @manager = SplitManager.new(@splits_repository, @status_manager, @config)
47
-
48
- validate_api_key
49
-
50
- register_factory
51
51
  end
52
52
 
53
53
  def start!
54
54
  return start_localhost_components if @config.localhost_mode
55
+
56
+ if @config.consumer?
57
+ @status_manager.ready!
58
+ @telemetry_synchronizer.synchronize_config
59
+ return
60
+ end
55
61
 
56
62
  split_fetcher = SplitFetcher.new(@splits_repository, @api_key, config, @runtime_producer)
57
63
  segment_fetcher = SegmentFetcher.new(@segments_repository, @api_key, config, @runtime_producer)
@@ -61,10 +61,6 @@ module SplitIoClient
61
61
  perform
62
62
  end
63
63
  end
64
-
65
- def perform_passenger_forked
66
- PhusionPassenger.on_event(:starting_worker_process) { |forked| perform_thread if forked }
67
- end
68
64
  end
69
65
  end
70
66
  end
@@ -70,10 +70,6 @@ module SplitIoClient
70
70
  perform
71
71
  end
72
72
  end
73
-
74
- def perform_passenger_forked
75
- PhusionPassenger.on_event(:starting_worker_process) { |forked| perform_thread if forked }
76
- end
77
73
  end
78
74
  end
79
75
  end
@@ -33,8 +33,8 @@ module SplitIoClient
33
33
 
34
34
  TREATMENT = 'treatment'
35
35
  TREATMENTS = 'treatments'
36
- TREATMENT_WITH_CONFIG = 'treatment_with_config'
37
- TREATMENTS_WITH_CONFIG = 'treatments_with_config'
36
+ TREATMENT_WITH_CONFIG = 'treatmentWithConfig'
37
+ TREATMENTS_WITH_CONFIG = 'treatmentsWithConfig'
38
38
  TRACK = 'track'
39
39
  end
40
40
  end
@@ -14,14 +14,14 @@ module SplitIoClient
14
14
 
15
15
  def record_latency(method, bucket)
16
16
  @adapter.hincrby(latency_key, "#{@sdk_version}/#{@name}/#{@ip}/#{method}/#{bucket}", 1)
17
- rescue StandardError => error
18
- @config.log_found_exception(__method__.to_s, error)
17
+ rescue StandardError => e
18
+ @config.log_found_exception(__method__.to_s, e)
19
19
  end
20
20
 
21
21
  def record_exception(method)
22
22
  @adapter.hincrby(exception_key, "#{@sdk_version}/#{@name}/#{@ip}/#{method}", 1)
23
- rescue StandardError => error
24
- @config.log_found_exception(__method__.to_s, error)
23
+ rescue StandardError => e
24
+ @config.log_found_exception(__method__.to_s, e)
25
25
  end
26
26
 
27
27
  private
@@ -10,8 +10,6 @@ module SplitIoClient
10
10
 
11
11
  def call
12
12
  stats_thread
13
-
14
- PhusionPassenger.on_event(:starting_worker_process) { |forked| stats_thread if forked } if defined?(PhusionPassenger)
15
13
  end
16
14
 
17
15
  private
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '7.3.2.pre.rc2'
2
+ VERSION = '7.3.3.pre.rc1'
3
3
  end
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: 7.3.2.pre.rc2
4
+ version: 7.3.3.pre.rc1
5
5
  platform: java
6
6
  authors:
7
7
  - Split Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-24 00:00:00.000000000 Z
11
+ date: 2022-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement