Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
9.6.1 (Nov 3, 2023)
- 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):
- Added new variations of the get treatment methods to support evaluating flags in given flag set/s.
- get_treatments_by_flag_set and get_treatments_by_flag_sets
- get_treatments_with_config_by_flag_set and get_treatments_with_config_by_flag_sets
- Added a new optional Split Filter configuration option. This allows the SDK and Split services to only synchronize the flags in the specified flag sets, avoiding unused or unwanted flags from being synced on the SDK instance, bringing all the benefits from a reduced payload.
- Note: Only applicable when the SDK is in charge of the rollout data synchronization. When not applicable, the SDK will log a warning on init.
- Updated the following SDK manager methods to expose flag sets on flag views.
- Removed raising an exception when Telemetry post config data fails, SDK will only log the error.

9.5.1 (Sep 5, 2023)
- Exclude tests from when building the package
- Fixed exception when fetching telemetry stats if no SSE Feature flags update events are stored
Expand Down
1 change: 0 additions & 1 deletion splitio/api/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ def record_init(self, configs):
'Error posting init config because an exception was raised by the HTTPClient'
)
_LOGGER.debug('Error: ', exc_info=True)
raise APIException('Init config data not flushed properly.') from exc

def record_stats(self, stats):
"""
Expand Down
6 changes: 5 additions & 1 deletion splitio/client/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ def sanitize(sdk_key, config):
_LOGGER.warning('metricRefreshRate parameter minimum value is 60 seconds, defaulting to 3600 seconds.')
processed['metricsRefreshRate'] = 3600

processed['flagSetsFilter'] = sorted(validate_flag_sets(processed['flagSetsFilter'], 'SDK Config')) if processed['flagSetsFilter'] is not None else None
if config['operationMode'] == 'consumer' and config.get('flagSetsFilter') is not None:
processed['flagSetsFilter'] = None
_LOGGER.warning('config: FlagSets filter is not applicable for Consumer modes where the SDK does keep rollout data in sync. FlagSet filter was discarded.')
else:
processed['flagSetsFilter'] = sorted(validate_flag_sets(processed['flagSetsFilter'], 'SDK Config')) if processed['flagSetsFilter'] is not None else None

return processed
12 changes: 8 additions & 4 deletions tests/client/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ def test_sanitize_imp_mode(self):

def test_sanitize(self):
"""Test sanitization."""
configs = {}
processed = config.sanitize('some', configs)

processed = config.sanitize('some', {})
assert processed['redisLocalCacheEnabled'] # check default is True
assert processed['flagSetsFilter'] is None
assert processed['flagSetsFilter'] is None

processed = config.sanitize('some', {'redisHost': 'x', 'flagSetsFilter': ['set']})
assert processed['flagSetsFilter'] is None

processed = config.sanitize('some', {'storageType': 'pluggable', 'flagSetsFilter': ['set']})
assert processed['flagSetsFilter'] is None