anandhimurali commented on PR #38982: URL: https://github.com/apache/airflow/pull/38982#issuecomment-2114094133
> I have two points I think it's worth addressing: > 1. Whether we pass all the necessary info. I think given task_instance we can call get_template_context and get all the data, so this might not be an issue. > 2. Whether this acts "per DAG/Task" or it's a mechanism that works for all the tasks equally - this might be defined inside the function so it still might not be an issue other than complicating the function a bit more. > > Overall I like the solution, but might be good to specify the goals regarding 1) and 2) - because for sure, later, someone will come and ask "how to make this custom facet work only on some particular tasks" and "how do I pass some custom info to my function". Hi @mobuchowski, 1. Yes, I think `task_instance` is sufficient to fetch necessary info about the run context. 2. The `custom_facet_functions` defined works equally for all tasks. Yes, user can choose to `return None` for scenarios where they won't to add the custom facet. Let me know if this needs to be documented anywhere. Thanks. -- 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]
