amoghrajesh commented on code in PR #28911:
URL: https://github.com/apache/airflow/pull/28911#discussion_r1069116899
##########
airflow/providers/http/hooks/http.py:
##########
@@ -147,7 +147,11 @@ def run(
req = requests.Request(self.method, url, data=data,
headers=headers, **request_kwargs)
prepped_request = session.prepare_request(req)
- self.log.info("Sending '%s' to url: %s", self.method, url)
+
+ log_request = request_kwargs.pop('log_request', True)
+ if log_request:
+ self.log.info("Sending '%s' to url: %s", self.method, url)
Review Comment:
I made it a debug log and then toied to test with the current changes for
log_request. I keep encountering this error while loading the testing DAG:
```
filepath | error
│e this message.[0m (Background on SQLAlchemy
2.0 at: https://sqlalche.me/e/b8d9)
===========================+===================================================================================│
____________ _____________
/files/dags/example_api.py | Traceback (most recent call last):
│ ____ |__( )_________ __/__ /________
__
| File
"/opt/airflow/airflow/models/baseoperator.py", line 397, in apply_defaults
│____ /| |_ /__ ___/_ /_ __ /_ __ \_ | /| / /
| result = func(self, **kwargs,
default_args=default_args) │___ ___ | / _ / _ __/ _
/ / /_/ /_ |/ |/ /
| File
"/opt/airflow/airflow/models/baseoperator.py", line 749, in __init__ │
_/_/ |_/_/ /_/ /_/ /_/ \____/____/|__/
| raise AirflowException(
│[2023-01-13T08:43:32.749+0000]
{triggerer_job.py:101} INFO - Starting the triggerer
| airflow.exceptions.AirflowException: Invalid
arguments were passed to │
| SimpleHttpOperator (task_id: get_posts).
Invalid arguments were: │
| **kwargs: {'log_request': False}
```
The DAG I am using is attached to this thread (changed to txt to be able to
upload here):
[example_api.txt](https://github.com/apache/airflow/files/10409929/example_api.txt)
--
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]