Nataneljpwd commented on code in PR #73779:
URL: https://github.com/apache/airflow/pull/73779#discussion_r4507767751
##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/custom_object_launcher.py:
##########
@@ -41,6 +42,20 @@
from airflow.providers.common.compat.sdk import AirflowException
from airflow.utils.log.logging_mixin import LoggingMixin
+# Size of each memory unit in MiB. As in Spark, lowercase ``m`` means MiB, and
decimal
+# and binary units are treated alike.
+_MEMORY_UNITS_IN_MIB = {"k": 1 / 1024, "m": 1, "g": 1024, "t": 1024 * 1024}
Review Comment:
Why not use the built k8s python API parse and format quantity?
##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/custom_object_launcher.py:
##########
@@ -157,23 +172,10 @@ def executor_resources(self):
return executor
def convert_resources(self):
Review Comment:
Same as above
--
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]