Pedrinhonitz commented on issue #72318:
URL: https://github.com/apache/airflow/issues/72318#issuecomment-5478417197
Hello,
Thank you for your contribution.
I was reviewing the issue you reported and ran some tests. From what I
gather, the CLI works because it uses the database credentials directly;
however, when performing the operation via the UI, the system compares the UI's
port and host settings with those in the database to decide whether to merge
the password fields or the additional fields.
The value in the database is `NULL` (which Python stores as `None`), but the
UI sends a JSON object containing an empty string (`""`), causing the
comparison to fail.
As a result, the merge does not occur, and the hook receives `"***"` for the
`private_key_file` field, triggering the error: `The private_key_file path
points to an empty or invalid file.`
In this section of code:
```python
if ("host" in fields_set and test_body.host != existing_conn.host) or
("port" in fields_set and test_body.port != existing_conn.port):
```
I will run a few more tests, and then we can discuss a solution.
--
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]