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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

protobuf 3.12 optional fields pre-release #3594

Merged
merged 1 commit into from
May 5, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
252 changes: 126 additions & 126 deletions cylc/flow/data_messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ syntax = "proto3";
* message modules.
*
* Command:
* $ protoc -I=./ --python_out=./ data_messages.proto
* $ protoc --experimental_allow_proto3_optional -I=./ --python_out=./ data_messages.proto
*
* Pre-compiled protoc binary may be download from:
* https://github.com/protocolbuffers/protobuf/releases
Expand All @@ -38,185 +38,185 @@ syntax = "proto3";

// Query type messages
message PbMeta {
string title = 1;
string description = 2;
string URL = 3;
optional string title = 1;
optional string description = 2;
optional string URL = 3;
/*map<string, string> user_defined = 4;*/
repeated string user_defined = 4;
}

message PbTimeZone {
int32 hours = 1;
int32 minutes = 2;
string string_basic = 3;
string string_extended = 4;
optional int32 hours = 1;
optional int32 minutes = 2;
optional string string_basic = 3;
optional string string_extended = 4;
}

message PbWorkflow {
string stamp = 1;
string id = 2;
string name = 3;
string status = 4;
string host = 5;
int32 port = 6;
string owner = 7;
optional string stamp = 1;
optional string id = 2;
optional string name = 3;
optional string status = 4;
optional string host = 5;
optional int32 port = 6;
optional string owner = 7;
repeated string tasks = 8;
repeated string families = 9;
PbEdges edges = 10;
int32 api_version = 11;
string cylc_version = 12;
double last_updated = 13;
PbMeta meta = 14;
string newest_runahead_cycle_point = 15;
string newest_cycle_point = 16;
string oldest_cycle_point = 17;
bool reloaded = 18;
string run_mode = 19;
string cycling_mode = 20;
optional PbEdges edges = 10;
optional int32 api_version = 11;
optional string cylc_version = 12;
optional double last_updated = 13;
optional PbMeta meta = 14;
optional string newest_runahead_cycle_point = 15;
optional string newest_cycle_point = 16;
optional string oldest_cycle_point = 17;
optional bool reloaded = 18;
optional string run_mode = 19;
optional string cycling_mode = 20;
map<string, int32> state_totals = 21;
string workflow_log_dir = 22;
PbTimeZone time_zone_info = 23;
int32 tree_depth = 24;
optional string workflow_log_dir = 22;
optional PbTimeZone time_zone_info = 23;
optional int32 tree_depth = 24;
repeated string job_log_names = 25;
repeated string ns_defn_order = 26;
repeated string states = 27;
repeated string task_proxies = 28;
repeated string family_proxies = 29;
string status_msg = 30;
int32 is_held_total = 31;
optional string status_msg = 30;
optional int32 is_held_total = 31;
}

message PbJob {
string stamp = 1;
string id = 2;
int32 submit_num = 3;
string state = 4;
string task_proxy = 5;
string submitted_time = 6;
string started_time = 7;
string finished_time = 8;
string batch_sys_job_id = 9;
string batch_sys_name = 10;
string env_script = 11;
string err_script = 12;
string exit_script = 13;
float execution_time_limit = 14;
string host = 15;
string init_script = 16;
string job_log_dir = 17;
string owner = 18;
string post_script = 19;
string pre_script = 20;
string script = 21;
string shell = 22;
string work_sub_dir = 23;
optional string stamp = 1;
optional string id = 2;
optional int32 submit_num = 3;
optional string state = 4;
optional string task_proxy = 5;
optional string submitted_time = 6;
optional string started_time = 7;
optional string finished_time = 8;
optional string batch_sys_job_id = 9;
optional string batch_sys_name = 10;
optional string env_script = 11;
optional string err_script = 12;
optional string exit_script = 13;
optional float execution_time_limit = 14;
optional string host = 15;
optional string init_script = 16;
optional string job_log_dir = 17;
optional string owner = 18;
optional string post_script = 19;
optional string pre_script = 20;
optional string script = 21;
optional string shell = 22;
optional string work_sub_dir = 23;
repeated string batch_sys_conf = 24;
repeated string environment = 25;
repeated string directives = 26;
repeated string param_env_tmpl = 27;
repeated string param_var = 28;
repeated string extra_logs = 29;
string name = 30; /* filter item */
string cycle_point = 31; /* filter item */
optional string name = 30; /* filter item */
optional string cycle_point = 31; /* filter item */
repeated string messages = 32;
}

message PbTask {
string stamp = 1;
string id = 2;
string name = 3;
PbMeta meta = 4;
float mean_elapsed_time = 5;
int32 depth = 6;
optional string stamp = 1;
optional string id = 2;
optional string name = 3;
optional PbMeta meta = 4;
optional float mean_elapsed_time = 5;
optional int32 depth = 6;
repeated string proxies = 7;
repeated string namespace = 8;
}

message PbPollTask {
string local_proxy = 1;
string workflow = 2;
string remote_proxy = 3;
string req_state = 4;
string graph_string = 5;
optional string local_proxy = 1;
optional string workflow = 2;
optional string remote_proxy = 3;
optional string req_state = 4;
optional string graph_string = 5;
}

