| 1 |
syntax = "proto3"; |
| 2 |
|
| 3 |
/* THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE. |
| 4 |
Copyright (C) NIWA & British Crown (Met Office) & Contributors. |
| 5 |
|
| 6 |
This program is free software: you can redistribute it and/or modify |
| 7 |
it under the terms of the GNU General Public License as published by |
| 8 |
the Free Software Foundation, either version 3 of the License, or |
| 9 |
(at your option) any later version. |
| 10 |
|
| 11 |
This program is distributed in the hope that it will be useful, |
| 12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
GNU General Public License for more details. |
| 15 |
|
| 16 |
You should have received a copy of the GNU General Public License |
| 17 |
along with this program. If not, see <http://www.gnu.org/licenses/>.*/ |
| 18 |
|
| 19 |
/* Protobuf message definitions |
| 20 |
* |
| 21 |
* The original intention of these messages is for use as data elements sent |
| 22 |
* to and used in resolving GraphQL queries at the UI Server. |
| 23 |
* |
| 24 |
* This file is not needed at runtime. It is used to generate python protobuf |
| 25 |
* message modules. |
| 26 |
* |
| 27 |
* Command: |
| 28 |
* $ protoc -I=./ --python_out=./ --pyi_out=./ data_messages.proto |
| 29 |
* |
| 30 |
* Pre-compiled protoc binary may be download from: |
| 31 |
* https://github.com/protocolbuffers/protobuf/releases |
| 32 |
* |
| 33 |
* If merge/rebase conflicts arise, then regenerate the module. |
| 34 |
* (DO NOT manually resolve conflicts) |
| 35 |
* |
| 36 |
* |
| 37 |
* WARNING: Avoid re-indexing existing fields! |
| 38 |
* - Field numbers do not need to be continuous/sequential (gaps are fine). |
| 39 |
* - These numbers are used by the client to know which field they correspond to, |
| 40 |
* so changing them can break back-compatibility (i.e. already running or old UIS). |
| 41 |
* - If in doubt, just leave the current fields as is, and just take a number |
| 42 |
* not in use for new fields. |
| 43 |
* |
| 44 |
* https://developers.google.com/protocol-buffers/docs/proto3#assigning_field_numbers |
| 45 |
* |
| 46 |
* |
| 47 |
* */ |
| 48 |
|
| 49 |
|
| 50 |
// Query type messages |
| 51 |
message PbMeta { |
| 52 |
optional string title = 1; |
| 53 |
optional string description = 2; |
| 54 |
optional string URL = 3; |
| 55 |
optional string user_defined = 4; |
| 56 |
} |
| 57 |
|
| 58 |
message PbTimeZone { |
| 59 |
optional int32 hours = 1; |
| 60 |
optional int32 minutes = 2; |
| 61 |
optional string string_basic = 3; |
| 62 |
optional string string_extended = 4; |
| 63 |
} |
| 64 |
|
| 65 |
message PbTaskProxyRefs { |
| 66 |
repeated string task_proxies = 1; |
| 67 |
} |
| 68 |
|
| 69 |
message PbWorkflow { |
| 70 |
optional string stamp = 1; |
| 71 |
optional string id = 2; |
| 72 |
optional string name = 3; |
| 73 |
optional string status = 4; |
| 74 |
optional string host = 5; |
| 75 |
optional int32 port = 6; |
| 76 |
optional string owner = 7; |
| 77 |
repeated string tasks = 8; |
| 78 |
repeated string families = 9; |
| 79 |
optional PbEdges edges = 10; |
| 80 |
optional int32 api_version = 11; |
| 81 |
optional string cylc_version = 12; |
| 82 |
optional double last_updated = 13; |
| 83 |
optional PbMeta meta = 14; |
| 84 |
optional string newest_active_cycle_point = 16; |
| 85 |
optional string oldest_active_cycle_point = 17; |
| 86 |
optional bool reloaded = 18; |
| 87 |
optional string run_mode = 19; |
| 88 |
optional string cycling_mode = 20; |
| 89 |
map<string, int32> state_totals = 21; |
| 90 |
optional string workflow_log_dir = 22; |
| 91 |
optional PbTimeZone time_zone_info = 23; |
| 92 |
optional int32 tree_depth = 24; |
| 93 |
repeated string job_log_names = 25; |
| 94 |
repeated string ns_def_order = 26; |
| 95 |
repeated string states = 27; |
| 96 |
repeated string task_proxies = 28; |
| 97 |
repeated string family_proxies = 29; |
| 98 |
optional string status_msg = 30; |
| 99 |
optional int32 is_held_total = 31; |
| 100 |
repeated string jobs = 32; |
| 101 |
optional int32 pub_port = 33; |
| 102 |
optional string broadcasts = 34; |
| 103 |
optional int32 is_queued_total = 35; |
| 104 |
map<string, PbTaskProxyRefs> latest_state_tasks = 36; |
| 105 |
optional bool pruned = 37; |
| 106 |
optional int32 is_runahead_total = 38; |
| 107 |
optional bool states_updated = 39; |
| 108 |
optional int32 n_edge_distance = 40; |
| 109 |
repeated PbLogRecord log_records = 41; |
| 110 |
optional bool contains_held = 42; |
| 111 |
optional bool contains_retry = 43; |
| 112 |
} |
| 113 |
|
| 114 |
message PbLogRecord { |
| 115 |
optional string level = 1; |
| 116 |
optional string message = 2; |
| 117 |
} |
| 118 |
|
| 119 |
// Selected runtime fields |
| 120 |
message PbRuntime { |
| 121 |
optional string platform = 1; |
| 122 |
optional string script = 2; |
| 123 |
optional string init_script = 3; |
| 124 |
optional string env_script = 4; |
| 125 |
optional string err_script = 5; |
| 126 |
optional string exit_script = 6; |
| 127 |
optional string pre_script = 7; |
| 128 |
optional string post_script = 8; |
| 129 |
optional string work_sub_dir = 9; |
| 130 |
optional string execution_polling_intervals = 10; |
| 131 |
optional string execution_retry_delays = 11; |
| 132 |
optional string execution_time_limit = 12; |
| 133 |
optional string submission_polling_intervals = 13; |
| 134 |
optional string submission_retry_delays = 14; |
| 135 |
optional string directives = 15; |
| 136 |
optional string environment = 16; |
| 137 |
optional string outputs = 17; |
| 138 |
optional string completion = 18; |
| 139 |
optional string run_mode = 19; |
| 140 |
} |
| 141 |
|
| 142 |
|
| 143 |
// Nodes |
| 144 |
message PbJob { |
| 145 |
reserved 29; /* see https://github.com/cylc/cylc-flow/pull/5672 */ |
| 146 |
optional string stamp = 1; |
| 147 |
optional string id = 2; |
| 148 |
optional int32 submit_num = 3; |
| 149 |
optional string state = 4; |
| 150 |
optional string task_proxy = 5; |
| 151 |
optional string submitted_time = 6; |
| 152 |
optional string started_time = 7; |
| 153 |
optional string finished_time = 8; |
| 154 |
optional string job_id = 9; |
| 155 |
optional string job_runner_name = 10; |
| 156 |
optional float execution_time_limit = 14; |
| 157 |
optional string platform = 15; |
| 158 |
optional string job_log_dir = 17; |
| 159 |
optional string name = 30; /* filter item */ |
| 160 |
optional string cycle_point = 31; /* filter item */ |
| 161 |
repeated string messages = 32; |
| 162 |
optional PbRuntime runtime = 33; |
| 163 |
optional string estimated_finish_time = 34; |
| 164 |
} |
| 165 |
|
| 166 |
message PbTask { |
| 167 |
optional string stamp = 1; |
| 168 |
optional string id = 2; |
| 169 |
optional string name = 3; |
| 170 |
optional PbMeta meta = 4; |
| 171 |
optional float mean_elapsed_time = 5; |
| 172 |
optional int32 depth = 6; |
| 173 |
repeated string proxies = 7; |
| 174 |
repeated string namespace = 8; |
| 175 |
repeated string parents = 9; |
| 176 |
optional string first_parent = 10; |
| 177 |
optional PbRuntime runtime = 11; |
| 178 |
} |
| 179 |
|
| 180 |
message PbPollTask { |
| 181 |
optional string local_proxy = 1; |
| 182 |
optional string workflow = 2; |
| 183 |
optional string remote_proxy = 3; |
| 184 |
optional string req_state = 4; |
| 185 |
optional string graph_string = 5; |
| 186 |
} |
| 187 |
|
| 188 |
message PbCondition { |
| 189 |
optional string task_proxy = 1; |
| 190 |
optional string expr_alias = 2; |
| 191 |
optional string req_state = 3; |
| 192 |
optional bool satisfied = 4; |
| 193 |
optional string message = 5; |
| 194 |
} |
| 195 |
|
| 196 |
message PbPrerequisite { |
| 197 |
optional string expression = 1; |
| 198 |
repeated PbCondition conditions = 2; |
| 199 |
repeated string cycle_points = 3; |
| 200 |
optional bool satisfied = 4; |
| 201 |
} |
| 202 |
|
| 203 |
message PbOutput { |
| 204 |
optional string label = 1; |
| 205 |
optional string message = 2; |
| 206 |
optional bool satisfied = 3; |
| 207 |
optional double time = 4; |
| 208 |
} |
| 209 |
|
| 210 |
message PbTrigger { |
| 211 |
optional string id = 1; |
| 212 |
optional string label = 2; |
| 213 |
optional string message = 3; |
| 214 |
optional bool satisfied = 4; |
| 215 |
optional double time = 5; |
| 216 |
} |
| 217 |
|
| 218 |
message PbTaskProxy { |
| 219 |
optional string stamp = 1; |
| 220 |
optional string id = 2; |
| 221 |
optional string task = 3; |
| 222 |
optional string state = 4; |
| 223 |
optional string cycle_point = 5; |
| 224 |
optional int32 depth = 6; |
| 225 |
optional int32 job_submits = 7; |
| 226 |
map<string, PbOutput> outputs = 9; |
| 227 |
repeated string namespace = 11; |
| 228 |
repeated PbPrerequisite prerequisites = 12; |
| 229 |
repeated string jobs = 13; |
| 230 |
optional string first_parent = 15; |
| 231 |
optional string name = 16; /* filter item */ |
| 232 |
optional bool is_held = 17; |
| 233 |
repeated string edges = 18; |
| 234 |
repeated string ancestors = 19; |
| 235 |
optional string flow_nums = 20; |
| 236 |
map<string, PbTrigger> external_triggers = 23; |
| 237 |
map<string, PbTrigger> xtriggers = 24; |
| 238 |
optional bool is_queued = 25; |
| 239 |
optional bool is_runahead = 26; |
| 240 |
optional bool flow_wait = 27; |
| 241 |
optional PbRuntime runtime = 28; |
| 242 |
optional int32 graph_depth = 29; |
| 243 |
optional bool is_retry = 30; |
| 244 |
optional bool is_wallclock = 31; |
| 245 |
optional bool is_xtriggered = 32; |
| 246 |
} |
| 247 |
|
| 248 |
message PbFamily { |
| 249 |
optional string stamp = 1; |
| 250 |
optional string id = 2; |
| 251 |
optional string name = 3; |
| 252 |
optional PbMeta meta = 4; |
| 253 |
optional int32 depth = 5; |
| 254 |
repeated string proxies = 6; |
| 255 |
repeated string parents = 7; |
| 256 |
repeated string child_tasks = 8; |
| 257 |
repeated string child_families = 9; |
| 258 |
optional string first_parent = 10; |
| 259 |
optional PbRuntime runtime = 11; |
| 260 |
} |
| 261 |
|
| 262 |
message PbFamilyProxy { |
| 263 |
optional string stamp = 1; |
| 264 |
optional string id = 2; |
| 265 |
optional string cycle_point = 3; |
| 266 |
optional string name = 4; /* filter item */ |
| 267 |
optional string family = 5; |
| 268 |
optional string state = 6; |
| 269 |
optional int32 depth = 7; |
| 270 |
optional string first_parent = 8; |
| 271 |
repeated string child_tasks = 10; |
| 272 |
repeated string child_families = 11; |
| 273 |
optional bool is_held = 12; |
| 274 |
repeated string ancestors = 13; |
| 275 |
repeated string states = 14; |
| 276 |
map<string, int32> state_totals = 15; |
| 277 |
optional int32 is_held_total = 16; |
| 278 |
optional bool is_queued = 17; |
| 279 |
optional int32 is_queued_total = 18; |
| 280 |
optional bool is_runahead = 19; |
| 281 |
optional int32 is_runahead_total = 20; |
| 282 |
optional PbRuntime runtime = 21; |
| 283 |
optional int32 graph_depth = 22; |
| 284 |
optional bool is_retry = 23; |
| 285 |
optional bool is_wallclock = 24; |
| 286 |
optional bool is_xtriggered = 25; |
| 287 |
} |
| 288 |
|
| 289 |
message PbEdge { |
| 290 |
optional string stamp = 1; |
| 291 |
optional string id = 2; |
| 292 |
optional string source = 3; |
| 293 |
optional string target = 4; |
| 294 |
optional bool suicide = 5; |
| 295 |
optional bool cond = 6; |
| 296 |
} |
| 297 |
|
| 298 |
message PbEdges { |
| 299 |
optional string id = 1; |
| 300 |
repeated string edges = 2; |
| 301 |
repeated PbPollTask workflow_polling_tasks = 3; |
| 302 |
repeated string leaves = 4; |
| 303 |
repeated string feet = 5; |
| 304 |
} |
| 305 |
|
| 306 |
|
| 307 |
/* Now bundle for messaging */ |
| 308 |
message PbEntireWorkflow { |
| 309 |
optional PbWorkflow workflow = 1; |
| 310 |
repeated PbTask tasks = 2; |
| 311 |
repeated PbTaskProxy task_proxies = 3; |
| 312 |
repeated PbJob jobs = 4; |
| 313 |
repeated PbFamily families = 5; |
| 314 |
repeated PbFamilyProxy family_proxies = 6; |
| 315 |
repeated PbEdge edges = 7; |
| 316 |
} |
| 317 |
|
| 318 |
message EDeltas { |
| 319 |
optional double time = 1; |
| 320 |
optional int64 checksum = 2; |
| 321 |
repeated PbEdge added = 3; |
| 322 |
repeated PbEdge updated = 4; |
| 323 |
repeated string pruned = 5; |
| 324 |
optional bool reloaded = 6; |
| 325 |
} |
| 326 |
|
| 327 |
message FDeltas { |
| 328 |
optional double time = 1; |
| 329 |
optional int64 checksum = 2; |
| 330 |
repeated PbFamily added = 3; |
| 331 |
repeated PbFamily updated = 4; |
| 332 |
repeated string pruned = 5; |
| 333 |
optional bool reloaded = 6; |
| 334 |
} |
| 335 |
|
| 336 |
message FPDeltas { |
| 337 |
optional double time = 1; |
| 338 |
optional int64 checksum = 2; |
| 339 |
repeated PbFamilyProxy added = 3; |
| 340 |
repeated PbFamilyProxy updated = 4; |
| 341 |
repeated string pruned = 5; |
| 342 |
optional bool reloaded = 6; |
| 343 |
} |
| 344 |
|
| 345 |
message JDeltas { |
| 346 |
optional double time = 1; |
| 347 |
optional int64 checksum = 2; |
| 348 |
repeated PbJob added = 3; |
| 349 |
repeated PbJob updated = 4; |
| 350 |
repeated string pruned = 5; |
| 351 |
optional bool reloaded = 6; |
| 352 |
} |
| 353 |
|
| 354 |
message TDeltas { |
| 355 |
optional double time = 1; |
| 356 |
optional int64 checksum = 2; |
| 357 |
repeated PbTask added = 3; |
| 358 |
repeated PbTask updated = 4; |
| 359 |
repeated string pruned = 5; |
| 360 |
optional bool reloaded = 6; |
| 361 |
} |
| 362 |
|
| 363 |
message TPDeltas { |
| 364 |
optional double time = 1; |
| 365 |
optional int64 checksum = 2; |
| 366 |
repeated PbTaskProxy added = 3; |
| 367 |
repeated PbTaskProxy updated = 4; |
| 368 |
repeated string pruned = 5; |
| 369 |
optional bool reloaded = 6; |
| 370 |
} |
| 371 |
|
| 372 |
message WDeltas { |
| 373 |
optional double time = 1; |
| 374 |
optional PbWorkflow added = 2; |
| 375 |
optional PbWorkflow updated = 3; |
| 376 |
optional bool reloaded = 4; |
| 377 |
optional string pruned = 5; |
| 378 |
} |
| 379 |
|
| 380 |
message AllDeltas { |
| 381 |
FDeltas families = 1; |
| 382 |
FPDeltas family_proxies = 2; |
| 383 |
JDeltas jobs = 3; |
| 384 |
TDeltas tasks = 4; |
| 385 |
TPDeltas task_proxies = 5; |
| 386 |
EDeltas edges = 6; |
| 387 |
WDeltas workflow = 7; |
| 388 |
} |