Commit 45c032b
authored
Store
#8631 introduced `PlanningReport`s for blueprints. We've wanted to store
them in the database all along, but have punted on doing so because:
1. They're highly structured, making them difficult to map to SQL /
diesel
2. We expect to want to change them pretty frequently at least in the
near/mid term, which compounds problem 1
Chatting with @davepacheco, we came up with a compromise:
* These reports are not intended for programmatic consumption, and are
primarily useful as a debugging aid. (We want to report _something_ to
operators, but not at this level of detail. More on this momentarily.)
* Therefore, it seems okay to punt on the diesel / SQL problem by
storing these as serialized JSON blobs, under the condition that we
never attempt to parse them in Nexus proper, and therefore don't have to
deal with versioning.
* We can (and this PR does) add an `omdb` subcommand that _attempts_ to
parse them; if omdb and the Nexus that produced the report are out of
sync, this parsing may fail, but that's okay in that we can still at
least dump the raw JSON out. This PR hedges on this a bit by storing the
git commit in the JSON blob, so at least omdb can warn if it's expected
that it can't parse it (and note the git commit from which the support
operator would need an omdb to parse it successfully).PlanningReports in database for debugging only (PR 1/2) (#9029)1 parent 4b4e4ca commit 45c032b
File tree
19 files changed
+504
-30
lines changed- dev-tools/omdb
- src/bin/omdb
- db
- tests
- nexus
- db-model
- src
- db-queries/src/db/datastore
- db-schema/src
- schema/crdb
- debug-log-blueprint-planner
- workspace-hack
19 files changed
+504
-30
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
| 771 | + | |
771 | 772 | | |
772 | 773 | | |
773 | 774 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
10 | 29 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
| 177 | + | |
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
| |||
342 | 344 | | |
343 | 345 | | |
344 | 346 | | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
345 | 351 | | |
346 | 352 | | |
347 | 353 | | |
| |||
1134 | 1140 | | |
1135 | 1141 | | |
1136 | 1142 | | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
1137 | 1146 | | |
1138 | 1147 | | |
1139 | 1148 | | |
| |||
0 commit comments