I'm observing a behavior that I don't quite unders...
# ask-community
l
I'm observing a behavior that I don't quite understand... I have a set of assets, Asset A generates an object in s3 and logs its location as output metadata. Asset A is an input to Asset B, and Asset B needs to get that location from the logs. Inside the io manager for Asset A, during
load_input
I do the following to get the output metadata:
Copy code
event = context.instance.get_latest_materialization_event(context.asset_key)
metadata = event.dagster_event.event_specific_data.materialization.metadata
What's happening when Asset A and Asset B are materialized in the same run, Asset B is able to get the path from the metadata without issue. However, when they are in separate runs, I get this error:
Copy code
RecursionError: maximum recursion depth exceeded
  File "/usr/local/lib/python3.8/site-packages/dagster/_core/execution/plan/execute_plan.py", line 269, in dagster_event_sequence_for_step
    for step_event in check.generator(step_events):
  File "/usr/local/lib/python3.8/site-packages/dagster/_core/execution/plan/execute_step.py", line 344, in core_dagster_event_sequence_for_step
    for event_or_input_value in step_input.source.load_input_object(step_context, input_def):
  File "/usr/local/lib/python3.8/site-packages/dagster/_core/execution/plan/inputs.py", line 185, in load_input_object
    metadata=asset_layer.metadata_for_asset(input_asset_key),
  File "/usr/local/lib/python3.8/site-packages/dagster/_core/definitions/asset_layer.py", line 659, in metadata_for_asset
    {key: cast(RawMetadataValue, value.value) for key, value in metadata.items()}
  File "/usr/local/lib/python3.8/site-packages/dagster/_core/definitions/asset_layer.py", line 659, in <dictcomp>
    {key: cast(RawMetadataValue, value.value) for key, value in metadata.items()}
  File "/usr/local/lib/python3.8/site-packages/dagster/_core/definitions/metadata/__init__.py", line 855, in value
    return self.value
  File "/usr/local/lib/python3.8/site-packages/dagster/_core/definitions/metadata/__init__.py", line 855, in value
    return self.value
  File "/usr/local/lib/python3.8/site-packages/dagster/_core/definitions/metadata/__init__.py", line 855, in value
    return self.value
  [Previous line repeated 983 more times]
So, there's something about how I'm retrieving the metadata that isn't quite right... any ideas?
c
it’s a bug blob facepalm fix: https://github.com/dagster-io/dagster/pull/13937