amoghrajesh commented on code in PR #73607:
URL: https://github.com/apache/airflow/pull/73607#discussion_r4375681054
##########
dev/registry/tests/test_extract_parameters.py:
##########
@@ -618,6 +629,70 @@ def _wrap_in_foreign_module(func):
return foreign.__dict__["wrapper"]
+class GrandparentCallingOverridableHelper:
+ """Its execute() dispatches to a helper a subclass is free to replace."""
+
+ def execute(self, context):
+ return self.run_job(context)
+
+ def run_job(self, context):
+ return None
+
+
+class MiddleDelegatingToSuperExecute(GrandparentCallingOverridableHelper):
+ def execute(self, context):
+ return super().execute(context)
+
+
+class SubclassOverridingHelperToDefer(MiddleDelegatingToSuperExecute):
+ """Only the subclass's copy of `run_job` defers, and the call to it lives
two hops up
+ the chain. Resolving `self.<name>()` against the class the hop landed on
instead of the
+ class being asked about finds the grandparent's inert copy and reports not
deferrable.
+ """
+
+ def run_job(self, context):
+ return self.defer()
+
+ def defer(self, *args, **kwargs):
+ return None
+
+
+class SharedHelperReachedAtTwoBudgets:
Review Comment:
Yep, handled in 3b2c8902cac
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]