Eason09053360 opened a new pull request, #73028:
URL: https://github.com/apache/airflow/pull/73028
## Why
All four examples in `airflow permissions-cleanup --help` tell the user to
run the
command under a `fab-auth-manager` group:
```
$ airflow permissions-cleanup --help
...
examples:
To see what orphaned permissions would be cleaned up:
$ airflow fab-auth-manager permissions-cleanup --dry-run
```
That group does not exist. `get_fab_cli_commands()` registers
`PERMISSIONS_CLEANUP_COMMAND` as a bare `ActionCommand`, so it is mounted at
the top
level alongside `sync-perm`. Copying any example straight out of the help
output
fails:
```
$ airflow fab-auth-manager permissions-cleanup --dry-run
airflow command error: argument GROUP_OR_COMMAND: invalid choice:
'fab-auth-manager'
(choose from ... permissions-cleanup ... sync-perm ...), see help above.
```
The wrong prefix has been there since the command was added in #54528, and
`fab-auth-manager` appears nowhere else in the tree — it was never a real
group.
The person reading this help text is by definition the one who does not
already
know the right invocation.
## What
- `providers/fab/src/airflow/providers/fab/cli/definition.py` — drop the
`fab-auth-manager` prefix from the four epilog examples.
- `providers/fab/tests/unit/fab/cli/test_definition.py` — parse every
`$ airflow ...` line of the epilog with the real FAB parser instead of
asserting on
the literal string, so a future example that names a non-existent command
fails the
test. The extraction helper raises when it finds no examples: an empty
`parametrize` set is reported as skipped, which would quietly retire the
guard if
the epilog were ever reformatted.
No behaviour outside the help text changes — exit codes, stdout and flag
semantics
are untouched.
Per `providers/AGENTS.md` this gets no newsfragment; it is also too small to
be worth
a `changelog.rst` entry, but happy to add one if a maintainer prefers.
--
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]