nuclearpinguin commented on a change in pull request #7576: [AIRFLOW-6933] Pass in env vars for all operators URL: https://github.com/apache/airflow/pull/7576#discussion_r385638634
########## File path: airflow/models/taskinstance.py ########## @@ -915,6 +916,12 @@ def signal_handler(signum, frame): start_time = time.time() self.render_templates(context=context) + # Export context to make it available for operators to use. + airflow_context_vars = context_to_airflow_vars(context, in_env_var_format=True) + self.log.info("Exporting the following env vars:\n%s", + '\n'.join(["{}={}".format(k, v) Review comment: ```suggestion vars = [list(i) for i in airflov_context_vars.items()] self.log.info("Exporting the following env vars:\n" + "%s=%s\n" * len(vars), *sum(vars, [])) ``` What do you think? In this way we will fix one pylint error (not caught yet because this file is still in todo) :) (the `sum(vars, [])` is a fastest flat map in python) ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services