Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instant Feature flag implementation #479

Merged
merged 29 commits into from
Jul 18, 2023
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1a3cd09
added iff compression and decoding message
chillaq May 31, 2023
ba9989e
moved decode function to private
chillaq May 31, 2023
1cca90e
polish and refactor
chillaq May 31, 2023
a75db9c
polish
chillaq May 31, 2023
5a84917
used constants for compression level
chillaq Jun 1, 2023
c1c7b3b
iff e2e and edge cases
chillaq Jun 1, 2023
8e9d1b5
polish and fixes
chillaq Jun 5, 2023
6164afd
added byebug
chillaq Jun 5, 2023
d2a6b31
renaming split to feature flag
chillaq Jun 5, 2023
3eecb05
polishing
chillaq Jun 5, 2023
4c12107
Merge pull request #473 from splitio/iff-update-splitworker
chillaq Jun 5, 2023
5e726c1
Merge pull request #474 from splitio/iff-e2e-edge-cases
chillaq Jun 5, 2023
544bc33
Added iif archived process
chillaq Jun 7, 2023
65d4eb9
polishing
chillaq Jun 8, 2023
9e3dddb
Merge pull request #476 from splitio/iff-archived
chillaq Jun 8, 2023
93e6bdd
fixes for rubocop
chillaq Jun 9, 2023
8b709ae
polish
chillaq Jun 9, 2023
2533616
killing resfresh token thread
sanzmauro Jun 28, 2023
abb6381
added telemetry and segments fetch
sanzmauro Jun 28, 2023
714ba44
added segments tests
sanzmauro Jun 28, 2023
ecb4635
pr feedback
sanzmauro Jun 28, 2023
7a1f920
updated test name
sanzmauro Jun 28, 2023
4d5a865
Merge pull request #477 from splitio/SDKS-7187
sanzmauro Jun 29, 2023
da58a64
Merge pull request #478 from splitio/SDKS-7190
sanzmauro Jun 29, 2023
7773307
merged SDKS-6587
sanzmauro Jun 29, 2023
e99dcd5
Merge branch 'development' into Feature/iff
sanzmauro Jun 29, 2023
ac99802
Update CHANGES.txt
sanzmauro Jul 18, 2023
302f748
Update version.rb
sanzmauro Jul 18, 2023
84d18aa
Update data.txt
sanzmauro Jul 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
polish and fixes
  • Loading branch information
chillaq committed Jun 5, 2023
commit 8e9d1b52ceab3d11ca4cde7a5629f0ef83a86833
23 changes: 18 additions & 5 deletions lib/splitclient-rb/sse/workers/splits_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,22 @@ def stop
end

def split_update(notification)
if @splits_repository.get_change_number() == notification.data['pcn']
return if @splits_repository.get_change_number.to_i > notification.data['changeNumber']

if @splits_repository.get_change_number == notification.data['pcn']
begin
@new_split = JSON.parse(SplitIoClient::Helpers::DecryptionHelper.get_encoded_definition(notification.data['c'], notification.data['d']), symbolize_names: true)
@splits_repository.add_split(@new_split)
@splits_repository.add_split(
JSON.parse(
SplitIoClient::Helpers::DecryptionHelper.get_encoded_definition(
notification.data['c'],
notification.data['d']
),
symbolize_names: true
)
)
@splits_repository.set_change_number(notification.data['changeNumber'])
return
rescue Exception => e
rescue StandardError => e
@config.logger.debug("Failed to update Split: #{e.inspect}") if @config.debug_enabled
end
end
Expand All @@ -55,7 +64,11 @@ def kill_split(notification)
return if @splits_repository.get_change_number.to_i > notification.data['changeNumber']

@config.logger.debug("feature_flags_worker kill #{notification.data['splitName']}, #{notification.data['changeNumber']}")
@splits_repository.kill(notification.data['changeNumber'], notification.data['splitName'], notification.data['defaultTreatment'])
@splits_repository.kill(
notification.data['changeNumber'],
notification.data['splitName'],
notification.data['defaultTreatment']
)
@synchronizer.fetch_splits(notification.data['changeNumber'])
end

Expand Down