splitclient-rb 8.11.0.pre.rc3-java → 8.11.1.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
  SHA256:
3
- metadata.gz: adc131ee06c937b8f58b9b080aa31020bb6f27ab180e3cb8c7044033e180f955
4
- data.tar.gz: 921724ee2c32de95c7bae36a9e24ae212526d2de03faacc2f6a9514ccc181a53
3
+ metadata.gz: fa72e6febcfebdd1571db001701ff1ff09ee710e55cd23f0426f9af9930aced2
4
+ data.tar.gz: 429f8b7bd743faebe5c162cfeb7783843bd07cc8cd51f20f8549e4ffbfbc9755
5
5
  SHA512:
6
- metadata.gz: 0e8e36bdaa283d0ce1d00b23ca25a2d5904e82f2caeb6d610eeb7b18705268a44661e5aaf6b8b179ab116b9ea904802b69b33655c65a5acdc9f4b05aacc95526
7
- data.tar.gz: b5dbcc2c74fe8830a9d2ec091f1bac1f20814c47f5e69fad8f565e478bc52b08c0c8604cc10c1523567d8b7df79143887f0275f1cb969f83b64274f24294454f
6
+ metadata.gz: 360996c5a1e3e5902d5b71713ed6092df144370fa22a9ffe4456834d0350d7f7e3e04d558fe74cc6833ace13db48a248139024b91efd923ed7a8a62c599d4b83
7
+ data.tar.gz: 45cb3c63979482e66976dbdf2eae62512cbb30310ba4b7809934e397e1e8548c009170471d0765ebd9f12711530a764bd40683f557e2d1b3e3ff848be161b9bd
data/CHANGES.txt CHANGED
@@ -1,5 +1,10 @@
1
1
  CHANGES
2
2
 
3
+ 8.11.0 (Mar, 12, 2026)
4
+ - Added the ability to listen to different events triggered by the SDK. Read more in our docs.
5
+ - SDK_UPDATE notify when a flag or user segment has changed
6
+ - SDK_READY notify when the SDK is ready to evaluate
7
+
3
8
  8.10.1 (Jan 28, 2025)
4
9
  - Fixed rule-based segment matcher to exit when a conition is met.
5
10
  - Fixed impressions properties format in redis mode.
data/LICENSE CHANGED
@@ -157,7 +157,7 @@ Apache License
157
157
  file or class name and description of purpose be included on the
158
158
  same "printed page" as the copyright notice for easier
159
159
  identification within third-party archives.
160
- Copyright [yyyy] [name of copyright owner]
160
+ Copyright 2025 Harness Corporation
161
161
  Licensed under the Apache License, Version 2.0 (the "License");
162
162
  you may not use this file except in compliance with the License.
163
163
  You may obtain a copy of the License at
@@ -40,7 +40,7 @@ module SplitIoClient
40
40
  break if matched
41
41
  end
42
42
 
43
- @logger.debug("[InRuleSegmentMatcher] #{@segment_name} is in rule based segment -> #{matched}")
43
+ @config.logger.debug("[InRuleSegmentMatcher] #{@segment_name} is in rule based segment -> #{matched}") if @config.debug_enabled
44
44
  matched
45
45
  end
46
46
 
@@ -6,14 +6,8 @@ module SplitIoClient
6
6
  SYNC_MODE_STREAMING = 0
7
7
  SYNC_MODE_POLLING = 1
8
8
 
9
- def initialize(config,
10
- synchronizer,
11
- telemetry_runtime_producer,
12
- telemetry_synchronizer,
13
- status_manager,
14
- sse_handler,
15
- push_manager,
16
- status_queue)
9
+ def initialize(config, synchronizer, telemetry_runtime_producer, telemetry_synchronizer,
10
+ status_manager, sse_handler, push_manager, status_queue)
17
11
  @config = config
18
12
  @synchronizer = synchronizer
19
13
  @telemetry_runtime_producer = telemetry_runtime_producer
@@ -23,6 +17,7 @@ module SplitIoClient
23
17
  @push_manager = push_manager
24
18
  @status_queue = status_queue
25
19
  @sse_connected = Concurrent::AtomicBoolean.new(false)
20
+ @back_off = Engine::BackOff.new(1, 3)
26
21
  end
27
22
 
28
23
  def start
@@ -119,7 +114,7 @@ module SplitIoClient
119
114
  end
120
115
 
121
116
  def process_disconnect(reconnect)
122
- unless @sse_connected.value
117
+ unless @sse_connected.value || reconnect
123
118
  @config.logger.debug('Streaming already disconnected.') if @config.debug_enabled
124
119
  return
125
120
  end
