Skip to content

Commit

Permalink
Add proto definitions for exec output options
Browse files Browse the repository at this point in the history
When running an exec, we block the process if its stdout or stderr has
not been consumed. This can be surprising behavior because if a user
blindly execs, their process could hang without them knowing. This
commit adds proto definitions enabling subprocess-like selection of
output style.
  • Loading branch information
pawalt committed Oct 28, 2024
1 parent ef36078 commit ebbdad1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modal_proto/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ enum DeploymentNamespace {
DEPLOYMENT_NAMESPACE_GLOBAL = 3;
}

enum ExecOutputOption {
EXEC_OUTPUT_OPTION_UNSPECIFIED = 0;
EXEC_OUTPUT_OPTION_DEVNULL = 1;
EXEC_OUTPUT_OPTION_PIPE = 2;
EXEC_OUTPUT_OPTION_STDOUT = 3;
}

enum FileDescriptor {
FILE_DESCRIPTOR_UNSPECIFIED = 0;
FILE_DESCRIPTOR_STDOUT = 1;
Expand Down Expand Up @@ -703,6 +710,8 @@ message ContainerExecRequest {
// Send SIGTERM to running container on exit of exec command.
bool terminate_container_on_exit = 4;
bool runtime_debug = 5; // For internal debugging use only.
ExecOutputOption stdout_output = 6;
ExecOutputOption stderr_output = 7;
}

message ContainerExecResponse {
Expand Down

0 comments on commit ebbdad1

Please sign in to comment.