Skip to content

AIP-81 feat (airflowctl): Auto generate basic commands from Client operations - #48146

Merged
bugraoz93 merged 8 commits into
apache:mainfrom
bugraoz93:feat/42562/dynamic-commands-from-operations
Apr 7, 2025
Merged

bugraoz93 merged 8 commits into
apache:mainfrom
bugraoz93:feat/42562/dynamic-commands-from-operations

Conversation

@bugraoz93

@bugraoz93 bugraoz93 commented Mar 23, 2025 •

Copy link
Copy Markdown
Contributor

closes: #42562
Client Operation-Command(1-1) mapping via using Pydantic objects and primitive types.

Done:

  • Parsing Operations/Pydantic Models
  • Generate Args/ActionCommand/GroupCommand
  • Test and update the generated function passed to ActionCommand.
  • Better help tool tips
  • Add unit-tests

Not in Scope:

  • Handle Recursive Pydantic Models
    This is only needed for bulk operations. We can quickly implement import and export files in the current use case. Making bulk operations from CLI doesn't make much sense since CLI is not a place where you can pass hundreds of objects.

Example Pictures:

Screenshot from 2025-03-23 22-35-23

Screenshot from 2025-03-23 22-35-59

Screenshot from 2025-03-23 22-57-35

Usage:
Screenshot from 2025-03-25 22-51-01


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@bugraoz93 bugraoz93 changed the title [WIP] Auto generate basic commands from Client operations [WIP] AIP-81 Auto generate basic commands from Client operations Mar 23, 2025
@bugraoz93
bugraoz93 requested a review from jedcunningham March 23, 2025 21:40
@bugraoz93

bugraoz93 commented Mar 23, 2025 •

Copy link
Copy Markdown
Contributor Author

Sorry for the notification Jed! This is still in progress. I should have updated the reviewers and added you at the end :(
I will ping all of you when it is ready

@bugraoz93
bugraoz93 force-pushed the feat/42562/dynamic-commands-from-operations branch 3 times, most recently from 0aa98fa to 580b226 Compare March 25, 2025 22:26
@bugraoz93
bugraoz93 force-pushed the feat/42562/dynamic-commands-from-operations branch 2 times, most recently from e4557d1 to 3710ef6 Compare April 3, 2025 20:24
@bugraoz93
bugraoz93 marked this pull request as ready for review April 3, 2025 20:24
@bugraoz93
bugraoz93 requested review from kaxil and potiuk as code owners April 3, 2025 20:24
@bugraoz93 bugraoz93 changed the title [WIP] AIP-81 Auto generate basic commands from Client operations AIP-81 Auto generate basic commands from Client operations Apr 3, 2025
@bugraoz93
bugraoz93 force-pushed the feat/42562/dynamic-commands-from-operations branch from 3710ef6 to 82b05dd Compare April 4, 2025 23:51
@bugraoz93
bugraoz93 force-pushed the feat/42562/dynamic-commands-from-operations branch from b3ba599 to 029d473 Compare April 5, 2025 00:45
@bugraoz93 bugraoz93 changed the title AIP-81 Auto generate basic commands from Client operations AIP-81 feat (airflowctl): Auto generate basic commands from Client operations Apr 7, 2025
@bugraoz93
bugraoz93 merged commit fa59f1e into apache:main Apr 7, 2025
@bugraoz93 bugraoz93 mentioned this pull request Apr 7, 2025
1 of 2 tasks
@potiuk

potiuk commented Apr 8, 2025

Copy link
Copy Markdown
Member

Late. But REALLY NICE... Love the way it is done.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AIP-81 Dynamic generation of API requests to be Used in CLI

3 participants