Skip to content

Conversation

@jedcunningham
Copy link
Member

While it would ideal to transition to a positional arg like was
attempted in #25978, this unfortunately does result in a breaking change
so we cannot do it now.

By instead marking the existing arg as required, we maintain backcompat
while also providing a helpful error message to the user if they forget
it.

(It is possible to get both a flagged and positional arg working, but I didn't like the complexity necessary in the help docs and code to explain precedence etc. If someone feels strongly about supporting a positional arg, I can take another look at it, or we can do it down the road too.)

@jedcunningham jedcunningham added this to the Airflow 2.4.0 milestone Sep 12, 2022
@jedcunningham jedcunningham added the type:bug-fix Changelog: Bug Fixes label Sep 12, 2022
@ashb
Copy link
Member

ashb commented Sep 14, 2022

Looks like you are breaking something else message = '\nairflow dags list-jobs command error: the following arguments are required: -d/--dag-id, see help above.\n'

While it would ideal to transition to a positional arg like was
attempted in apache#25978, this unfortunately does result in a breaking change
so we cannot do it now.

By instead marking the existing arg as required, we maintain backcompat
while also providing a helpful error message to the user if they forget
it.
@jedcunningham jedcunningham changed the title Require dag_id arg for dags list-runs and list-jobs Require dag_id arg for dags list-runs Sep 14, 2022
@jedcunningham jedcunningham requested a review from ashb September 14, 2022 14:45
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
@jedcunningham
Copy link
Member Author

Merging as static check failures is already fixed in main.

@jedcunningham jedcunningham merged commit f6c579c into apache:main Sep 14, 2022
@jedcunningham jedcunningham deleted the unbreak_backcompat branch September 14, 2022 17:03
jedcunningham added a commit that referenced this pull request Sep 15, 2022
While it would ideal to transition to a positional arg like was
attempted in #25978, this unfortunately does result in a breaking change
so we cannot do it now.

By instead marking the existing arg as required, we maintain backcompat
while also providing a helpful error message to the user if they forget
it.

This reverts commit ed6ea72.

(cherry picked from commit f6c579c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:CLI type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants