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
19d0c2b8
Commit
19d0c2b8
authored
4 weeks ago
by
Joscha Schmiedt
Browse files
Options
Downloads
Patches
Plain Diff
feat: add draft for server side scripting gRPC API
parent
9efb69c9
No related branches found
Branches containing commit
No related tags found
1 merge request
!13
Add server-side scripting to gRPC API
Pipeline
#61778
failed
4 weeks ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
proto/caosdb/scripting/v1alpha1/scripting.proto
+97
-0
97 additions, 0 deletions
proto/caosdb/scripting/v1alpha1/scripting.proto
with
97 additions
and
0 deletions
proto/caosdb/scripting/v1alpha1/scripting.proto
0 → 100644
+
97
−
0
View file @
19d0c2b8
//
// 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
)
{}
}
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