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/12/06 09:31:46 UTC

[GitHub] [airflow] hussein-awala commented on a diff in pull request #28113: Improve past depends handling in Airflow CLI tasks.run command

hussein-awala commented on code in PR #28113:
URL: https://github.com/apache/airflow/pull/28113#discussion_r1040713987


##########
airflow/cli/commands/task_command.py:
##########
@@ -226,7 +227,9 @@ def _run_task_by_executor(args, dag, ti):
         mark_success=args.mark_success,
         pickle_id=pickle_id,
         ignore_all_deps=args.ignore_all_dependencies,
-        ignore_depends_on_past=args.ignore_depends_on_past,
+        ignore_depends_on_past=(
+            args.ignore_depends_on_past or args.depends_on_past == PastDependenciesAction.IGNORE
+        ),

Review Comment:
   The default value for the first part is still `False`, the goal of this `or` is to support the new configuration and maintain b/c for the existing argument until remove it:
   - if  `--ignore-depends-on-past` is set -> ignore_depends_on_past will be `True` regardless the value of `--depends-on-past` (`True or <anything>`)
   - if not:
     - and `--depends-on-past check` (default) ->  ignore_depends_on_past will be `False`  (`False or False`)
     - and `--depends-on-past ignore` ->  ignore_depends_on_past will be `True` (`False or True`)



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