uranusjr commented on code in PR #28113:
URL: https://github.com/apache/airflow/pull/28113#discussion_r1040740437
##########
airflow/cli/cli_parser.py:
##########
@@ -540,9 +541,18 @@ def string_lower_type(val):
)
ARG_IGNORE_DEPENDS_ON_PAST = Arg(
("-I", "--ignore-depends-on-past"),
- help="Ignore depends_on_past dependencies (but respect upstream
dependencies)",
+ help="Deprecated -- use `--depends-on-past ignore` instead. "
+ "Ignore depends_on_past dependencies (but respect upstream dependencies)",
action="store_true",
)
+ARG_DEPENDS_ON_PAST = Arg(
+ ("-d", "--depends-on-past"),
+ help="Determine how Airflow should deal with past dependencies. The
default action is `check`, Airflow "
+ "will check if the the past dependencies are met for the tasks having
`depends_on_past=True` before run "
+ "them, if `ignore` is provided, the past dependencies will be ignored.",
+ type=PastDependenciesAction,
+ default=PastDependenciesAction.CHECK,
+)
Review Comment:
Hmm, if we’re only doign string comparison, I wonder if it’s better to
simply use `Literal` for this. the value is always coming from argparse, so we
don’t really need the enum for validation.
--
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]