ashb commented on code in PR #54461:
URL: https://github.com/apache/airflow/pull/54461#discussion_r2276188945


##########
airflow-core/src/airflow/utils/__init__.py:
##########
@@ -45,6 +45,19 @@
     "timeout": {
         "timeout": "airflow.sdk.execution_time.timeout.timeout",
     },
+    "operator_resources": {
+        "Resources": "airflow.sdk.definitions.operator_resources.Resources",
+        "Resource": "airflow.sdk.definitions.operator_resources.Resource",
+        "MB": "airflow.sdk.definitions.operator_resources.MB",
+        "GB": "airflow.sdk.definitions.operator_resources.GB",
+        "TB": "airflow.sdk.definitions.operator_resources.TB",
+        "PB": "airflow.sdk.definitions.operator_resources.PB",
+        "EB": "airflow.sdk.definitions.operator_resources.EB",
+        "CpuResource": 
"airflow.sdk.definitions.operator_resources.CpuResource",
+        "RamResource": 
"airflow.sdk.definitions.operator_resources.RamResource",
+        "DiskResource": 
"airflow.sdk.definitions.operator_resources.DiskResource",
+        "GpuResource": 
"airflow.sdk.definitions.operator_resources.GpuResource",

Review Comment:
   Yup, you can do this, or could do it as `*` like we do in timezone a few 
lines up



##########
task-sdk/src/airflow/sdk/bases/operator_resources.py:
##########


Review Comment:
   This shouldn't be in bases -- this is for classes that we expect users to 
subclass, also you have the compat shim looking at 
`airflow.sdk.definitions.operator_resources` which I think is the 
better/correct place to put these.



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