I gave this it a try to switch from Task.create() to Task.init(). I think I am pretty close to switch to using init(). But still have issue of ModuleNotFoundError: No module named 'src'
when using task.init().
My project setup look like this:
project_root/
|--src/
|--runbooks/
|--run_task.py
So if I use Task.create(repo=xx, script="runbooks/run_task.py"), it works but if I switch to using Task.init() with the same repo setup (task.set_repo, and then follow by task.execute_remotely), it will complain about ModuleNotFoundError: No module named 'src'`
I suspect that it is about how the working_directory setup, from what I see in the signature of task.create and task.set_repo, they both state that Default: repository root folder
(task.create signature), execution work directory will be the repository root folder
(task.set_repo signature). But there must be something different about this two workflow since one work another doesn't
Any ideas?