@@ -265,13 +265,13 @@ async def _get_default_kvs_client(configuration: Configuration) -> KeyValueStore
265265
266266 @classmethod
267267 async def register_aliases (cls , configuration : Configuration ) -> None :
268- """Load any alias mapping from configuration to the default kvs."""
268+ """Load alias mapping from configuration to the default kvs."""
269269 if configuration .actor_storages is None :
270270 return
271+
271272 configuration_mapping = {}
272273
273- if configuration .default_dataset_id != configuration .actor_storages .datasets .get (
274- 'default' ):
274+ if configuration .default_dataset_id != configuration .actor_storages .datasets .get ('default' ):
275275 logger .warning (
276276 f'Conflicting default dataset ids: { configuration .default_dataset_id = } ,'
277277 f" { configuration .actor_storages .datasets .get ('default' )= } "
@@ -291,12 +291,6 @@ async def register_aliases(cls, configuration: Configuration) -> None:
291291 )._storage_key
292292 ] = storage_id
293293
294- # Aliased storage can be also default storage!!!
295- # Should we store such second alias to the default storage or ignore it in such case? Probably
296-
297- # What if existing default dataset already has conflicting keys?
298- # Just override it, that will teach it to have conflicting values!
299294 client = await cls ._get_default_kvs_client (configuration = configuration )
300- existing_mapping = ((await client .get_record (cls ._ALIAS_MAPPING_KEY )) or {'value' : {}}).get ('value' ,
301- {})
295+ existing_mapping = ((await client .get_record (cls ._ALIAS_MAPPING_KEY )) or {'value' : {}}).get ('value' , {})
302296 await client .set_record (cls ._ALIAS_MAPPING_KEY , {** existing_mapping , ** configuration_mapping })
0 commit comments