fat-catTW commented on code in PR #74461:
URL: https://github.com/apache/airflow/pull/74461#discussion_r4245590562


##########
airflow-core/src/airflow/models/connection.py:
##########


Review Comment:
   Thanks for the update
   I think this URI/individual-values guard also needs to account for `port=0`.
   
   Now that `0` is a valid port, this check still uses the truthiness of `port`:
   
   ```python
   if uri and (conn_type or host or login or password or schema or port or 
extra):
   ```
   So `Connection(uri="http://example.com";, port=0)` does not raise, even 
though it mixes URI input with an individual field. The `port=0` value is then 
silently ignored because the URI parsing path wins.
   Could we change the port part to `port is not None` and add a small 
regression test for `Connection(uri=..., port=0)`?



-- 
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]

Reply via email to