shahar1 opened a new pull request, #76621: URL: https://github.com/apache/airflow/pull/76621
Backport of #76265 to `airflow-ctl/v0-1-test`. The automatic backport failed on conflicts. airflowctl printed server error text, Dag run ids and logical dates as Rich markup. A value containing a tag-like fragment such as `[/x]` raised `MarkupError`, so the user got a traceback instead of the error. Conflict resolution: - This branch has no `ctl/utils/dag_run.py`. Its escapes go to the lookup helpers kept inline in `dag_command.py` and `task_command.py`, and its tests are rewritten against `dags state` and `tasks states-for-dag-run`. - `dags clear` and `tasks failed-deps`, `state` and `logs` do not exist here, so their escapes and tests are dropped. - "Error retrieving DAG" keeps this branch's wording. Tests: all 743 airflowctl unit tests pass. Removing any escape fails a test, except the rejected value in the two logical-date not-found messages, which has already passed `datetime.fromisoformat` and cannot contain markup. This is the same exception as in #76265, and it appears twice because the helper exists twice here. (cherry picked from commit abc3a20f080a06dbd81b55fea028c22179cd6380) --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 5.5) Generated-by: Claude Code (Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01BVx6gA44HQY4GEf2fEAQwE -- 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]
