dj-wise-ronin commented on PR #70052:
URL: https://github.com/apache/airflow/pull/70052#issuecomment-5016813799
Thanks for the review, @SameerMesiah97!
I have refactored the codebase to share the connection port range validation
logic between `airflow-core` (`Connection` SQLAlchemy model) and `task-sdk`
(`Connection` class):
1. **Shared Port Validator:** Created a central `parse_and_validate_port`
validator helper within the shared configurations package
(`airflow_shared.configuration.connection`).
2. **Refactored Models:**
- Core `Connection` model's `@validates("port")` method now delegates
directly to the shared validator.
- Task SDK `Connection` model's `__attrs_post_init__` method delegates to
the shared validator.
3. **Tests:** Updated and verified that all existing tests in both
`airflow-core` and `task-sdk` pass successfully.
Let me know if there's anything else you'd like adjusted!
--
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]