uranusjr commented on code in PR #23061:
URL: https://github.com/apache/airflow/pull/23061#discussion_r852494679
##########
airflow/providers/presto/hooks/presto.py:
##########
@@ -47,14 +47,8 @@ def generate_presto_client_info() -> str:
)
for format_map in AIRFLOW_VAR_NAME_FORMAT_MAPPING.values()
}
- task_info = {
- 'dag_id': context_var['dag_id'],
- 'task_id': context_var['task_id'],
- 'execution_date': context_var['execution_date'],
- 'try_number': context_var['try_number'],
- 'dag_run_id': context_var['dag_run_id'],
- 'dag_owner': context_var['dag_owner'],
- }
+ task_info_keys = ['dag_id', 'task_id', 'execution_date', 'try_number',
'dag_run_id', 'dag_owner']
+ task_info = {k: context_var.get(k, '') for k in task_info_keys}
Review Comment:
Let’s only use `get` for `try_number` (which is causing the issue, other
keys all exist from what I know). This makes debugging easier.
--
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]