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

Freshness sensor fix instance method + in-progress checks handling #22013

Merged
merged 1 commit into from
May 22, 2024

Conversation

dpeng817
Copy link
Contributor

@dpeng817 dpeng817 commented May 21, 2024

Uses the newly added get_asset_check_summary_record to implement the freshness check sensor.

Adds some more tests for previously under-handled cases; having an asset which is currently in planned state, and ensuring that cursoring works properly.

Copy link
Contributor Author

dpeng817 commented May 21, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @dpeng817 and the rest of your teammates on Graphite Graphite

@dpeng817 dpeng817 force-pushed the dpeng817/freshness_sensor_fix branch from a287102 to 2758648 Compare May 21, 2024 23:26
@dpeng817 dpeng817 requested review from sryza and johannkm May 21, 2024 23:26
Base automatically changed from dpeng817/asset_state_api to master May 22, 2024 15:04
@dpeng817 dpeng817 force-pushed the dpeng817/freshness_sensor_fix branch from 2758648 to dfd952f Compare May 22, 2024 15:12
@@ -155,7 +122,70 @@ def ordered_iterator_freshness_checks_starting_with_key(
# Offset based on the left off asset check key, but then iterate back through the beginning afterwards
if left_off_asset_check_key:
left_off_idx = asset_check_keys_sorted.index(left_off_asset_check_key)
yield from asset_check_keys_sorted[left_off_idx:]
yield from asset_check_keys_sorted[:left_off_idx]
yield from asset_check_keys_sorted[left_off_idx + 1 :]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why +1 now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

realized that this method of indexing was actually inclusive; meaning we would start iterating at the item we evaluated the previous run of the sensor, rather than the item after the last one we evaluated. this fixes (and I added a test for the ordering behavior)

@dpeng817 dpeng817 merged commit 7c5aa5b into master May 22, 2024
1 check passed
@dpeng817 dpeng817 deleted the dpeng817/freshness_sensor_fix branch May 22, 2024 15:50
OwenKephart pushed a commit that referenced this pull request May 22, 2024
Uses the newly added get_asset_check_summary_record to implement the
freshness check sensor.

Adds some more tests for previously under-handled cases; having an asset
which is currently in planned state, and ensuring that cursoring works
properly.
nikomancy pushed a commit that referenced this pull request May 22, 2024
Uses the newly added get_asset_check_summary_record to implement the
freshness check sensor.

Adds some more tests for previously under-handled cases; having an asset
which is currently in planned state, and ensuring that cursoring works
properly.
@dpeng817 dpeng817 changed the title Fix freshness sensor to use assetchecksummaryrecord Freshness sensor fix instance method + in-progress checks handling May 23, 2024
danielgafni pushed a commit to danielgafni/dagster that referenced this pull request Jun 18, 2024
Uses the newly added get_asset_check_summary_record to implement the
freshness check sensor.

Adds some more tests for previously under-handled cases; having an asset
which is currently in planned state, and ensuring that cursoring works
properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants