Repository navigation
Commit 0f508ce
authored
Check API version before deploying to dogfood (#3449)
If we accidentally yolo a version of the console to dogfood that has a
too-new API client, it won't work at all. Someone how it never occurred
to me before we can just check this at upload time. With
oxidecomputer/omicron#10250 we'll have an
endpoint we can call to find the current version deployed, but in the
meantime we can get it (without auth) through binary search, making
requests against the API with various `api-version` values and seeing
which are rejected with a version error.
If the check fails, we get output like this:
```
Resolved fe921de to fe921de
Checking which API versions dogfood accepts...
Dogfood API version: 2026110500.0.0
Console API version: 2026111000.0.0
Error: dogfood would reject API requests from this console build. Pick a commit with app/api/__generated__/API_VERSION at or below dogfood's.
```1 parent fe921de commit 0f508ce
1 file changed
Lines changed: 55 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
29 | 67 | | |
30 | 68 | | |
31 | 69 | | |
| |||
51 | 89 | | |
52 | 90 | | |
53 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
54 | 109 | | |
55 | 110 | | |
56 | 111 | | |
| |||
0 commit comments