Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset sensor internal cursor updates #27856

Open
sharrik111 opened this issue Feb 14, 2025 · 0 comments
Open

Asset sensor internal cursor updates #27856

sharrik111 opened this issue Feb 14, 2025 · 0 comments
Labels
area: docs Related to documentation in general

Comments

@sharrik111
Copy link

sharrik111 commented Feb 14, 2025

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

context.update_cursor(str(event_record.storage_id))

Message from the maintainers

Impacted by this issue? Give it a 👍! We factor engagement into prioritization.

@sharrik111 sharrik111 added the area: docs Related to documentation in general label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docs Related to documentation in general
Projects
None yet
Development

No branches or pull requests

1 participant