Runner.online and FetchJobRequest.version (#13)
- commit
- faa62b9acaf01e19839922c08ccbd49f0fec2b63
- author
- brice · · 2026-10-16 07:37 UTC
- committer
- bnema · · 2026-10-16 07:37 UTC
- parent
- 9d26b26
- signature
- SSH Unverified
SHA256:VOCA5lYARHcbKDZ7GhTV45VmcjWnJ6ZQIBazj17LivAThe key is unknown
4 files · +46 -6
M gen/ermite/run.pb.go +17 -3 generated file: collapsed
M gen/ermite/runner.pb.go +17 -3 generated file: collapsed
M proto/ermite/run.proto +6 -0
| @@ -253,6 +253,12 @@ message Runner { | |||
| 253 | 253 | google.protobuf.Timestamp last_seen = 9; | |
| 254 | 254 | // Busy is true while the runner has a job in progress. | |
| 255 | 255 | bool busy = 10; | |
| 256 | + | // Online is true when the server heard from the runner (see last_seen) less | |
| 257 | + | // than 2 minutes ago, by the server's own clock at the time of the answer. | |
| 258 | + | // Clients show this instead of comparing last_seen with their clock, which | |
| 259 | + | // may be minutes off. A server that predates the field leaves it false: | |
| 260 | + | // clients that need to tell can fall back to last_seen. | |
| 261 | + | bool online = 11; | |
| 256 | 262 | } | |
| 257 | 263 | ||
| 258 | 264 | // RunService reads and controls CI runs, like `gh run` does on GitHub. It is for | |
| @@ -253,6 +253,12 @@ message Runner { | |||||
| 253 | google.protobuf.Timestamp last_seen = 9; | 253 | google.protobuf.Timestamp last_seen = 9; | ||
| 254 | // Busy is true while the runner has a job in progress. | 254 | // Busy is true while the runner has a job in progress. | ||
| 255 | bool busy = 10; | 255 | bool busy = 10; | ||
| 256 | + | // Online is true when the server heard from the runner (see last_seen) less | |||
| 257 | + | // than 2 minutes ago, by the server's own clock at the time of the answer. | |||
| 258 | + | // Clients show this instead of comparing last_seen with their clock, which | |||
| 259 | + | // may be minutes off. A server that predates the field leaves it false: | |||
| 260 | + | // clients that need to tell can fall back to last_seen. | |||
| 261 | + | bool online = 11; | |||
| 256 | } | 262 | } | ||
| 257 | 263 | ||||
| 258 | // RunService reads and controls CI runs, like `gh run` does on GitHub. It is for | 264 | // RunService reads and controls CI runs, like `gh run` does on GitHub. It is for | ||
M proto/ermite/runner.proto +6 -0
| @@ -463,6 +463,12 @@ message FetchJobRequest { | |||
| 463 | 463 | // (see FetchJob). A new poll uses a new id. Empty means no retry protection: | |
| 464 | 464 | // a lost assignment is then recovered by the acknowledgement timeout alone. | |
| 465 | 465 | string poll_id = 2; | |
| 466 | + | // Version is the release of the running runner software, for example | |
| 467 | + | // "v0.1.0", or "devel", at most 64 characters. Optional: the server stores it | |
| 468 | + | // as the runner's version (Runner.version in ListRunners), replacing the one | |
| 469 | + | // given at registration, so that the list shows what runs now. Empty, from | |
| 470 | + | // an older runner, leaves the stored version unchanged. | |
| 471 | + | string version = 3; | |
| 466 | 472 | } | |
| 467 | 473 | ||
| 468 | 474 | // FetchJobResponse holds the job given to the runner, if any. | |
| @@ -463,6 +463,12 @@ message FetchJobRequest { | |||||
| 463 | // (see FetchJob). A new poll uses a new id. Empty means no retry protection: | 463 | // (see FetchJob). A new poll uses a new id. Empty means no retry protection: | ||
| 464 | // a lost assignment is then recovered by the acknowledgement timeout alone. | 464 | // a lost assignment is then recovered by the acknowledgement timeout alone. | ||
| 465 | string poll_id = 2; | 465 | string poll_id = 2; | ||
| 466 | + | // Version is the release of the running runner software, for example | |||
| 467 | + | // "v0.1.0", or "devel", at most 64 characters. Optional: the server stores it | |||
| 468 | + | // as the runner's version (Runner.version in ListRunners), replacing the one | |||
| 469 | + | // given at registration, so that the list shows what runs now. Empty, from | |||
| 470 | + | // an older runner, leaves the stored version unchanged. | |||
| 471 | + | string version = 3; | |||
| 466 | } | 472 | } | ||
| 467 | 473 | ||||
| 468 | // FetchJobResponse holds the job given to the runner, if any. | 474 | // FetchJobResponse holds the job given to the runner, if any. | ||