You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dagster docs tell that users are allowed to use cursors inside sensors to retain state between sensors' evaluations. Examples for this are given for dg.sensor.
Intuitively, it's assumed that dg.asset_sensor offers similar functionality. But in fact, dg.AssetSensorDefinition uses the cursor itself to control asset materializations. Thus, cursor updates made inside a sensor function are being overriden.
I leave this issue in the area of docs since I'm not sure is it a bug or feature. For me, it's more of a bug. But if it's a feature, it should be propertly documented (e.g. here
Additional information
Here's the place in code where the cursor is being updated
What's the issue or suggestion?
Dagster docs tell that users are allowed to use cursors inside sensors to retain state between sensors' evaluations. Examples for this are given for dg.sensor.
Intuitively, it's assumed that dg.asset_sensor offers similar functionality. But in fact, dg.AssetSensorDefinition uses the cursor itself to control asset materializations. Thus, cursor updates made inside a sensor function are being overriden.
I leave this issue in the area of docs since I'm not sure is it a bug or feature. For me, it's more of a bug. But if it's a feature, it should be propertly documented (e.g. here
Additional information
Here's the place in code where the cursor is being updated
dagster/python_modules/dagster/dagster/_core/definitions/asset_sensor_definition.py
Line 156 in a28a23f
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.
The text was updated successfully, but these errors were encountered: