apache / apache/airflow

Switch positional logical-date-or-run-id CLI argument to a flag?

Open
#46,506 8 comments 0 reactions 0 assignees View on GitHub
airflow3.0:breaking area:CLI
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 10h
Merged PRs (30d)
483

Description

### Body

Raised during review of #46407.

We introduced `logical_date_or_run_id` back in 2.2 when we started enforcing the DR-TI relationship so people can select a TI with run_id instead of execution_date. The argument was implemented as a “smart” positional argument because we needed to maintain backward compatibility of the CLI. With 3.0, however, it is possible to get rid of the magic and require the user to pass in a named argument instead, so instead of

```
$ airflow tasks run
```

the user must write

```
$ airflow tasks run --run-id
```

or

```
$ airflow tasks run --logical-date
```

This feels like an improvement in a vacuum, but is it worthwhile as a breaking change?

### Committer

- [x] I acknowledge that I am a maintainer/committer of the Apache Airflow project.

Contributor guide

Open the contributing guide

Research direction

Start at the `airflow tasks run` CLI entry point and review how `logical_date_or_run_id` is currently accepted as a positional argument. Compare the compatibility implications of `--run-id` and `--logical-date`; the issue is done when the breaking-change decision and any required command or compatibility tests are clearly defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.