https://dagster.io/ logo
#dagster-support
Title
# dagster-support
c

Chris Evans

12/02/2022, 5:18 PM
When using
with_resources
with the
resource_config_by_key
kwarg, the resource_defs for which the config is provided are mutated to new objects. This leads to errors like the below if there are other assets that use the same resource_defs w/ the same key. Any thoughts on this? Should I only use
with_resources
once around all my assets?
Copy code
dagster._core.errors.DagsterInvalidDefinitionError: Conflicting versions of resource with key 'io_manager' were provided to different assets. When constructing a job, all resource definitions provided to assets must match by reference equality for a given key.
c

chris

12/02/2022, 5:19 PM
hmmm good catch
limiting the number of calls to
with_resources
is ideal, yes. I think there's probably a workaround here though, if you provide the same resource config and the same resource definition to two different calls to
with_resources
, we should be able to reconcile that
mind filing an issue?
c

Chris Evans

12/02/2022, 5:23 PM
Sure will do
I see on the reconciliation part. I had a graph backed asset (using experimental resource_defs) and a dbt asset (using with_resources) selected in the same job.
c

chris

12/02/2022, 5:31 PM
And the resource defs were logically the same? (As in, same config, same code?)
c

Chris Evans

12/02/2022, 5:31 PM
Yes
c

chris

12/02/2022, 5:34 PM
gotcha
7 Views