message PbCondition {
string task_proxy = 1;
string expr_alias = 2;
string req_state = 3;
bool satisfied = 4;
string message = 5;
optional string task_proxy = 1;
optional string expr_alias = 2;
optional string req_state = 3;
optional bool satisfied = 4;
optional string message = 5;
}

message PbPrerequisite {
string expression = 1;
optional string expression = 1;
repeated PbCondition conditions = 2;
repeated string cycle_points = 3;
bool satisfied = 4;
optional bool satisfied = 4;
}

message PbTaskProxy {
string stamp = 1;
string id = 2;
string task = 3;
string state = 4;
string cycle_point = 5;
bool spawned = 6;
int32 depth = 7;
int32 job_submits = 8;
string latest_message = 9;
optional string stamp = 1;
optional string id = 2;
optional string task = 3;
optional string state = 4;
optional string cycle_point = 5;
optional bool spawned = 6;
optional int32 depth = 7;
optional int32 job_submits = 8;
optional string latest_message = 9;
repeated string outputs = 10;
repeated string broadcasts = 11;
repeated string namespace = 12;
repeated PbPrerequisite prerequisites = 13;
repeated string jobs = 14;
repeated string parents = 15;
string first_parent = 16;
string name = 17; /* filter item */
bool is_held = 18;
optional string first_parent = 16;
optional string name = 17; /* filter item */
optional bool is_held = 18;
repeated string edges = 19;
repeated string ancestors = 20;
}

message PbFamily {
string stamp = 1;
string id = 2;
string name = 3;
PbMeta meta = 4;
int32 depth = 5;
optional string stamp = 1;
optional string id = 2;
optional string name = 3;
optional PbMeta meta = 4;
optional int32 depth = 5;
repeated string proxies = 6;
repeated string parents = 7;
repeated string child_tasks = 8;
repeated string child_families = 9;
}

message PbFamilyProxy {
string stamp = 1;
string id = 2;
string cycle_point = 3;
string name = 4; /* filter item */
string family = 5;
string state = 6;
int32 depth = 7;
string first_parent = 8;
optional string stamp = 1;
optional string id = 2;
optional string cycle_point = 3;
optional string name = 4; /* filter item */
optional string family = 5;
optional string state = 6;
optional int32 depth = 7;
optional string first_parent = 8;
repeated string parents = 9;
repeated string child_tasks = 10;
repeated string child_families = 11;
bool is_held = 12;
optional bool is_held = 12;
repeated string ancestors = 13;
}

message PbEdge {
string stamp = 1;
string id = 2;
string source = 3;
string target = 4;
bool suicide = 5;
bool cond = 6;
optional string stamp = 1;
optional string id = 2;
optional string source = 3;
optional string target = 4;
optional bool suicide = 5;
optional bool cond = 6;
}

message PbEdges {
string id = 1;
optional string id = 1;
repeated string edges = 2;
repeated PbPollTask workflow_polling_tasks = 3;
repeated string leaves = 4;
Expand All @@ -226,7 +226,7 @@ message PbEdges {

/* Now bundle for messaging */
message PbEntireWorkflow {
PbWorkflow workflow = 1;
optional PbWorkflow workflow = 1;
repeated PbTask tasks = 2;
repeated PbTaskProxy task_proxies = 3;
repeated PbJob jobs = 4;
Expand All @@ -236,49 +236,49 @@ message PbEntireWorkflow {
}

message EDeltas {
double time = 1;
int64 checksum = 2;
optional double time = 1;
optional int64 checksum = 2;
repeated string pruned = 3;
repeated PbEdge deltas = 4;
bool reloaded = 5;
optional bool reloaded = 5;
}

message FDeltas {
double time = 1;
int64 checksum = 2;
optional double time = 1;
optional int64 checksum = 2;
repeated string pruned = 3;
repeated PbFamily deltas = 4;
bool reloaded = 5;
optional bool reloaded = 5;
}

message FPDeltas {
double time = 1;
int64 checksum = 2;
optional double time = 1;
optional int64 checksum = 2;
repeated string pruned = 3;
repeated PbFamilyProxy deltas = 4;
bool reloaded = 5;
optional bool reloaded = 5;
}

message JDeltas {
double time = 1;
int64 checksum = 2;
optional double time = 1;
optional int64 checksum = 2;
repeated string pruned = 3;
repeated PbJob deltas = 4;
bool reloaded = 5;
optional bool reloaded = 5;
}

message TDeltas {
double time = 1;
int64 checksum = 2;
optional double time = 1;
optional int64 checksum = 2;
repeated string pruned = 3;
repeated PbTask deltas = 4;
bool reloaded = 5;
optional bool reloaded = 5;
}

message TPDeltas {
double time = 1;
int64 checksum = 2;
optional double time = 1;
optional int64 checksum = 2;
repeated string pruned = 3;
repeated PbTaskProxy deltas = 4;
bool reloaded = 5;
optional bool reloaded = 5;
}