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
4 changes: 2 additions & 2 deletions splitio/api/kerberos_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import threading
from urllib3.util import parse_url

from harness_commons.api.client import HttpClientBase, build_url, construct_urls, HttpResponse
from splitio_commons.api.client import HttpClientBase, build_url, construct_urls, HttpResponse
from splitio.optional.loaders import HTTPKerberosAuth, OPTIONAL
from splitio.client.config import AuthenticateScheme
from splitio.optional.loaders import aiohttp
from harness_commons.util.time import get_current_epoch_time_ms
from splitio_commons.util.time import get_current_epoch_time_ms

_LOGGER = logging.getLogger(__name__)
_EXC_MSG = '{source} library is throwing exceptions'
Expand Down
16 changes: 8 additions & 8 deletions splitio/api/splits.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import logging
import json

from harness_commons.api import APIException, headers_from_metadata
from harness_commons.api.commons import build_fetch, FetchOptions
from harness_commons.api.client import HttpClientException
from harness_commons.models.telemetry import HTTPExceptionsAndLatencies
from harness_commons.util.time import utctime_ms
from splitio_commons.api import APIException, headers_from_metadata
from splitio_commons.api.commons import build_fetch, FetchOptions
from splitio_commons.api.client import HttpClientException
from splitio_commons.models.telemetry import HTTPExceptionsAndLatencies
from splitio_commons.util.time import utctime_ms
from splitio.spec import SPEC_VERSION
from harness_commons.sync import util
from splitio_commons.sync import util

_LOGGER = logging.getLogger(__name__)
_SPEC_1_1 = "1.1"
Expand Down Expand Up @@ -83,7 +83,7 @@ def fetch_definitions(self, change_number, rbs_change_number, fetch_options):
:type rbs_change_number: int

:param fetch_options: Fetch options for getting feature flag definitions.
:type fetch_options: harness_commons.api.commons.FetchOptions
:type fetch_options: splitio_commons.api.commons.FetchOptions

