Skip to content

Commit

Permalink
cleanup(mdc): remove flag for enabling/disabling datasets from config (
Browse files Browse the repository at this point in the history
  • Loading branch information
onewland authored Oct 13, 2022
1 parent 6a0dc69 commit 6908733
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
3 changes: 1 addition & 2 deletions snuba/datasets/entities/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ def __initialize(self) -> None:
}
)

if settings.PREFER_PLUGGABLE_ENTITIES:
self._entity_map.update(self._config_built_entities)
self._entity_map.update(self._config_built_entities)

self._name_map = {v.__class__: k for k, v in self._entity_map.items()}

Expand Down
20 changes: 9 additions & 11 deletions snuba/datasets/entity_subscriptions/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from typing import Generator, Mapping, MutableMapping, Sequence, Type

from snuba import settings
from snuba.datasets.configuration.entity_subscription_builder import (
build_entity_subscription_from_config,
)
Expand Down Expand Up @@ -49,16 +48,15 @@ def __initialize(self) -> None:
}
)

if settings.PREFER_PLUGGABLE_ENTITY_SUBSCRIPTIONS:
self._entity_subscription_map.update(
{
key: build_entity_subscription_from_config(path)
for (
key,
path,
) in entity_subscription_to_config_path_mapping.items()
}
)
self._entity_subscription_map.update(
{
key: build_entity_subscription_from_config(path)
for (
key,
path,
) in entity_subscription_to_config_path_mapping.items()
}
)

self._name_map = {v: k for k, v in self._entity_subscription_map.items()}

Expand Down
3 changes: 0 additions & 3 deletions snuba/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,6 @@ class RedisClusters(TypedDict):
ENTITY_CONFIG_FILES_GLOB = f"{CONFIG_FILES_PATH}/**/entities/*.yaml"
DATASET_CONFIG_FILES_GLOB = f"{CONFIG_FILES_PATH}/**/dataset.yaml"

PREFER_PLUGGABLE_ENTITIES = False
PREFER_PLUGGABLE_ENTITY_SUBSCRIPTIONS = False

# Counter utility class window size in minutes
COUNTER_WINDOW_SIZE = timedelta(minutes=10)

Expand Down

0 comments on commit 6908733

Please sign in to comment.