The docs say that in 1.3 resources are automatical...
# ask-community
i
The docs say that in 1.3 resources are automatically bound to jobs, but I am getting the following error:
Copy code
UserWarning: Error loading repository location repository.py:dagster._core.errors.DagsterInvalidDefinitionError: resource with key 'slack' required by hook '_hook' attached to job 'myjob' was not provided. Please provide a <class 'dagster._core.definitions.resource_definition.ResourceDefinition'> to key 'slack', or change the required key to one of the following keys which points to an <class 'dagster._core.definitions.resource_definition.ResourceDefinition'>: ['io_manager', 's3']
I defined slack resource in definitions:
Copy code
resources={
        "slack": SlackResource(token=EnvVar("SLACK_TOKEN")),
    }
c
mind providing the full code snippet
i
Copy code
defs = Definitions(
    jobs=[
       myjob
    ],
    resources={
        "slack": SlackResource(token=EnvVar("SLACK_TOKEN")).get_client(),
    },
)
Copy code
@slack_on_failure(settings.slack_channel, dagit_base_url=settings.dagit_url)
    @job(
        name=f"linkedin_monthly_csv_{entity}",
        resource_defs={
            "io_manager": s3_pickle_io_manager.configured({"s3_bucket": settings.s3_bucket_name}),
            "s3": s3_resource.configured({"endpoint_url": settings.s3_endpoint_url})
        },
        executor_def=get_executor(settings),
        config={
            "execution": {
                "config": get_execution_config(settings),
            }
        },
        op_retry_policy=RetryPolicy(max_retries=2),
    )