:return: Json representation of a splitChanges response.
:rtype: dict
Expand Down Expand Up @@ -160,7 +160,7 @@ async def fetch_definitions(self, change_number, rbs_change_number, fetch_option
:type rbs_change_number: int

:param fetch_options: Fetch options for getting feature flag definitions.
:type fetch_options: harness_commons.api.commons.FetchOptions
:type fetch_options: splitio_commons.api.commons.FetchOptions

:return: Json representation of a splitChanges response.
:rtype: dict
Expand Down
36 changes: 18 additions & 18 deletions splitio/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
import copy

from splitio.client import input_validator
from harness_commons.engine.evaluator import Evaluator, CONTROL, EvaluationDataFactory, AsyncEvaluationDataFactory
from harness_commons.engine.splitters import Splitter
from harness_commons.models.impressions import Impression, ImpressionDecorated
from splitio_commons.engine.evaluator import Evaluator, CONTROL, EvaluationDataFactory, AsyncEvaluationDataFactory
from splitio_commons.engine.splitters import Splitter
from splitio_commons.models.impressions import Impression, ImpressionDecorated
from splitio.models.label import Label
from harness_commons.models.events import Event, EventWrapper, SdkEvent
from harness_commons.models.telemetry import get_latency_bucket_index, MethodExceptionsAndLatencies
from splitio_commons.models.events import Event, EventWrapper, SdkEvent
from splitio_commons.models.telemetry import get_latency_bucket_index, MethodExceptionsAndLatencies
from splitio.optional.loaders import asyncio
from harness_commons.util.time import get_current_epoch_time_ms, utctime_ms
from splitio_commons.util.time import get_current_epoch_time_ms, utctime_ms


_LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -53,7 +53,7 @@ def __init__(self, factory, recorder, events_manager, labels_enabled=True, fallb
:type labels_enabled: bool

:param recorder: recorder instance
:type recorder: harness_commons.recorder.StatsRecorder
:type recorder: splitio_commons.recorder.StatsRecorder

:rtype: Client
"""
Expand Down Expand Up @@ -175,7 +175,7 @@ def _validate_track(self, key, traffic_type, event_type, value=None, properties=
:type properties: dict

:return: validation, event created and its properties size.
:rtype: tuple(bool, harness_commons.models.events.Event, int)
:rtype: tuple(bool, splitio_commons.models.events.Event, int)
"""
if self.destroyed:
_LOGGER.error("Client has already been destroyed - no calls possible")
Expand Down Expand Up @@ -268,7 +268,7 @@ def __init__(self, factory, recorder, events_manager, labels_enabled=True, fallb
:type labels_enabled: bool

:param recorder: recorder instance
:type recorder: harness_commons.recorder.StatsRecorder
:type recorder: splitio_commons.recorder.StatsRecorder

:rtype: Client
"""
Expand Down Expand Up @@ -352,7 +352,7 @@ def _get_treatment(self, method, key, feature, attributes=None, evaluation_optio
:param attributes: An optional dictionary of attributes
:type attributes: dict
:param method: The method calling this function
:type method: harness_commons.models.telemetry.MethodExceptionsAndLatencies
:type method: splitio_commons.models.telemetry.MethodExceptionsAndLatencies
:param evaluation_options: An optional dictionary of options
:type evaluation_options: dict
:return: The treatment and config for the key and feature flag
Expand Down Expand Up @@ -523,7 +523,7 @@ def _get_treatments_by_flag_sets(self, key, flag_sets, method, attributes=None,
:param flag_sets: list of flag sets
:type flag_sets: list
:param method: Treatment by flag set method flavor
:type method: harness_commons.models.telemetry.MethodExceptionsAndLatencies
:type method: splitio_commons.models.telemetry.MethodExceptionsAndLatencies
:param attributes: An optional dictionary of attributes
:type attributes: dict
:param evaluation_options: An optional dictionary of options
Expand Down Expand Up @@ -652,7 +652,7 @@ def _get_treatments(self, key, features, method, attributes=None, evaluation_opt
:param feature_flag_names: Array of feature flag names for which to get the treatments
:type feature_flag_names: list(str)
:param method: The method calling this function
:type method: harness_commons.models.telemetry.MethodExceptionsAndLatencies
:type method: splitio_commons.models.telemetry.MethodExceptionsAndLatencies
:param attributes: An optional dictionary of attributes
:type attributes: dict
:param evaluation_options: An optional dictionary of options
Expand Down Expand Up @@ -704,7 +704,7 @@ def _record_stats(self, impressions_decorated, start, operation):
Record impressions.

:param impressions_decorated: Generated impressions
:type impressions_decorated: list[tuple[harness_commons.models.impression.ImpressionDecorated, dict]]
:type impressions_decorated: list[tuple[splitio_commons.models.impression.ImpressionDecorated, dict]]

:param start: timestamp when get_treatment or get_treatments was called
:type start: int
Expand Down Expand Up @@ -777,7 +777,7 @@ def __init__(self, factory, recorder, events_manager, labels_enabled=True, fallb
:type labels_enabled: bool

:param recorder: recorder instance
:type recorder: harness_commons.recorder.StatsRecorder
:type recorder: splitio_commons.recorder.StatsRecorder

:rtype: Client
"""
Expand Down Expand Up @@ -861,7 +861,7 @@ async def _get_treatment(self, method, key, feature, attributes=None, evaluation
:param attributes: An optional dictionary of attributes
:type attributes: dict
:param method: The method calling this function
:type method: harness_commons.models.telemetry.MethodExceptionsAndLatencies
:type method: splitio_commons.models.telemetry.MethodExceptionsAndLatencies
:param evaluation_options: An optional dictionary of options
:type evaluation_options: dict
:return: The treatment and config for the key and feature flag
Expand Down Expand Up @@ -1030,7 +1030,7 @@ async def _get_treatments_by_flag_sets(self, key, flag_sets, method, attributes=
:param flag_sets: list of flag sets
:type flag_sets: list
:param method: Treatment by flag set method flavor
:type method: harness_commons.models.telemetry.MethodExceptionsAndLatencies
:type method: splitio_commons.models.telemetry.MethodExceptionsAndLatencies
:param attributes: An optional dictionary of attributes
:type attributes: dict
:param evaluation_options: An optional dictionary of options
Expand Down Expand Up @@ -1074,7 +1074,7 @@ async def _get_treatments(self, key, features, method, attributes=None, evaluati
:param feature_flag_names: Array of feature flag names for which to get the treatments
:type feature_flag_names: list(str)
:param method: The method calling this function
:type method: harness_commons.models.telemetry.MethodExceptionsAndLatencies
:type method: splitio_commons.models.telemetry.MethodExceptionsAndLatencies
:param attributes: An optional dictionary of attributes
:type attributes: dict
:param evaluation_options: An optional dictionary of options
Expand Down Expand Up @@ -1125,7 +1125,7 @@ async def _record_stats(self, impressions_decorated, start, operation):
Record impressions for async calls

:param impressions_decorated: Generated impressions decorated
:type impressions_decorated: list[tuple[harness_commons.models.impression.Impression, dict]]
:type impressions_decorated: list[tuple[splitio_commons.models.impression.Impression, dict]]

:param start: timestamp when get_treatment or get_treatments was called
:type start: int
Expand Down
4 changes: 2 additions & 2 deletions splitio/client/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import logging
from enum import Enum

from harness_commons.engine.impressions.impressions import ImpressionsMode
from splitio_commons.engine.impressions.impressions import ImpressionsMode
from splitio.client.input_validator import validate_flag_sets, validate_fallback_treatment, validate_regex_name
from harness_commons.models.fallback_config import FallbackTreatmentsConfiguration
from splitio_commons.models.fallback_config import FallbackTreatmentsConfiguration

_LOGGER = logging.getLogger(__name__)
DEFAULT_DATA_SAMPLING = 1
Expand Down
Loading