Skip to content

Improve Help Texts in airflowctl #57632

Description

@bugraoz93

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?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. self-assigned this
    on Oct 31, 2025
  2. added theissue type on Oct 31, 2025
  3. Prab-27 commented on Nov 1, 2025

    @Prab-27
    Contributor

    @bugraoz93 , I’d like to work on this and test the airflowctl dags pause/unpause command 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!

  4. Prab-27 commented on Nov 1, 2025

    @Prab-27
    Contributor

    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

  5. bugraoz93 commented on Nov 1, 2025

    @bugraoz93
    ContributorAuthor

    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() from cli_parser.py, where it gives the entire commands included into airflowctl
    • easier integration into auto-generation since we are building the parser and 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 CommandFactory

  6. bugraoz93 commented on Nov 1, 2025

    @bugraoz93
    ContributorAuthor

    This way, anyone includes a new operation needs to fill help text from these files and will fail pre-commit otherwise

  7. potiuk commented on Nov 1, 2025

    @potiuk
    Member

    Nice!

  8. potiuk commented on Mar 2, 2026

    @potiuk
    Member

    @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.

  9. Prab-27 commented on Mar 3, 2026

    @Prab-27
    Contributor

    Will work on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions