This is an automated email from the ASF dual-hosted git repository. jedcunningham pushed a commit to branch v2-2-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 581fcfdd58705a44c24cacbe364786b0422a0d1d Author: Kaxil Naik <[email protected]> AuthorDate: Fri Dec 17 20:47:49 2021 +0000 Remove unnecssary logging in experimental API (#20356) The `execution_data` does not need to be passed to log. We send enough details to the API user in the response. (cherry picked from commit 790bc784435646c043d8def7096917a4ce0a62f7) --- airflow/www/api/experimental/endpoints.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/airflow/www/api/experimental/endpoints.py b/airflow/www/api/experimental/endpoints.py index 91528e9..30c2728 100644 --- a/airflow/www/api/experimental/endpoints.py +++ b/airflow/www/api/experimental/endpoints.py @@ -103,11 +103,11 @@ def trigger_dag(dag_id): try: execution_date = timezone.parse(execution_date) except ValueError: + log.error("Given execution date could not be identified as a date.") error_message = ( 'Given execution date, {}, could not be identified ' 'as a date. Example date format: 2015-11-16T14:34:15+00:00'.format(execution_date) ) - log.error(error_message) response = jsonify({'error': error_message}) response.status_code = 400 @@ -253,11 +253,11 @@ def task_instance_info(dag_id, execution_date, task_id): try: execution_date = timezone.parse(execution_date) except ValueError: + log.error("Given execution date could not be identified as a date.") error_message = ( 'Given execution date, {}, could not be identified ' 'as a date. Example date format: 2015-11-16T14:34:15+00:00'.format(execution_date) ) - log.error(error_message) response = jsonify({'error': error_message}) response.status_code = 400 @@ -289,11 +289,11 @@ def dag_run_status(dag_id, execution_date): try: execution_date = timezone.parse(execution_date) except ValueError: + log.error("Given execution date could not be identified as a date.") error_message = ( 'Given execution date, {}, could not be identified ' 'as a date. Example date format: 2015-11-16T14:34:15+00:00'.format(execution_date) ) - log.error(error_message) response = jsonify({'error': error_message}) response.status_code = 400 @@ -402,11 +402,11 @@ def get_lineage(dag_id: str, execution_date: str): try: execution_dt = timezone.parse(execution_date) except ValueError: + log.error("Given execution date could not be identified as a date.") error_message = ( 'Given execution date, {}, could not be identified ' 'as a date. Example date format: 2015-11-16T14:34:15+00:00'.format(execution_date) ) - log.error(error_message) response = jsonify({'error': error_message}) response.status_code = 400