@@ -130,6 +125,9 @@ module SplitIoClient
130
125
  record_telemetry(Telemetry::Domain::Constants::SYNC_MODE, SYNC_MODE_POLLING)
131
126
 
132
127
  if reconnect
128
+ wait_interval = @back_off.interval
129
+ @config.logger.debug("Retrying streaming connection in: #{wait_interval} seconds")
130
+ sleep(wait_interval)
133
131
  @push_manager.stop_sse
134
132
  @synchronizer.sync_all
135
133
  @push_manager.start_sse
@@ -155,6 +153,7 @@ module SplitIoClient
155
153
 
156
154
  case status
157
155
  when Constants::PUSH_CONNECTED
156
+ @back_off.reset
158
157
  process_connected
159
158
  when Constants::PUSH_RETRYABLE_ERROR
160
159
  process_disconnect(true)
@@ -10,7 +10,7 @@ module SplitIoClient
10
10
  module EventSource
11
11
  class Client
12
12
  DEFAULT_READ_TIMEOUT = 70
13
- CONNECT_TIMEOUT = 30_000
13
+ CONNECT_TIMEOUT = 30
14
14
  OK_CODE = 200
15
15
  KEEP_ALIVE_RESPONSE = "c\r\n:keepalive\n\n\r\n".freeze
16
16
  ERROR_EVENT_TYPE = 'error'.freeze
@@ -47,7 +47,7 @@ module SplitIoClient
47
47
  @connected.make_false
48
48
  @socket.sync_close = true if @socket.is_a? OpenSSL::SSL::SSLSocket
49
49
  @socket.close
50
- @config.logger.debug("SSEClient socket state #{@socket.state}") if @socket.is_a? OpenSSL::SSL::SSLSocket && @config.debug_enabled
50
+ @config.logger.debug("SSEClient socket state #{@socket.state}") if @socket.is_a?(OpenSSL::SSL::SSLSocket) && @config.debug_enabled
51
51
  rescue StandardError => e
52
52
  @config.logger.error("SSEClient close Error: #{e.inspect}")
53
53
  end
@@ -86,7 +86,7 @@ module SplitIoClient
86
86
  end
87
87
 
88
88
  def connect_stream(latch)
89
- return Constants::PUSH_NONRETRYABLE_ERROR unless socket_write(latch)
89
+ return Constants::PUSH_RETRYABLE_ERROR unless socket_write(latch)
90
90
  while connected? || @first_event.value
91
91
  begin
92
92
  if IO.select([@socket], nil, nil, @read_timeout)
@@ -94,7 +94,10 @@ module SplitIoClient
94
94
  partial_data = @socket.readpartial(10_000)
95
95
  read_first_event(partial_data, latch)
96
96
 
97
- raise 'eof exception' if partial_data == :eof
97
+ if partial_data == :eof
98
+ @config.logger.error("SSE recived EOF unexpectedly")
99
+ return Constants::PUSH_RETRYABLE_ERROR
100
+ end
98
101
  rescue IO::WaitReadable => e
99
102
  @config.logger.debug("SSE client IO::WaitReadable transient error: #{e.inspect}") if @config.debug_enabled
100
103
  IO.select([@socket], nil, nil, @read_timeout)
@@ -108,7 +111,7 @@ module SplitIoClient
108
111
  return Constants::PUSH_RETRYABLE_ERROR
109
112
  rescue EOFError => e
110
113
  @config.logger.error("SSE read operation EOF Exception!: #{e.inspect}")
111
- raise 'eof exception'
114
+ return Constants::PUSH_RETRYABLE_ERROR
112
115
  rescue Errno::EBADF, IOError => e
113
116
  @config.logger.error("SSE read operation EBADF or IOError: #{e.inspect}")
114
117
  return Constants::PUSH_RETRYABLE_ERROR
@@ -126,8 +129,6 @@ module SplitIoClient
126
129
  rescue Errno::EBADF
127
130
  @config.logger.debug("SSE socket is not connected (Errno::EBADF)") if @config.debug_enabled
128
131
  break
129
- rescue RuntimeError
130
- raise 'eof exception'
131
132
  rescue Exception => e
132
133
  @config.logger.debug("SSE socket is not connected: #{e.inspect}") if @config.debug_enabled
133
134
  break
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '8.11.0-rc3'
2
+ VERSION = '8.11.1-rc1'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: splitclient-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.11.0.pre.rc3
4
+ version: 8.11.1.pre.rc1
5
5
  platform: java
6
6
  authors:
7
7
  - Split Software
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-03-11 00:00:00.000000000 Z
10
+ date: 2026-07-17 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: allocation_stats