Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(optimus): fetch job task runtime details #57

Merged
merged 1 commit into from
Nov 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

package odpf.metadata.optimus;
package odpf.metadata.optimus.v1;

option java_package = "io.odpf.proton.metadata.optimus";
option java_outer_classname = "Optimus";
Expand Down
44 changes: 31 additions & 13 deletions odpf/optimus/runtime_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ service RuntimeService {
};
}

// DumpJobSpecification returns compiled representation of the job in a scheduler
// consumable form
rpc DumpJobSpecification(DumpJobSpecificationRequest) returns (DumpJobSpecificationResponse) {
// GetJobTask provides task details specific to plugin used in a job
rpc GetJobTask(GetJobTaskRequest) returns (GetJobTaskResponse) {
option (google.api.http) = {
get: "/v1/project/{project_name}/job/{job_name}/dump"
get: "/v1/project/{project_name}/namespace/{namespace}/job/{job_name}/task"
};
}

// CheckJobSpecification checks if a job specification is valid
rpc CheckJobSpecification(CheckJobSpecificationRequest) returns (CheckJobSpecificationResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -327,7 +327,7 @@ message InstanceSpec {
google.protobuf.Timestamp executed_at = 5;

enum Type {
UNKNOWN = 0;
UNSPECIFIED = 0;
TASK = 1;
HOOK = 2;
}
Expand All @@ -343,7 +343,7 @@ message InstanceSpecData {

// type of data, could be an env var or file
enum Type {
UNKNOWN = 0;
UNSPECIFIED = 0;
ENV = 1;
FILE = 2;
}
Expand All @@ -362,7 +362,7 @@ message JobStatus {

message JobEvent {
enum Type {
UNKNOWN = 0;
UNSPECIFIED = 0;
SLA_MISS = 1;
FAILURE = 2;
SUCCESS = 3;
Expand Down Expand Up @@ -390,6 +390,25 @@ message ResourceSpecification {
map<string, string> labels = 7;
}

// JobTask is part of a job that dictates main transformation
// each job has exactly one task
message JobTask {
string name = 1;
string description = 2;
string image = 3;

message Destination {
string destination = 1;
string type = 2;
}
Destination destination = 4;

message Dependency {
string dependency = 1;
}
repeated Dependency dependencies = 5;
}

//~~~ rpc req/res

message VersionRequest {
Expand Down Expand Up @@ -426,15 +445,14 @@ message ListJobSpecificationResponse{
repeated JobSpecification jobs = 1;
}

message DumpJobSpecificationRequest {
message GetJobTaskRequest {
string project_name = 1;
string job_name = 2;
string namespace = 3;
string namespace = 2;
string job_name = 3;
}

message DumpJobSpecificationResponse {
bool success = 1;
string content = 2;
message GetJobTaskResponse {
JobTask task = 1;
}

message CheckJobSpecificationRequest {
Expand Down