You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/02/01 02:40:45 UTC

[GitHub] [airflow] subkanthi commented on a change in pull request #21077: Kubernetes decorator

subkanthi commented on a change in pull request #21077:
URL: https://github.com/apache/airflow/pull/21077#discussion_r796227432



##########
File path: airflow/utils/python_kubernetes_script.jinja2
##########
@@ -0,0 +1,44 @@
+{#

Review comment:
       currently this template is loaded using the
   `write_python_script` function in python_virtualenv.py, it shared by virtualenv and docker decorators. Thats why the jinja template needs to be in the same folder. 
   Ideally we should move this function out of python_virtualenv.

##########
File path: airflow/decorators/__init__.pyi
##########
@@ -126,7 +126,25 @@ class TaskDecoratorCollection:
             such as transmission a large amount of XCom to TaskAPI.
         """
     @overload
-    def virtualenv(self, python_callable: Function) -> Function: ...
+    def virtualenv(self, python_callable: F) -> F: ...
+    @overload
+    def kubernetes(
+        python_callable: Optional[Callable] = None, multiple_outputs: Optional[bool] = None, **kwargs
+    ) -> TaskDecorator:

Review comment:
       Moved, thanks
   

##########
File path: airflow/decorators/__init__.py
##########
@@ -22,6 +22,7 @@
 from airflow.decorators.python_virtualenv import virtualenv_task
 from airflow.decorators.task_group import task_group
 from airflow.models.dag import dag
+from airflow.providers.cncf.kubernetes.decorators.kubernetes import kubernetes_task

Review comment:
       Removed.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org