edgeless-project / edgeless

MVP Implementation
Other
14 stars 0 forks source link

CLI Start workflow not working when the workflow json definition is located in a different directory #145

Closed franvipa closed 3 months ago

franvipa commented 3 months ago

I'm working on a workflow with its functions, and the code (including workflow json and functions json) are in a different directory, because I'm working in a different repository.

I've done some configurations to be able to work this way:

Cargo.toml file:

[dependencies]
edgeless_function = { path = "../../edgeless/edgeless_function" }

I created a .sh to build the function with the CLI:

EDGELESS_PATH=../../edgeless
$EDGELESS_PATH/target/debug/edgeless_cli function build function.json

And this works, but when I try to start the workflow with this .sh:

EDGELESS_PATH=../edgeless
$EDGELESS_PATH/target/debug/edgeless_cli workflow start workflow.json

I'm getting this error: Error: configuration file does not exist or cannot be accessed: cli.toml

I've seen that this validation comes from _edgeless_cli/src/edgelesscli.rs, and the way it validates the workflow file is different from the way it validates the function file. For the function it works because I'm able to build a function, but for workflows it doesn't work.

ccicconetti commented 3 months ago

Solution:

$EDGELESS_PATH/target/debug/edgeless_cli -t cli.toml

Reason:

Does this address the issue @franvipa?

franvipa commented 3 months ago

Yes, thank you very much @ccicconetti