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/28 15:35:16 UTC

[GitHub] [airflow] ashb opened a new pull request #21871: Add map_index to pods launched by KubernetesExecutor

ashb opened a new pull request #21871:
URL: https://github.com/apache/airflow/pull/21871


   I also did a slight drive-by-refactor (sorry!) to rename `queued_tasks and `task` inside `clear_not_launched_queued_tasks` to `queued_tis` and `ti` to reflect what they are.
   
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.md).


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



[GitHub] [airflow] ashb merged pull request #21871: Add map_index to pods launched by KubernetesExecutor

Posted by GitBox <gi...@apache.org>.
ashb merged pull request #21871:
URL: https://github.com/apache/airflow/pull/21871


   


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



[GitHub] [airflow] github-actions[bot] commented on pull request #21871: Add map_index to pods launched by KubernetesExecutor

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #21871:
URL: https://github.com/apache/airflow/pull/21871#issuecomment-1055570099


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


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



[GitHub] [airflow] ashb commented on a change in pull request #21871: Add map_index to pods launched by KubernetesExecutor

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #21871:
URL: https://github.com/apache/airflow/pull/21871#discussion_r816003916



##########
File path: airflow/models/taskinstance.py
##########
@@ -2074,11 +2074,13 @@ def render_k8s_pod_yaml(self) -> Optional[dict]:
         kube_config = KubeConfig()
         pod = PodGenerator.construct_pod(
             dag_id=self.dag_id,
+            run_id=self.run_id,
             task_id=self.task_id,
+            map_index=self.map_index,
+            date=None,
             pod_id=create_pod_id(self.dag_id, self.task_id),
             try_number=self.try_number,
             kube_image=kube_config.kube_image,
-            date=self.execution_date,

Review comment:
       Should be okay, as we only include the label if it is gte 0
   
   https://github.com/apache/airflow/pull/21871/files#diff-01764c9ba7b2270764a59e7ff281c95809071b1f801170ee75a02481a8a730aaR359-R360
   
   
   I still think I'm missing some a case --  I haven't made a change to the matching "pod is finished" side of things to get the TI by map_index...




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



[GitHub] [airflow] ashb commented on pull request #21871: Add map_index to pods launched by KubernetesExecutor

Posted by GitBox <gi...@apache.org>.
ashb commented on pull request #21871:
URL: https://github.com/apache/airflow/pull/21871#issuecomment-1055205779


   @dstandish I'll do that as a separate PR


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



[GitHub] [airflow] ashb commented on a change in pull request #21871: Add map_index to pods launched by KubernetesExecutor

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #21871:
URL: https://github.com/apache/airflow/pull/21871#discussion_r816016407



##########
File path: airflow/models/taskinstance.py
##########
@@ -2074,11 +2074,13 @@ def render_k8s_pod_yaml(self) -> Optional[dict]:
         kube_config = KubeConfig()
         pod = PodGenerator.construct_pod(
             dag_id=self.dag_id,
+            run_id=self.run_id,
             task_id=self.task_id,
+            map_index=self.map_index,
+            date=None,
             pod_id=create_pod_id(self.dag_id, self.task_id),
             try_number=self.try_number,
             kube_image=kube_config.kube_image,
-            date=self.execution_date,

Review comment:
       Ah, added in https://github.com/apache/airflow/pull/21871/commits/d25926e711bf04e5fb2255a2db767ce6423c3c9c




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



[GitHub] [airflow] uranusjr commented on a change in pull request #21871: Add map_index to pods launched by KubernetesExecutor

Posted by GitBox <gi...@apache.org>.
uranusjr commented on a change in pull request #21871:
URL: https://github.com/apache/airflow/pull/21871#discussion_r816002648



##########
File path: airflow/models/taskinstance.py
##########
@@ -2074,11 +2074,13 @@ def render_k8s_pod_yaml(self) -> Optional[dict]:
         kube_config = KubeConfig()
         pod = PodGenerator.construct_pod(
             dag_id=self.dag_id,
+            run_id=self.run_id,
             task_id=self.task_id,
+            map_index=self.map_index,
+            date=None,
             pod_id=create_pod_id(self.dag_id, self.task_id),
             try_number=self.try_number,
             kube_image=kube_config.kube_image,
-            date=self.execution_date,

Review comment:
       Not sure about compatibility here, otherwise lgtm.




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



[GitHub] [airflow] dstandish commented on pull request #21871: Add map_index to pods launched by KubernetesExecutor

Posted by GitBox <gi...@apache.org>.
dstandish commented on pull request #21871:
URL: https://github.com/apache/airflow/pull/21871#issuecomment-1054631447


   @ashb if you want to consider it in-scope, i think we'll also have to update KPO: https://github.com/apache/airflow/blob/main/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py#L275


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