https://dagster.io/ logo
#ask-community
Title
# ask-community
c

Charlie Bini

06/09/2023, 3:45 PM
started getting this error after upgrading to 1.3.9
Copy code
dagster._check.ParameterCheckError: Invariant violation for parameter Cannot specify resource requirements in both @sensor decorator and as arguments to the decorated function. Description: None
the sensor in question does not define resources in the decorator, and there haven't been any changes to its code since last week
s

sandy

06/09/2023, 3:48 PM
hi @Charlie Bini this is a bug 😞 that will be fixed in next week's release. in the mean time, I'd recommend staying on 1.3.8 if you have a sensor that takes resource arguments.
c

Charlie Bini

06/09/2023, 3:49 PM
oof ok, does it affect all sensors with resources, or only under certain conditions? I'm only having the issue with one sensor in particular
s

sandy

06/09/2023, 3:51 PM
if the sensor is using
required_resource_keys
, it should work fine. when the resources are specified as part of the function definition is when the problem occurs.
c

Charlie Bini

06/09/2023, 3:52 PM
odd, I have other sensors that have resources in fn args that loaded fine, ex: https://github.com/TEAMSchools/teamster/blob/main/src/teamster/core/achieve3k/sensors.py
s

sandy

06/09/2023, 3:53 PM
oh also, the other precondition for the error to occur is for the sensor to target a job that has required resources that are supplied by the Definitions object, instead of within the job
they don't use resources so there might be another trigger at play
could be the pythonic op config maybe
3 Views