New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executors doc update #34324
Executors doc update #34324
Conversation
Added sections describing the BaseExecutor interface in more detail to help in writing custom executors
Small comment - not directly this but related and clearly visible in the rendered page. Can you please move the "Testing" documentation out of the executor hierarchy ? The two Howtos seems completely out of place for the document. I like the document. The few proposals I would like to propose:
|
Thanks for the feedback @potiuk, replies inline below :)
I don't see a "Testing" doc in the executor hierarchy? I'm likely missing something though 👀
This section actually already existed before I updated it (my changes start at "Writing Your Own Executor"), but I can make this change anyway while I'm here.
I did think of this, but unlike custom operators, it's quite a large piece of code to even have a boilerplate. I was thinking of adding a very pseudo code snippet, but wasn't convinced that it would be helpful beyond folks just having a look at any of the existing community executors which all implement the BaseExecutor interface. Interested to hear what others think!
Great suggestion. I'll add a section and come up with a list of bullets for why you'd want to create a custom executor. If you have any to add, please reply with them here! |
Changes are in! It was quite a sticky mess with the debug executor doc. The fix I landed on was just shuffling around the headings on that page to not have 3 title level headings (which actually makes sense, I think that was a bug before). And move the DebugExecutor section to the top (which makes sense, since it is the DebugExecutor doc page, the other info is additional). Let me know what you think. |
Looks really good. Very well done! Just a comment, and I'm not sure how much can be done about this, but the Logging and CLI sections don't really add a lot of information about how to log or vend CLI commands. I don't know what the process for that is, and whether that's something that should be discussed in a document like this. But if a bit more information (or links to examples from the LocalExecutor or Kubernetes Executor) can be added about that, it would help I think. |
Thanks for having a look @syedahsn I can try add a bit more info. But so far I've just mentioned which executors make use of it, rather than linking directly to code, since that link will very quickly become stale as changes are made to that class. Maybe I can put some pseudo code in here? |
I added some pseudo code to the CLI and logging sections to give a more concrete idea of how to use those parts of the interface. |
@@ -15,8 +15,47 @@ | |||
specific language governing permissions and limitations | |||
under the License. | |||
|
|||
.. _executor:DebugExecutor: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No changes here other than bringing this section to the top and modifying section hierarchy to satisfy the static checks we have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few style/grammar suggestions. Otherwise LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
* Executors doc update Added sections describing the BaseExecutor interface in more detail to help in writing custom executors (cherry picked from commit 8fdf358)
* Executors doc update Added sections describing the BaseExecutor interface in more detail to help in writing custom executors (cherry picked from commit 8fdf358)
Added new sections describing the BaseExecutor interface in more detail to help users in writing custom executors.
This addresses the last AIP-51 task #27934 as well as #33146
A screenshot of the fully rendered page can be viewed below:
^ 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.