dj-wise-ronin opened a new pull request, #70052:
URL: https://github.com/apache/airflow/pull/70052

   ### Description
   Connection models in Apache Airflow accept integer values for the `port` 
field but do not enforce that the value is a valid network port in the range 
`[1, 65535]`.
   This PR adds validation logic to connection ports at three layers:
   1. **SQLAlchemy Connection model** validation via `@validates("port")` to 
ensure port numbers assigned are integers between 1 and 65535.
   2. **Task SDK Connection model** validation in `__attrs_post_init__` to 
enforce range limits and format validation during standard instantiation and 
URI parsing.
   3. **Pydantic API datamodel** validation using `Field(ge=1, le=65535)` on 
the REST API gateway connections schema.
   
   Additionally, this PR includes comprehensive unit tests verifying the 
validation rules for both the SQLAlchemy and Task SDK model implementations.


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