The daemon tries to connect to the coordinator before it starts up. During that time, it didn't listen for ctrl-c signals yet. This commit fixes this limitation by checking for ctrl-c events during the event stream setup too.
Runs a dataflow locally, without requiring any any daemon or coordinator
processes. Multi-machine dataflows are not supported. The default log
level is set to `INFO`, overwriting it is possible by setting the
`RUST_LOG` environment variable.
This exposes the internal `dora daemon --run-dataflow` command that we
use for testing.
This addition was proposed in
https://github.com/orgs/dora-rs/discussions/698#discussioncomment-11125465
.
The second commit adds a ctrl-c handler. On first ctrl-c, we send a stop
command to all nodes. On second ctrl-c, we exit immediately and kill all
spawned nodes. On third ctrl-c, we abort the process directly without
waiting (child processes keep running).
Make `dora-message` a dependency of `dora-core`, instead of the other way around. This way, we can continue to freely bump the version of `dora-core` with the other workspace crates, without introducing errors such as #708.
On first ctrl-c, send a stop command to all nodes. On second ctrl-c, exit immediately and kill all spawned nodes. On third ctrl-c, abort the process directly without waiting (child processes keep running).
This change affects both `dora run` and `dora daemon` commands.
It is necessary to make build multiline in order to build certain node.
This allow users to do the following:
```bash
nodes:
- id: dora-microphone
build: |
pip install -e ../../node-hub/dora-microphones
pip install -e ../../node-hub/dora-vad
path: dora-microphone
```
or
```bash
nodes:
- id: dora-microphone
build: |
sudo apt install abc
pip install bar
path: dora-microphone
```
This PR makes it possible to start a dataflow from scratch without
having to git clone a repository.
## Example
```bash
dora up
dora build 09f7f2927d/camera.yaml
dora start 09f7f2927d/camera.yaml
```
## Video
[Screencast from 2024-10-09
12-11-57.webm](https://github.com/user-attachments/assets/041ca5a0-7cd2-4dc6-bc34-aa94e6010166)
## Small breaking change
- This slighlty change the logic of `download_file` function to use the
predefined downloaded file name instead of changing it when downloading.
- It removes the caching of `download_file` as there is now no way to
know if the filename and path is going to be the same before hand. I
think that if users want to have caching, they should link the path
before hand instead of using the url. This can be done in conjunction of
a build `wget` or `curl` command.
Previously, When a daemon stop it sends a message to the coordinator
which will log it as an archived dataflow even though not every daemon
has stopped within the dataflow.
This PR should fix this issue.
This PR fixes one error that happen when the coordinator fail to connect
to the daemon and ultimately hangs indefinetely.
## To reproduce previous behaviour:
```bash
dora up
kill <DAEMON PID> && dora destroy
dora destroy # <- This hangs
```
Fix: https://github.com/dora-rs/dora/issues/253
Validating dataflow within the CLI is very hard as the CLI does not
record enough information to implement the validation of the dataflow,
creating false error of not valid dataflows.