Skip to content
Snippets Groups Projects
Commit 56206910 authored by Joscha Schmiedt's avatar Joscha Schmiedt
Browse files

Add scripting ServerMessages to ScriptExecutionResult

parent 2167c859
No related branches found
No related tags found
1 merge request!13Add server-side scripting to gRPC API
Pipeline #61780 failed
......@@ -34,14 +34,16 @@ message NamedArgument {
message ExecuteScriptRequest {
// The script to execute
string script_filename = 1;
// IDEA: Whether the script should be executed asynchronously
bool is_async = 2;
// The timeout for the script execution in milliseconds
int64 timeout_ms = 2;
// The positional arguments for the script
repeated string positional_arguments = 3;
// The named arguments for the script
repeated NamedArgument named_arguments = 4;
// The files to be used by the script (will be uploaded to the server)
repeated string script_files = 5;
// IDEA: Whether the script should be executed asynchronously
bool run_async = 6;
}
enum ScriptExecutionResult {
......@@ -51,16 +53,22 @@ enum ScriptExecutionResult {
SCRIPT_EXECUTION_RESULT_SUCCESS = 1;
// The script execution failed (general/unspecified failure)
SCRIPT_EXECUTION_RESULT_GENERAL_FAILURE = 2;
// The script execution was cancelled
SCRIPT_EXECUTION_RESULT_CANCELLED = 3;
// The script execution was denied due to insufficient permissionss
SCRIPT_EXECUTION_RESULT_PERMISSION_DENIED = 4;
// The script execution was denied due to a timeout
SCRIPT_EXECUTION_RESULT_TIMEOUT = 5;
// The script does not exist
SCRIPT_EXECUTION_RESULT_SCRIPT_DOES_NOT_EXIST = 3;
// The script is not executable
SCRIPT_EXECUTION_RESULT_SCRIPT_NOT_EXECUTABLE = 4;
// The script execution failed due to a script error
SCRIPT_EXECUTION_RESULT_SCRIPT_ERROR = 5;
// The script execution failed during setup, e.g. due to configuration errors
SCRIPT_EXECUTION_RESULT_SCRIPT_SETUP_ERROR = 6;
// The script execution timed out
SCRIPT_EXECUTION_RESULT_SCRIPT_TIMEOUT = 7;
// The script execution was cancelled for another reason
SCRIPT_EXECUTION_RESULT_CANCELLED = 8;
// The script execution was denied due to insufficient permissions
SCRIPT_EXECUTION_RESULT_PERMISSION_DENIED = 9;
// The script is running and the result is not yet available (only for async scripts)
SCRIPT_EXECUTION_RESULT_RUNNING = 6;
// The script execution was denied due to a missing script file
SCRIPT_EXECUTION_RESULT_MISSING_SCRIPT_FILE = 7;
SCRIPT_EXECUTION_RESULT_RUNNING = 10;
}
// IDEA: Give the script execution an id to be able to track it
......@@ -90,7 +98,7 @@ message ExecuteScriptResponse {
string execution_end_datetime = 9;
// IDEA: The duration of the script execution
string execution_duration = 10;
// IDEA: Return a list of files created by the script. These files will be available for download.
// IDEA: Return a list of files created by the script. These files will be available for download.
// The files will be deleted after a certain time? How should the server know about
// about these?
repeated string created_files = 11;
......@@ -101,4 +109,8 @@ service ServerSideScriptingService {
rpc ExecuteScript(ExecuteScriptRequest) returns (ExecuteScriptResponse) {}
// IDEA: Get the status of a script execution
rpc GetScriptExecutionStatus(ScriptExecutionId) returns (ExecuteScriptResponse) {}
// IDEA: Delete temp files (only for admins?)
// rpc DeleteTempFiles(DeleteTempFilesRequest) returns (DeleteTempFilesResponse) {}
// IDEA: Wait for a script execution to finish
// rpc WaitForScriptExecution(ScriptExecutionId, TimeoutDuration) returns (ExecuteScriptResponse) {}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment