Skip to content

Commit

Permalink
Upgrade to Proc 4.21.0
Browse files Browse the repository at this point in the history
Fix error
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
  • Loading branch information
toiah committed Sep 14, 2022
1 parent c4d2574 commit 9926819
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 342 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# pythonsdk
Python SDK for gaia pipelines.

## Upgrade Protc / gRPC
```
protoc -I . --python_out=. gaiasdk/plugin.proto
python3 -m grpc_tools.protoc -I . --python_out=. --grpc_python_out=. gaiasdk/plugin.proto
```
59 changes: 59 additions & 0 deletions gaiasdk/plugin.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// plugin.proto
// Defines the gRPC interface between gaia and the user defined
// pipelines (plugins). All rpc Methods are called from Gaia and
// executed in the plugin.

syntax = "proto3";

option java_multiple_files = true;
option java_package = "io.gaiapipeline.proto";
option java_outer_classname = "GRPCPlugin";

package proto;

// Job represents a single job
message Job {
uint32 unique_id = 1;
string title = 2;
string description = 3;
repeated uint32 dependson = 4;
repeated Argument args = 5;
ManualInteraction interaction = 6;
}

// Argument represents an argument passed from a pipeline
// to gaia and/or from gaia to the pipeline.
message Argument {
string description = 1;
string type = 2;
string key = 3;
string value = 4;
}

// ManualInteraction represents a manual human interaction
message ManualInteraction {
string description = 1;
string type = 2;
string value = 3;
}

// JobResult represents the result of an executed job
message JobResult {
uint32 unique_id = 1;
bool failed = 2;
bool exit_pipeline = 3;
string message = 4;
}

// Empty message
message Empty {}

service Plugin {
// GetJobs returns a stream of Job objects.
// Used to expose jobs to gaia.
rpc GetJobs(Empty) returns (stream Job);

// ExecuteJob signals the plugin to execute the given job.
// Used to execute one job from a pipeline.
rpc ExecuteJob(Job) returns (JobResult);
}
Loading

0 comments on commit 9926819

Please sign in to comment.