Repository navigation
Improve Help Texts in airflowctl #57632
Description
Activity
@bugraoz93 , I’d like to work on this and test the
airflowctl dags pause/unpausecommand to make sure it behaves as expected.If you’ve already started working on it or plan to pick it up soon—and we’re not running late—
I’m happy to choose another airflowctl issue instead. Just let me know what works best!If yes, how can I achieve this? I understand the pre-commit part, but I’m a bit unclear about the YAML/JSON-based approach
Thanks @Prab-27! I will take care of #57630 and #57629 to speed up the release of initial versions. Thanks a lot for asking!
This one can be included in later releases, after discussion in the voting attached to this issue, so I would be happy for you to take this one. My idea, while writing this file-based approach, has a couple of advantages. Open to different ideas for sure. The idea is to make it
- single source of truth
- easy to validate in the pre-commit using
get_parser()fromcli_parser.py, where it gives the entire commands included into airflowctl - easier integration into auto-generation since we are building the
parserand these are mainly impacting auto-generated ones, since we are writing specific help text for those custom-built ones
So the YAML/JSON could look like, which should be only used for auto-generated from the operation method implemented. This would mean auth won't be included since it is a custom-created under
commands/assets: - create-event: "Creat an event for a given Asset ID" - get: "Retrieve an asset for a given Asset ID" - .... backfill: - create: "Create a backfill job for a given Dag ID and date range" - get: "Retrieve backfill job details for a given backfill ID" - list: "List all backfill jobs" - ....
{ "assets": { "create-event": "Creates event for a given asset", "get": "Retrieve an asset for a given asset-id", "...": "..." }, "backfill": { "create": "Create a backfill job for a given Dag id and date range", "get": "Retrieve backfill job details for a given backfill ID", "list": "List all backfill jobs", "...": "..." } }Then we will add these instead of generating inside
CommandFactoryReacted by Pratiksha Badheka and Jarek PotiukThis way, anyone includes a new operation needs to fill help text from these files and will fail pre-commit otherwise
Reacted by Pratiksha Badheka and Jarek PotiukNice!
Reacted by Pratiksha Badheka@Prab-27 We are unassigning you from this issue as part of our updated assignment policy.
This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.
We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.
Will work on this
Reacted by Bugra Ozturk
Description
The current help texts are auto-generated. We need a YAML, JSON-based approach to map these help texts easily, and while onboarding new commands, we can easily update them.
Bonus: Include pre-commit checking the fact that a new command is added, but no help text is there.
Use case/motivation
https://lists.apache.org/thread/cnz3k2pox69ddkk647mt8gpfy0t70f94
Related issues
No response
Are you willing to submit a PR?
Code of Conduct