zhongjiajie opened a new issue #6407:
URL: https://github.com/apache/dolphinscheduler/issues/6407


   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar feature requirement.
   
   
   ### Description
   
   Add Python API for DolphinScheduler, which allow user define workflow using 
Python code, aka **workflows-as-code**. And this is parent list to connect all 
children issues, **until** we public first release to pypi
   
   * [x] mailing-list: 
https://lists.apache.org/thread.html/rb54aea6cde22d288fb3fefa4b921f155c8237b5bf5b42e4081ba789b%40%3Cdev.dolphinscheduler.apache.org%3E
   
   ## Children issues
   
   * [ ] 1. **First implementation of workflow-as-codes**, including create 
process definition, tasks, setting tasks relation, run process definition. 
#6269 
   * [ ] 2. **How to update workflow**, including tasks, relations, **NOT 
including project and process definition** here for further consider, see part 
*What we have to consider carefully* point one.
   
   ## What we have to consider carefully
   
   1. **A good mechanism to update process definition**: For now DS design base 
on UI define workflow, which we modify database model step by step, is a quick 
different from define or update by code. We have to consider who to update it. 
Cause we should not ask user define process definition code or tasks code in 
the python API, I currently think maybe we should delete all tasks in process 
definition and then create new. **It's still could not handle when users change 
project name and process definition, but we would try to fix it later**
   2. **How to combine UI and codes when define and change workflow**: We could 
update workflow define by UI or by edit Python API code after we create it, and 
how to combine them. If would cause consistency issues when we create workflow 
by python api but change them in UI, cause UI modify directly change database 
metadata but python api do not know and still in the old version. **In python 
api define way, python file just like template, it parse the code and persist 
to database**
   
   ### Use case
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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]


Reply via email to