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/04/01 11:42:32 UTC
[GitHub] [airflow] uranusjr commented on a change in pull request #22679: Expand mapped tasks at DagRun.Veriy_integrity
uranusjr commented on a change in pull request #22679:
URL: https://github.com/apache/airflow/pull/22679#discussion_r840504427
##########
File path: airflow/models/mappedoperator.py
##########
@@ -511,6 +510,16 @@ def _get_map_lengths(self, run_id: str, *, session: Session) -> Dict[str, int]:
return map_lengths
+ def get_indexes_to_map(self, run_id: str, *, session: Session) -> range:
+ total = 0
+ try:
+ values = self._get_map_lengths(run_id, session=session).values()
Review comment:
We can only ever be able to expand tasks with literal-only kwargs at this point, so we probably don’t need to call `_get_map_lengths` (which is expensive and accesses db), but instead rely solely on the task kwargs to get this length.
--
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