-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[da] Update initial_evaluation condition to only detect partitions_def changes #28764
[da] Update initial_evaluation condition to only detect partitions_def changes #28764
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
0f24812
to
1bf7067
Compare
0f162e3
to
e15f221
Compare
9fb6c5f
to
bcfbae2
Compare
e15f221
to
82a0ba9
Compare
1806c05
to
b1d71f3
Compare
82a0ba9
to
4bcd8ad
Compare
condition_tree_id = context.root_context.condition.get_unique_id() | ||
if context.previous_true_subset is None or condition_tree_id != context.cursor: | ||
if self._is_initial_evaluation(context): |
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.
to sanity check - there is no risk of this firing incorrectly since we are making the rule strictly more permissive.
If you had previously changed just the parittions definition of the asset and nothing else, would this rule have fired? (i.e. would that have impacted the condition_tree_id)?
@@ -68,11 +69,14 @@ def _result_iter(r): | |||
return initial_evaluation_result.true_subset.size | |||
|
|||
|
|||
def test_update_on_condition_change() -> None: | |||
@pytest.mark.parametrize("pd_change", [True, False]) |
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.
nit this is a strange acronym choice :)
b1d71f3
to
e8d9cae
Compare
…f changes (#28764) ## Summary & Motivation This is actually more aligned with the purpose of this condition, as you could imagine having an unpartitioned asset with `AutomationCondition.eager()` being turned into a static-partitioned asset with 100s of partitions and experiencing the bad behavior of all partitions updating. It's also more accurate that this is the "initial_evaluation" of those partitions in this case. ## How I Tested These Changes ## Changelog The `AutomationCondition.initial_evaluation` condition has been updated to become true for all partitions of an asset whenever the PartitionsDefinition of that asset changes, rather than whenever the structure of the condition changes.
Summary & Motivation
This is actually more aligned with the purpose of this condition, as you could imagine having an unpartitioned asset with
AutomationCondition.eager()
being turned into a static-partitioned asset with 100s of partitions and experiencing the bad behavior of all partitions updating.It's also more accurate that this is the "initial_evaluation" of those partitions in this case.
How I Tested These Changes
Changelog
The
AutomationCondition.initial_evaluation
condition has been updated to become true for all partitions of an asset whenever the PartitionsDefinition of that asset changes, rather than whenever the structure of the condition changes.