You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/04/02 16:24:15 UTC
[GitHub] [airflow] casassg commented on issue #8058: [AIP-31] Add lazy way
to get Airflow context from a wrapped function
casassg commented on issue #8058: [AIP-31] Add lazy way to get Airflow context from a wrapped function
URL: https://github.com/apache/airflow/issues/8058#issuecomment-607949440
I see, I still think we should implement this lazy resolved context. Using the current approach from master means that signatures can mismatch op_args/op_kwargs and would make it difficult to reason about the function signature:
```
@task
def simple_task(text:str, execution_date: datetime):
print(text)
print(execution_date)
simple_task("hello")
```
As you can see this will execute correctly even though the function signature has a an extra argument. This leads to confusion in my personal opinion hence my proposed solution.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services