diff --git a/src/openeo_aggregator/caching.py b/src/openeo_aggregator/caching.py index d0154d9..628b393 100644 --- a/src/openeo_aggregator/caching.py +++ b/src/openeo_aggregator/caching.py @@ -514,7 +514,7 @@ def get_memoizer(memoizer_type: str, memoizer_conf: dict) -> Memoizer: # TODO: better solution than using a module level global here? stats=zk_memoizer_stats, ) - zookeeper_prefix = get_backend_config().zookeeper_prefix or config.zookeeper_prefix + zookeeper_prefix = get_backend_config().zookeeper_prefix return ZkMemoizer( client=kazoo_client, path_prefix=f"{zookeeper_prefix}/cache/{namespace}", diff --git a/src/openeo_aggregator/config.py b/src/openeo_aggregator/config.py index b1733d4..e4284c8 100644 --- a/src/openeo_aggregator/config.py +++ b/src/openeo_aggregator/config.py @@ -42,9 +42,6 @@ class AggregatorConfig(dict): config_source = dict_item() - # TODO #112 Deprecated, use AggregatorBackendConfig.zookeeper_prefix instead - zookeeper_prefix = dict_item(default="/openeo-aggregator/") - # TODO #112 Deprecated, use AggregatorBackendConfig.memoizer instead memoizer = dict_item(default={"type": "dict"}) @@ -137,9 +134,7 @@ class AggregatorBackendConfig(OpenEoBackendConfig): # List of collection ids to cover with the aggregator (when None: support union of all upstream collections) collection_whitelist: Optional[List[Union[str, re.Pattern]]] = None - # TODO #112: empty default is to allow config migration from AggregatorConfig to AggregatorBackendConfig. - # To be replaced eventually with "/openeo-aggregator/" - zookeeper_prefix: str = "" + zookeeper_prefix: str = "/openeo-aggregator/" # See `memoizer_from_config` for details. # TODO #112: empty default is to allow migration. Te be replaced with `attrs.Factory(lambda: {"type": "dict"})` diff --git a/src/openeo_aggregator/partitionedjobs/zookeeper.py b/src/openeo_aggregator/partitionedjobs/zookeeper.py index e6d43e6..92099a9 100644 --- a/src/openeo_aggregator/partitionedjobs/zookeeper.py +++ b/src/openeo_aggregator/partitionedjobs/zookeeper.py @@ -51,7 +51,7 @@ def from_config(cls, config: AggregatorConfig) -> "ZooKeeperPartitionedJobDB": else: raise ConfigException("Failed to construct zk_client") # Determine ZooKeeper prefix - base_prefix = get_backend_config().zookeeper_prefix or config.zookeeper_prefix + base_prefix = get_backend_config().zookeeper_prefix assert len(base_prefix.replace("/", "")) >= 3 partitioned_jobs_prefix = pjt_config.get("zookeeper_prefix", cls.NAMESPACE) prefix = strip_join("/", base_prefix, partitioned_jobs_prefix)