Lee-W commented on code in PR #69454:
URL: https://github.com/apache/airflow/pull/69454#discussion_r3536854051
##########
airflow-core/src/airflow/cli/commands/partition_command.py:
##########
@@ -64,8 +66,12 @@ def clear(args, *, session: Session = NEW_SESSION) -> None:
args.end_date = parsedate(parts[1].strip())
except ValueError:
raise SystemExit("--date sides must be parseable as a date or
datetime.")
+ has_start = has_end = True
- has_date_window = args.start_date is not None or args.end_date is not None
+ if has_start and has_end and args.start_date > args.end_date:
+ raise SystemExit("--start-date must be on or before --end-date.")
Review Comment:
Sounds good! Just fixed. When the window comes from `--date a~b`, the error
now names `--date` and echoes the two sides you actually typed,
e.g., `--date: the start of the range ('...') must be on or before the end
('...').`
--
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]