amoghrajesh commented on code in PR #53393:
URL: https://github.com/apache/airflow/pull/53393#discussion_r2215150857
##########
airflow-core/src/airflow/utils/__init__.py:
##########
@@ -46,5 +46,11 @@ def __getattr__(name: str):
"xcom": {
"XCOM_RETURN_KEY": "airflow.models.xcom.XCOM_RETURN_KEY",
},
+ "weight_rule": {
+ "WeightRule": "airflow.sdk.definitions.weight_rule.WeightRule",
+ "db_safe_priority":
"airflow.sdk.definitions.weight_rule.db_safe_priority",
+ "DB_SAFE_MINIMUM":
"airflow.sdk.definitions.weight_rule.DB_SAFE_MINIMUM",
+ "DB_SAFE_MAXIMUM":
"airflow.sdk.definitions.weight_rule.DB_SAFE_MAXIMUM",
Review Comment:
These are only used in task sdk and that too in BaseOperator only. Move the
constants and the method into BaseOperator i'd say. No point of keeping a
module. And also the tests.
##########
airflow-core/src/airflow/utils/__init__.py:
##########
@@ -46,5 +46,11 @@ def __getattr__(name: str):
"xcom": {
"XCOM_RETURN_KEY": "airflow.models.xcom.XCOM_RETURN_KEY",
},
+ "weight_rule": {
+ "WeightRule": "airflow.sdk.definitions.weight_rule.WeightRule",
Review Comment:
WeightRule is used in config + sdk.
This one could probably just be duplicated.
--
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]