Replies: 1 comment
-
|
I have exactly the same requirement. I need to start up multiple servers, wait for them to become ready before proceeding with running tests. Unfortunately, the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Make sidecar task useful for running functional tests or other tasks that depend on shared services to be ran and cleaned up.
Non-goals
No response
Background
Currently, the sidecar tasks become persistent even if the task that depends on them is not persistent. And this makes sense in the original example of running webapp together with dev server.
But there is another usecase that is hard to solve cleanly with turborepo - starting and cleaning up services for specific task. While it is possbile with package tasks on package level:
start service && run task && end servicethis is not possible on workspace level - start service -> run tasks in different packages -> stop service.In my example, I want to start a DB, run functional tests in different packages, and then stop the DB when all tests finish. With current sidecar task implementation, I can almost define it and everything will start correctly, but when tests finish, the DB task is not stopped.
If the sidecar task would be stopped together with it would allow solving these kinds of cases in a really clean way. While it would be possible to set this up outside of turbo, it would not use the dependencies and change detection logic of turbo and for example, if none of the services or tests change, we would still start db.
Proposal
If all tasks dependent on a sidecar task stop, stop the sidecar task. Just like in a case when tasks exit with error. It should not work against original usecase for persistent tasks, but would allow other usecases.
Beta Was this translation helpful? Give feedback.
All reactions