knuu icon indicating copy to clipboard operation
knuu copied to clipboard

Execute command in Instance when in state Preparing always returns an empty string

Open smuu opened this issue 2 years ago • 5 comments

smuu avatar May 19 '23 09:05 smuu

Needs to be discussed further

smuu avatar Jul 01 '24 14:07 smuu

The problem: When calling ExecuteCommand in PreparingState, this command will be added to the Dockerfile. This Dockerfile is built when calling Commit. As the command is not executed when calling the function, we cannot return anything to the caller. This might add confusion, as the caller expects the command's output.

smuu avatar Jul 22 '24 09:07 smuu

One possible solution could be that when calling ExecuteCommand in PreparingState, we build the container, execute the command and then return the output.

smuu avatar Jul 22 '24 09:07 smuu

cc @tty47 @mojtaba-esk

smuu avatar Jul 22 '24 09:07 smuu

One possible solution could be that when calling ExecuteCommand in PreparingState, we build the container, execute the command and then return the output.

We could do that if there is a usecase for it. Or we could brake the function into two functions that one execute command on a running instance and one adds it to the instance and run it with delay when the instance starts. I think we already have the second one.

mojtaba-esk avatar Jul 23 '24 05:07 mojtaba-esk