I am having trouble using repository_definition.load_asset_value() with a partition_key for a loading an asset that has a single partition. The problem occurs in the io_manager where the context.asset_partition_keys is not a list but a string that was sliced. I looked at the code and this looks suspicious to me (from
https://github.com/dagster-io/dagster/blob/fa5641583e4f2598049ae8ad10e44e7d34d5426[…]python_modules/dagster/dagster/_core/execution/context/input.py):
def get_partition_keys(self, current_time: Optional[datetime] = None) -> Iterable[str]:
if self._key_range.start == self._key_range.end:
return
self._key_range.start
else:
raise NotImplementedError()
since it seems to return a string but the type on the return is an iterable. Is this intentional? I changed the code to return [
self._key_range.start] and the code I am working with now behaves properly. Maybe this code is correct and I am doing something wrong in the IO Manager but I can't imagine what it might be since I am using the upath_io_manager as my base.
Thoughts?