-
Notifications
You must be signed in to change notification settings - Fork 86
[nexus] ereport restart ID table with first-seen timestamps (good version) #10618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
319da58
okay i think this might actually work
hawkw b2fff05
diesel hell
hawkw 5602f03
okay get the latest query in there too
hawkw 972cfc2
move stuff into other stuff
hawkw 675e2ed
okay i can't quite get the latest query inlined into the CTE, that's
hawkw c98befb
whoa it actually works
hawkw 7aa683a
have a restart list query
hawkw 7cd919c
let's have some tests for that as well
hawkw 3cbade2
clean up `ereports_insert_query`
hawkw 7e29d33
migration, index, constraints
hawkw 92ebeb5
actually nothing is using the slot index
hawkw 68a2f39
wip add to loader
hawkw 82c5cb4
finish loader
hawkw 3732a29
gotta also add it here
hawkw 9f1437b
data migration test
hawkw 91df26b
Merge branch 'main' into eliza/ereport-restart-order-v2-final
hawkw dd76be4
update omdb command to use restart table as authortiative source
hawkw 97a5487
Merge branch 'main' into eliza/ereport-restart-order-v2-final
hawkw 30d72f2
issue warnings for ereports with unknown restart IDs
hawkw 6b157b2
post merge test fixup
hawkw c063bd2
nexus-fm now depends on a db type sigh
hawkw 6269baa
restart query will also do a full scan
hawkw efe895f
you have to actually get the rpaths thing correct lol
hawkw 8b01405
fix typo in migration test
hawkw 0b96394
some commentary improvements
hawkw 4de2c50
remove some dead code
hawkw 875fc5b
BLERGH THERES EVEN MORE COPY PASTE MISTAKES IN HERE
hawkw 59cc9fb
UGH I TYPED THE WRONG ONE KMS KMS KMS KMS
hawkw f9f2e34
fixup omdb db ereport reporters arguments, some expectorates
hawkw 22417d8
Merge branch 'main' into eliza/ereport-restart-order-v2-final
hawkw 8376b52
post merge expectoration
hawkw 3c289b5
comment explaining ereports insert return value
hawkw 30370df
Merge branch 'main' into eliza/ereport-restart-order-v2-final
hawkw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| // This Source Code Form is subject to the terms of the Mozilla Public | ||
| // License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| // file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
|
||
| use crate::DbTypedUuid; | ||
| use crate::EreporterType; | ||
| use crate::SpMgsSlot; | ||
| use crate::SpType; | ||
| use chrono::DateTime; | ||
| use chrono::Utc; | ||
| use nexus_db_schema::schema::ereporter_restart; | ||
| use omicron_uuid_kinds::EreporterRestartKind; | ||
| use omicron_uuid_kinds::EreporterRestartUuid; | ||
|
|
||
| #[derive(Clone, Debug, Insertable, Queryable, Selectable)] | ||
| #[diesel(table_name = ereporter_restart)] | ||
| pub struct EreporterRestart { | ||
| pub id: DbTypedUuid<EreporterRestartKind>, | ||
| pub time_first_seen: DateTime<Utc>, | ||
| pub reporter: EreporterType, | ||
| pub slot_type: SpType, | ||
| pub slot: Option<SpMgsSlot>, | ||
| } | ||
|
|
||
| impl EreporterRestart { | ||
| pub fn slot_number(&self) -> Option<u16> { | ||
| self.slot.map(|slot| (*slot).0) | ||
| } | ||
|
|
||
| pub fn id(&self) -> &EreporterRestartUuid { | ||
| &self.id.0 | ||
| } | ||
| } | ||
|
|
||
| impl iddqd::IdOrdItem for EreporterRestart { | ||
| type Key<'a> = &'a EreporterRestartUuid; | ||
|
|
||
| fn key(&self) -> Self::Key<'_> { | ||
| self.id() | ||
| } | ||
|
|
||
| iddqd::id_upcast!(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ impl_enum_type!( | |
| Clone, | ||
| Debug, | ||
| PartialEq, | ||
| Eq, | ||
| Serialize, | ||
| Deserialize, | ||
| AsExpression, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was always intended to be
--serialrather than a positional argument, but i had forgotten to make it one ages ago. whoops. 😅