-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Change default backfill policy to BackfillPolicy.multi_run(1) for executable assets #22282
base: master
Are you sure you want to change the base?
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
2a1e03c
to
73a7421
Compare
a79895e
to
73135c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely a premature optimization, but I would probably add cached_method
to default
, or use a constant, so that we don't make a new object per AssetsDefinition
.
73135c8
to
0c0504d
Compare
Deploy preview for dagit-storybook ready! ✅ Preview Built with commit 0c0504d. |
Deploy preview for dagit-core-storybook ready! ✅ Preview Built with commit 0c0504d. |
d377d14
to
3285b44
Compare
c4ca5e6
to
695dac3
Compare
3285b44
to
ff91890
Compare
ff91890
to
caf4b19
Compare
f"Cannot have {ASSET_PARTITION_RANGE_START_TAG} or" | ||
f" {ASSET_PARTITION_RANGE_END_TAG} set along with" | ||
f" {PARTITION_NAME_TAG}" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this restriction no longer makes sense since runs targeting a single partition but launched as part of a backfill will have both of these set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be difficult to avoid setting the range tags in the case that there's a single partition targeted? Not necessarily a blocker if it's complicated, but seems like a safer and less invasive change than adding the range tags to every run from an asset backfill.
if partition_range_start or partition_range_end: | ||
if is_partitioned and partition_tag: | ||
partition = partition_tag | ||
partitions_subset = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AssetMaterializationPlannedData
accepts one non-null value for partition
and partitions_subset
. Prefer partition
if we are targeting a single partition.
@@ -37,53 +36,6 @@ | |||
) | |||
|
|||
|
|||
def test_asset_backfill_not_all_asset_have_backfill_policy(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can delete this test because all assets now have a defined policy.
…erializable assets
caf4b19
to
d9d92e1
Compare
@sryza I made significant updates to this since you reviewed it so you'll want to take another look |
Summary & Motivation
Currently backfill policy defaults to
None
for assets. This null value flows all the way through our backfill machinery, and is interpreted the same way asBackfillPolicy.multi_run(1)
. This is weird because the backfill machinery doesn't recognize the equivalence of these two values.This PR makes it so that the backfill system never deals with null values. We do this by having
AssetsDefinition
default toBackfillPolicy.multi_run(1)
(via a newDEFAULT_BACKFILL_POLICY
constant) for materializable assets. It didn't make sense to default to a non-null value for all assets because the backfill policy really is undefined for unexecutable assets.This is mostly a refactor-- the only intended behavior change from this PR is that if users specify a mix of
None
andBackfillPolicy.multi_run(1)
for backfill policies for their assets, we will no longer error (becauseNone
is now being converted for them).How I Tested These Changes
Existing test suite.