Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-proto
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-proto
Commits
56206910
Commit
56206910
authored
1 month ago
by
Joscha Schmiedt
Browse files
Options
Downloads
Patches
Plain Diff
Add scripting ServerMessages to ScriptExecutionResult
parent
2167c859
No related branches found
Branches containing commit
No related tags found
1 merge request
!13
Add server-side scripting to gRPC API
Pipeline
#61780
failed
1 month ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
proto/caosdb/scripting/v1alpha1/scripting.proto
+24
-12
24 additions, 12 deletions
proto/caosdb/scripting/v1alpha1/scripting.proto
with
24 additions
and
12 deletions
proto/caosdb/scripting/v1alpha1/scripting.proto
+
24
−
12
View file @
56206910
...
...
@@ -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) {}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment