-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[DS][27/n] Make candidate_slice and true_slice Optional #21648
Merged
OwenKephart
merged 1 commit into
master
from
05-03-Make_candidate_slice_and_true_slice_Optional
May 14, 2024
Merged
[DS][27/n] Make candidate_slice and true_slice Optional #21648
OwenKephart
merged 1 commit into
master
from
05-03-Make_candidate_slice_and_true_slice_Optional
May 14, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced May 3, 2024
This was referenced May 6, 2024
OwenKephart
changed the title
[DS][29/n] Make candidate_slice and true_slice Optional
[DS][28/n] Make candidate_slice and true_slice Optional
May 6, 2024
OwenKephart
force-pushed
the
05-02-Update_values_within_InLatestTimeWindow
branch
from
May 6, 2024 23:44
a226325
to
29f9484
Compare
OwenKephart
force-pushed
the
05-03-Make_candidate_slice_and_true_slice_Optional
branch
from
May 6, 2024 23:45
e138ccc
to
f8b4f5d
Compare
OwenKephart
force-pushed
the
05-03-Make_candidate_slice_and_true_slice_Optional
branch
from
May 7, 2024 21:33
f8b4f5d
to
7c8a70c
Compare
This was referenced May 7, 2024
OwenKephart
changed the title
[DS][28/n] Make candidate_slice and true_slice Optional
[DS][27/n] Make candidate_slice and true_slice Optional
May 8, 2024
OwenKephart
force-pushed
the
05-02-Update_values_within_InLatestTimeWindow
branch
from
May 8, 2024 23:00
29f9484
to
0534e7c
Compare
OwenKephart
force-pushed
the
05-03-Make_candidate_slice_and_true_slice_Optional
branch
from
May 8, 2024 23:00
7c8a70c
to
a4f2744
Compare
This was referenced May 8, 2024
schrockn
approved these changes
May 9, 2024
This was referenced May 10, 2024
OwenKephart
force-pushed
the
05-02-Update_values_within_InLatestTimeWindow
branch
from
May 10, 2024 22:44
0534e7c
to
f34a068
Compare
OwenKephart
force-pushed
the
05-03-Make_candidate_slice_and_true_slice_Optional
branch
2 times, most recently
from
May 13, 2024 17:29
ba19f8d
to
1bd133f
Compare
OwenKephart
force-pushed
the
05-02-Update_values_within_InLatestTimeWindow
branch
from
May 14, 2024 13:47
f34a068
to
f9c81a0
Compare
OwenKephart
force-pushed
the
05-03-Make_candidate_slice_and_true_slice_Optional
branch
from
May 14, 2024 13:47
1bd133f
to
56c11e4
Compare
Merge activity
|
OwenKephart
force-pushed
the
05-02-Update_values_within_InLatestTimeWindow
branch
from
May 14, 2024 14:39
f9c81a0
to
e678b9c
Compare
Base automatically changed from
05-02-Update_values_within_InLatestTimeWindow
to
master
May 14, 2024 14:43
OwenKephart
force-pushed
the
05-03-Make_candidate_slice_and_true_slice_Optional
branch
from
May 14, 2024 14:43
56c11e4
to
10b0a4b
Compare
OwenKephart
deleted the
05-03-Make_candidate_slice_and_true_slice_Optional
branch
May 14, 2024 14:44
danielgafni
pushed a commit
to danielgafni/dagster
that referenced
this pull request
Jun 18, 2024
…1648) ## Summary & Motivation This helps avoid a class of errors using the type system. We have these concepts of "AssetSubsets" vs. "ValidAssetSubsets", where valid asset subsets are known to have been created with the asset's current-tick PartitionsDefinition, and AssetSubsets have gone through a serdes layer and therefore may have a differen partitions definition than they did at serialization time. This means that care needs to be taken when using a bare AssetSubset. Previously, we had these fancy operators which would treat AssetSubsets which had invalid partitions_definitions as the empty subset, but that is not actually always accurate. i.e. you may have been keeping track of all the materialized partitions of an asset using a subset, then you update the partitions definition. The correct thing to do here is to recompute the materialized partitions from scratch, NOT assume that this susbet is equivalent to the empty subset. By explicitly creating a None value for candidate_slice / true_slice in these cases, we force authors of conditions to handle these cases through the type system. This already uncovered a potential bug in the new UpdatedSinceCron condition, in which it would return an empty set in the case that a partition was updated since the latest cron tick, but then the partitions definition was updated. ## How I Tested These Changes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary & Motivation
This helps avoid a class of errors using the type system. We have these concepts of "AssetSubsets" vs. "ValidAssetSubsets", where valid asset subsets are known to have been created with the asset's current-tick PartitionsDefinition, and AssetSubsets have gone through a serdes layer and therefore may have a differen partitions definition than they did at serialization time.
This means that care needs to be taken when using a bare AssetSubset.
Previously, we had these fancy operators which would treat AssetSubsets which had invalid partitions_definitions as the empty subset, but that is not actually always accurate. i.e. you may have been keeping track of all the materialized partitions of an asset using a subset, then you update the partitions definition. The correct thing to do here is to recompute the materialized partitions from scratch, NOT assume that this susbet is equivalent to the empty subset.
By explicitly creating a None value for candidate_slice / true_slice in these cases, we force authors of conditions to handle these cases through the type system. This already uncovered a potential bug in the new UpdatedSinceCron condition, in which it would return an empty set in the case that a partition was updated since the latest cron tick, but then the partitions definition was updated.
How I Tested These Changes