From 19d0c2b820a7c35905e6b6ad798b51f6b2d17eab Mon Sep 17 00:00:00 2001 From: Joscha Schmiedt <joscha@schmiedt.dev> Date: Wed, 12 Mar 2025 16:34:45 +0100 Subject: [PATCH 1/9] feat: add draft for server side scripting gRPC API --- .../caosdb/scripting/v1alpha1/scripting.proto | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 proto/caosdb/scripting/v1alpha1/scripting.proto diff --git a/proto/caosdb/scripting/v1alpha1/scripting.proto b/proto/caosdb/scripting/v1alpha1/scripting.proto new file mode 100644 index 0000000..c124719 --- /dev/null +++ b/proto/caosdb/scripting/v1alpha1/scripting.proto @@ -0,0 +1,97 @@ +// +// This file is a part of the LinkAhead Project. +// +// Copyright (C) 2025 Joscha Schmiedt <joscha@schmiedt.dev> +// Copyright (C) 2025 IndiScale GmbH <info@indiscale.com> +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see <https://www.gnu.org/licenses/>. + +syntax = "proto3"; + +package caosdb.scripting.v1alpha1; + +option java_multiple_files = true; +option java_package = "org.caosdb.api.scripting.v1alpha1"; + +message NamedArgument { + string name = 1; + string value = 2; +} + +message ExecuteScriptRequest { + // The script to execute + string script_filename = 1; + // Whether the script should be executed asynchronously + bool is_async = 2; + // The positional arguments for the script + repeated string positional_arguments = 3; + // The named arguments for the script + repeated NamedArgument named_arguments = 4; + // TODO: Should we support this? + // The files to be used by the script (will be uploaded to the server) + repeated string script_files = 5; +} + +enum ScriptExecutionResult { + // The result of the script execution is unspecified + SCRIPT_EXECUTION_RESULT_UNSPECIFIED = 0; + // The script execution was successful + 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 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; +} + +message ScriptExecutionId { + // Id of the script execution + string script_execution_id = 1; +} + +message ExecuteScriptResponse { + // Id of the script execution + ScriptExecutionId script_execution_id = 1; + // The script to execute + string script_filename = 2; + // The result of the script execution + ScriptExecutionResult result = 3; + // Script return code + int32 return_code = 4; + // The standard output of the script + string stdout = 5; + // The standard error of the script + string stderr = 6; + // TODO: Ideas: + string executing_user = 7; + string execution_datetime = 8; + + // TODO: Will we ever support this? How should the server know about them? Should the created files be downloaded? + // The files generated by the script + repeated string created_files = 9; +} + +service ServerSideScriptingService { + // Executes a script on the server side + rpc ExecuteScript(ExecuteScriptRequest) returns (ExecuteScriptResponse) {} + // Ideas + rpc GetScriptExecutionStatus(ScriptExecutionId) returns (ExecuteScriptResponse) {} +} -- GitLab From 2167c859b21930d93e23a8dab5d4e60ce79f3a37 Mon Sep 17 00:00:00 2001 From: Joscha Schmiedt <joscha@schmiedt.dev> Date: Wed, 12 Mar 2025 16:47:15 +0100 Subject: [PATCH 2/9] Mark future ideas as IDEA --- .../caosdb/scripting/v1alpha1/scripting.proto | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/proto/caosdb/scripting/v1alpha1/scripting.proto b/proto/caosdb/scripting/v1alpha1/scripting.proto index c124719..c606c3a 100644 --- a/proto/caosdb/scripting/v1alpha1/scripting.proto +++ b/proto/caosdb/scripting/v1alpha1/scripting.proto @@ -25,20 +25,21 @@ option java_multiple_files = true; option java_package = "org.caosdb.api.scripting.v1alpha1"; message NamedArgument { + // The name of the argument string name = 1; + // The value of the argument string value = 2; } message ExecuteScriptRequest { // The script to execute string script_filename = 1; - // Whether the script should be executed asynchronously + // IDEA: Whether the script should be executed asynchronously bool is_async = 2; // The positional arguments for the script repeated string positional_arguments = 3; // The named arguments for the script repeated NamedArgument named_arguments = 4; - // TODO: Should we support this? // The files to be used by the script (will be uploaded to the server) repeated string script_files = 5; } @@ -62,6 +63,7 @@ enum ScriptExecutionResult { SCRIPT_EXECUTION_RESULT_MISSING_SCRIPT_FILE = 7; } +// IDEA: Give the script execution an id to be able to track it message ScriptExecutionId { // Id of the script execution string script_execution_id = 1; @@ -80,18 +82,23 @@ message ExecuteScriptResponse { string stdout = 5; // The standard error of the script string stderr = 6; - // TODO: Ideas: + // IDEA: The user who executed the script string executing_user = 7; - string execution_datetime = 8; - - // TODO: Will we ever support this? How should the server know about them? Should the created files be downloaded? - // The files generated by the script - repeated string created_files = 9; + // IDEA: The date and time when the script was started + string execution_start_datetime = 8; + // IDEA: The date and time when the script was finished + 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. + // The files will be deleted after a certain time? How should the server know about + // about these? + repeated string created_files = 11; } service ServerSideScriptingService { // Executes a script on the server side rpc ExecuteScript(ExecuteScriptRequest) returns (ExecuteScriptResponse) {} - // Ideas + // IDEA: Get the status of a script execution rpc GetScriptExecutionStatus(ScriptExecutionId) returns (ExecuteScriptResponse) {} } -- GitLab From 56206910882faa24cea111166dfe08829c5a7c4d Mon Sep 17 00:00:00 2001 From: Joscha Schmiedt <joscha@schmiedt.dev> Date: Wed, 12 Mar 2025 17:13:13 +0100 Subject: [PATCH 3/9] Add scripting ServerMessages to ScriptExecutionResult --- .../caosdb/scripting/v1alpha1/scripting.proto | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/proto/caosdb/scripting/v1alpha1/scripting.proto b/proto/caosdb/scripting/v1alpha1/scripting.proto index c606c3a..8b3d85f 100644 --- a/proto/caosdb/scripting/v1alpha1/scripting.proto +++ b/proto/caosdb/scripting/v1alpha1/scripting.proto @@ -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) {} } -- GitLab From 7e9019f5fd85ecdb1eabb7a5b54ce8647272dc70 Mon Sep 17 00:00:00 2001 From: Joscha Schmiedt <joscha@schmiedt.dev> Date: Tue, 18 Mar 2025 20:21:26 +0100 Subject: [PATCH 4/9] Add auth_token to ExecuteScriptRequest and remove ideas for later releases --- .../caosdb/scripting/v1alpha1/scripting.proto | 34 +++++++------------ 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/proto/caosdb/scripting/v1alpha1/scripting.proto b/proto/caosdb/scripting/v1alpha1/scripting.proto index 8b3d85f..2028e04 100644 --- a/proto/caosdb/scripting/v1alpha1/scripting.proto +++ b/proto/caosdb/scripting/v1alpha1/scripting.proto @@ -21,6 +21,8 @@ syntax = "proto3"; package caosdb.scripting.v1alpha1; +import "google/protobuf/timestamp.proto"; + option java_multiple_files = true; option java_package = "org.caosdb.api.scripting.v1alpha1"; @@ -40,10 +42,12 @@ message ExecuteScriptRequest { 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) + // The files to be used by the script (will be uploaded to the server, not implemented yet) repeated string script_files = 5; - // IDEA: Whether the script should be executed asynchronously - bool run_async = 6; + // The authentication token for the script execution. Will be generated by server if empty. + string auth_token = 6; + // Whether the script should be executed asynchronously (not implemented yet) + bool run_async = 7; } enum ScriptExecutionResult { @@ -90,27 +94,15 @@ message ExecuteScriptResponse { string stdout = 5; // The standard error of the script string stderr = 6; - // IDEA: The user who executed the script - string executing_user = 7; - // IDEA: The date and time when the script was started - string execution_start_datetime = 8; - // IDEA: The date and time when the script was finished - 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. - // The files will be deleted after a certain time? How should the server know about - // about these? - repeated string created_files = 11; + // The start time of the script execution + google.protobuf.Timestamp start_time = 7; + // The end time of the script execution (empty if the script is still running) + google.protobuf.Timestamp end_time = 8; + // The duration of the script execution in milliseconds (zero if the script is still running) + int64 duration_ms = 9; } service ServerSideScriptingService { // Executes a script on the server side 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) {} } -- GitLab From cb3eaa6b7939e0d228695f1664905e0f8e0b99ea Mon Sep 17 00:00:00 2001 From: Joscha Schmiedt <joscha@schmiedt.dev> Date: Tue, 18 Mar 2025 20:24:12 +0100 Subject: [PATCH 5/9] Add ServerSide to names of scripting API To clarify that the ServerSide API is only available on the server side, we should add "ServerSide" to the names of the scripting API. This will make it clear that the API is not available on the client side. --- .../caosdb/scripting/v1alpha1/scripting.proto | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/proto/caosdb/scripting/v1alpha1/scripting.proto b/proto/caosdb/scripting/v1alpha1/scripting.proto index 2028e04..311dd7e 100644 --- a/proto/caosdb/scripting/v1alpha1/scripting.proto +++ b/proto/caosdb/scripting/v1alpha1/scripting.proto @@ -33,7 +33,7 @@ message NamedArgument { string value = 2; } -message ExecuteScriptRequest { +message ExecuteServerSideScriptRequest { // The script to execute string script_filename = 1; // The timeout for the script execution in milliseconds @@ -50,44 +50,44 @@ message ExecuteScriptRequest { bool run_async = 7; } -enum ScriptExecutionResult { +enum ServerSideScriptExecutionResult { // The result of the script execution is unspecified - SCRIPT_EXECUTION_RESULT_UNSPECIFIED = 0; + SERVER_SIDE_SCRIPT_EXECUTION_RESULT_UNSPECIFIED = 0; // The script execution was successful - SCRIPT_EXECUTION_RESULT_SUCCESS = 1; + SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SUCCESS = 1; // The script execution failed (general/unspecified failure) - SCRIPT_EXECUTION_RESULT_GENERAL_FAILURE = 2; + SERVER_SIDE_SCRIPT_EXECUTION_RESULT_GENERAL_FAILURE = 2; // The script does not exist - SCRIPT_EXECUTION_RESULT_SCRIPT_DOES_NOT_EXIST = 3; + SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SCRIPT_DOES_NOT_EXIST = 3; // The script is not executable - SCRIPT_EXECUTION_RESULT_SCRIPT_NOT_EXECUTABLE = 4; + SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SCRIPT_NOT_EXECUTABLE = 4; // The script execution failed due to a script error - SCRIPT_EXECUTION_RESULT_SCRIPT_ERROR = 5; + SERVER_SIDE_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; + SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SCRIPT_SETUP_ERROR = 6; // The script execution timed out - SCRIPT_EXECUTION_RESULT_SCRIPT_TIMEOUT = 7; + SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SCRIPT_TIMEOUT = 7; // The script execution was cancelled for another reason - SCRIPT_EXECUTION_RESULT_CANCELLED = 8; + SERVER_SIDE_SCRIPT_EXECUTION_RESULT_CANCELLED = 8; // The script execution was denied due to insufficient permissions - SCRIPT_EXECUTION_RESULT_PERMISSION_DENIED = 9; + SERVER_SIDE_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 = 10; + SERVER_SIDE_SCRIPT_EXECUTION_RESULT_RUNNING = 10; } // IDEA: Give the script execution an id to be able to track it -message ScriptExecutionId { +message ServerSideScriptExecutionId { // Id of the script execution string script_execution_id = 1; } -message ExecuteScriptResponse { +message ExecuteServerSideScriptResponse { // Id of the script execution - ScriptExecutionId script_execution_id = 1; + ServerSideScriptExecutionId script_execution_id = 1; // The script to execute string script_filename = 2; // The result of the script execution - ScriptExecutionResult result = 3; + ServerSideScriptExecutionResult result = 3; // Script return code int32 return_code = 4; // The standard output of the script @@ -104,5 +104,5 @@ message ExecuteScriptResponse { service ServerSideScriptingService { // Executes a script on the server side - rpc ExecuteScript(ExecuteScriptRequest) returns (ExecuteScriptResponse) {} + rpc ExecuteServerSideScript(ExecuteServerSideScriptRequest) returns (ExecuteServerSideScriptResponse) {} } -- GitLab From 2b762a4a4408de634d86b7bd56c514b1a84e47e2 Mon Sep 17 00:00:00 2001 From: Joscha Schmiedt <joscha@schmiedt.dev> Date: Tue, 18 Mar 2025 20:26:24 +0100 Subject: [PATCH 6/9] Add comments to scripting.proto file --- proto/caosdb/scripting/v1alpha1/scripting.proto | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/proto/caosdb/scripting/v1alpha1/scripting.proto b/proto/caosdb/scripting/v1alpha1/scripting.proto index 311dd7e..7242f3e 100644 --- a/proto/caosdb/scripting/v1alpha1/scripting.proto +++ b/proto/caosdb/scripting/v1alpha1/scripting.proto @@ -26,6 +26,7 @@ import "google/protobuf/timestamp.proto"; option java_multiple_files = true; option java_package = "org.caosdb.api.scripting.v1alpha1"; +// A named argument for a script message NamedArgument { // The name of the argument string name = 1; @@ -33,6 +34,7 @@ message NamedArgument { string value = 2; } +// Request to execute a script on the server side message ExecuteServerSideScriptRequest { // The script to execute string script_filename = 1; @@ -50,6 +52,7 @@ message ExecuteServerSideScriptRequest { bool run_async = 7; } +// The result of a script execution enum ServerSideScriptExecutionResult { // The result of the script execution is unspecified SERVER_SIDE_SCRIPT_EXECUTION_RESULT_UNSPECIFIED = 0; @@ -75,12 +78,13 @@ enum ServerSideScriptExecutionResult { SERVER_SIDE_SCRIPT_EXECUTION_RESULT_RUNNING = 10; } -// IDEA: Give the script execution an id to be able to track it +// Id of a script execution. This is reserved for later releases to track and manage script executions. message ServerSideScriptExecutionId { // Id of the script execution string script_execution_id = 1; } +// Response to a script execution request message ExecuteServerSideScriptResponse { // Id of the script execution ServerSideScriptExecutionId script_execution_id = 1; @@ -102,6 +106,7 @@ message ExecuteServerSideScriptResponse { int64 duration_ms = 9; } +// Service for server-side scripting service ServerSideScriptingService { // Executes a script on the server side rpc ExecuteServerSideScript(ExecuteServerSideScriptRequest) returns (ExecuteServerSideScriptResponse) {} -- GitLab From 47e1c48cdb9ebfd697b8f4515e17f6c9169441d6 Mon Sep 17 00:00:00 2001 From: Joscha Schmiedt <joscha@schmiedt.dev> Date: Tue, 18 Mar 2025 20:42:05 +0100 Subject: [PATCH 7/9] STYLE(scripting): auto-format --- .../caosdb/scripting/v1alpha1/scripting.proto | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/proto/caosdb/scripting/v1alpha1/scripting.proto b/proto/caosdb/scripting/v1alpha1/scripting.proto index 7242f3e..1538302 100644 --- a/proto/caosdb/scripting/v1alpha1/scripting.proto +++ b/proto/caosdb/scripting/v1alpha1/scripting.proto @@ -24,7 +24,7 @@ package caosdb.scripting.v1alpha1; import "google/protobuf/timestamp.proto"; option java_multiple_files = true; -option java_package = "org.caosdb.api.scripting.v1alpha1"; +option java_package = "org.caosdb.api.scripting.v1alpha1"; // A named argument for a script message NamedArgument { @@ -44,9 +44,11 @@ message ExecuteServerSideScriptRequest { 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, not implemented yet) + // The files to be used by the script (will be uploaded to the server, not + // implemented yet) repeated string script_files = 5; - // The authentication token for the script execution. Will be generated by server if empty. + // The authentication token for the script execution. Will be generated by + // the server if empty. string auth_token = 6; // Whether the script should be executed asynchronously (not implemented yet) bool run_async = 7; @@ -74,11 +76,13 @@ enum ServerSideScriptExecutionResult { SERVER_SIDE_SCRIPT_EXECUTION_RESULT_CANCELLED = 8; // The script execution was denied due to insufficient permissions SERVER_SIDE_SCRIPT_EXECUTION_RESULT_PERMISSION_DENIED = 9; - // The script is running and the result is not yet available (only for async scripts) + // The script is running and the result is not yet available (only for + // async scripts) SERVER_SIDE_SCRIPT_EXECUTION_RESULT_RUNNING = 10; } -// Id of a script execution. This is reserved for later releases to track and manage script executions. +// Id of a script execution. This is reserved for later releases to track +// and manage script executions. message ServerSideScriptExecutionId { // Id of the script execution string script_execution_id = 1; @@ -102,12 +106,14 @@ message ExecuteServerSideScriptResponse { google.protobuf.Timestamp start_time = 7; // The end time of the script execution (empty if the script is still running) google.protobuf.Timestamp end_time = 8; - // The duration of the script execution in milliseconds (zero if the script is still running) + // The duration of the script execution in milliseconds (zero if the script + // is still running) int64 duration_ms = 9; } // Service for server-side scripting service ServerSideScriptingService { // Executes a script on the server side - rpc ExecuteServerSideScript(ExecuteServerSideScriptRequest) returns (ExecuteServerSideScriptResponse) {} + rpc ExecuteServerSideScript(ExecuteServerSideScriptRequest) + returns (ExecuteServerSideScriptResponse) {} } -- GitLab From 79549b60e441c0b2d693ce189d6e189fed331a7c Mon Sep 17 00:00:00 2001 From: Joscha Schmiedt <joscha@schmiedt.dev> Date: Wed, 19 Mar 2025 16:32:23 +0100 Subject: [PATCH 8/9] Replace script_filename with call in gRPC SSS response --- proto/caosdb/scripting/v1alpha1/scripting.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/caosdb/scripting/v1alpha1/scripting.proto b/proto/caosdb/scripting/v1alpha1/scripting.proto index 1538302..c81b485 100644 --- a/proto/caosdb/scripting/v1alpha1/scripting.proto +++ b/proto/caosdb/scripting/v1alpha1/scripting.proto @@ -92,8 +92,8 @@ message ServerSideScriptExecutionId { message ExecuteServerSideScriptResponse { // Id of the script execution ServerSideScriptExecutionId script_execution_id = 1; - // The script to execute - string script_filename = 2; + // The full command that was executed including all args + string call = 2; // The result of the script execution ServerSideScriptExecutionResult result = 3; // Script return code -- GitLab From 6a46ce5d90237a09ac8ee28521ba01977e7f4400 Mon Sep 17 00:00:00 2001 From: Joscha Schmiedt <joscha@schmiedt.dev> Date: Wed, 26 Mar 2025 17:51:52 +0100 Subject: [PATCH 9/9] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb572ac..dce83e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added ### +- Support for server-side scripting via gRPC. The new `ServerSideScriptingService` API still + has alpha status and should not be considered stable yet. + ### Changed ### ### Deprecated ### -- GitLab