Repository navigation
Conversation
`airflowctl ... --output table` and `--output plain` passed values to Rich as markup, so a value such as `[/b]` crashed the command with a MarkupError and a value such as `s3://[bucket]/path` silently lost its bracketed part. Render the values literally, as `--output json` and `--output yaml` already do.
Column headers were still passed to Rich as markup, so a key such as `[/b]` raised a MarkupError and `[red]name[/red]` lost its tags in `--output table`. Escape them like the cell values, and run the output tests once per value, including a backslash before a tag.
|
Merged from main to include the CI fix |
potiuk
left a comment
There was a problem hiding this comment.
Thanks — escape for the Rich table and markup=False for the already-formatted plain output is the right split, and the tests cover the crash ([/b]) and the silent loss (s3://[bucket]/path) in both values and headers.
This review was drafted by an AI-assisted tool and
confirmed by an Apache Airflow maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.More on how Apache Airflow handles maintainer review:
Contributing guide.
Backport successfully created: airflow-ctl/v0-1-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
…plain output as typed (#76175) (#76205) * Show square brackets in airflowctl table and plain output as typed `airflowctl ... --output table` and `--output plain` passed values to Rich as markup, so a value such as `[/b]` crashed the command with a MarkupError and a value such as `s3://[bucket]/path` silently lost its bracketed part. Render the values literally, as `--output json` and `--output yaml` already do. * Show square brackets in airflowctl table headers as typed Column headers were still passed to Rich as markup, so a key such as `[/b]` raised a MarkupError and `[red]name[/red]` lost its tags in `--output table`. Escape them like the cell values, and run the output tests once per value, including a backslash before a tag. --------- (cherry picked from commit 117f115) Co-authored-by: Rishabh <[email protected]> Co-authored-by: Shahar Epstein <[email protected]>
airflowctl ... --output tableand--output plainpassed values to Rich as markup, so a value such as[/b]crashed the command with a MarkupError and a value such ass3://[bucket]/pathsilently printed ass3:///path. Render the values literally, as--output jsonand--output yamlalready do.Two new tests in
test_console_formatting.pyfail without this change and pass with it. The full airflow-ctl test suite passes locally.