Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename CLI flag that specifies execution date #44282

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

uranusjr
Copy link
Member

The 'airflow dags trigger' command takes -e and --exec-date referring to the legacy "execution date" name. New -l and --logical-date flags have been added to refer to the new "logical date" name.

A custom argument action is implemented to emit a deprecation message when either -e or --exec-date is used instead of the new flags. Note that we do not use warnings.warn() here, but emit a message directly to stderr, because this is intended to be fired by a CLI call, which does not want the call stack provided by warnings.warn(). This is also what argparse does when you use the new 'deprecated' option on an argument (new in Python 3.13).

@uranusjr
Copy link
Member Author

Actually, we might want to remove this argument entirely instead, and prefer data interval fields. Converting this to draft for now.

@uranusjr uranusjr marked this pull request as draft November 22, 2024 11:00
The 'airflow dags trigger' command takes -e and --exec-date referring
to the legacy "execution date" name. New -l and --logical-date flags
have been added to refer to the new "logical date" name.

A custom argument action is implemented to emit a deprecation message
when either -e or --exec-date is used instead of the new flags. Note
that we do not use warnings.warn() here, but emit a message directly to
stderr, because this is intended to be fired by a CLI call, which does
not want the call stack provided by warnings.warn(). This is also what
argparse does when you use the new 'deprecated' option on an argument
(new in Python 3.13).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant