| 8501fd58 Andy McCall ↶ | 1 | -- Runner updates (oxygenhub#322, OxygenFlow docs/jetstream.md §8.2). The |
| 2 | -- policy of the site (scope 'site', key ''), an owner ('owner', its name), |
|
| 3 | -- a test group ('group', its id) or a runner ('runner', its id). A NULL |
|
| 4 | -- inherits from the next level out; the nearest setting wins; off unless |
|
| 5 | -- some level turns updates on. |
|
| 6 | ( |
|
| 7 | scope TEXT NOT NULL, |
|
| 8 | key TEXT NOT NULL, |
|
| 9 | updates BOOLEAN, |
|
| 10 | -- 'stable', 'canary' or a version. |
|
| 11 | channel TEXT, |
|
| 12 | -- Hours (UTC) in which updates may start: from, to (to may wrap past midnight). |
|
| 13 | window_from BIGINT, |
|
| 14 | window_to BIGINT, |
|
| 15 | dry_run BOOLEAN, |
|
| 16 | PRIMARY KEY (scope, key) |
|
| 17 | ); |
|
| 18 | -- Test groups: named sets of the site's runners (owner '') or one owner's. |
|
| 19 | -- A runner is in one when chosen, or when a stable hash of its id falls in |
|
| 20 | -- the group's percentage, so the same machines are in it every rollout. |
|
| 21 | ( |
|
| 22 | id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, |
|
| 23 | owner TEXT NOT NULL, |
|
| 24 | name TEXT NOT NULL, |
|
| 25 | percent BIGINT, |
|
| 26 | created_ms BIGINT NOT NULL, |
|
| 27 | UNIQUE (owner, name) |
|
| 28 | ); |
|
| 29 | ( |
|
| 30 | group_id BIGINT NOT NULL REFERENCES runner_groups (id) ON DELETE CASCADE, |
|
| 31 | runner_id BIGINT NOT NULL REFERENCES flow_runners (id) ON DELETE CASCADE, |
|
| 32 | PRIMARY KEY (group_id, runner_id) |
|
| 33 | ); |
|
| 34 | -- What the runner last said about its update, and when. |
|
| 35 | flow_runners ADD COLUMN update_note TEXT NOT NULL DEFAULT ''; |
|
| 36 | flow_runners ADD COLUMN update_ms BIGINT; |