Open
Description
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
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.