Skip to content

schema: add fm_support_bundle_request table, per-variant data selection tables, and fm_case_id on support_bundle#10091

Draft
mergeconflict wants to merge 3 commits intomainfrom
mergeconflict/fm-sb-schema
Draft

schema: add fm_support_bundle_request table, per-variant data selection tables, and fm_case_id on support_bundle#10091
mergeconflict wants to merge 3 commits intomainfrom
mergeconflict/fm-sb-schema

Conversation

@mergeconflict
Copy link
Contributor

@mergeconflict mergeconflict commented Mar 18, 2026

This PR provides the DB schema and corresponding Diesel table! declarations for storing support bundle requests. That basically looks like:

  • a fm_support_bundle_request table.
  • a bunch of join tables, one for each BundleData constructor, indicating what bundle data was requested.

This also includes the migration scripts. It notably does not include any models; that's coming in PR #10095. Context: #10062.

@mergeconflict mergeconflict marked this pull request as draft March 18, 2026 22:21
@mergeconflict mergeconflict changed the base branch from main to mergeconflict/fm-sb-types March 18, 2026 22:22
@mergeconflict mergeconflict force-pushed the mergeconflict/fm-sb-schema branch from 83e6642 to d14e835 Compare March 18, 2026 22:48
@mergeconflict mergeconflict force-pushed the mergeconflict/fm-sb-types branch 2 times, most recently from 2baa491 to c2191f0 Compare March 18, 2026 22:58
@mergeconflict mergeconflict force-pushed the mergeconflict/fm-sb-schema branch from d14e835 to 239ff2c Compare March 18, 2026 22:58
@mergeconflict mergeconflict force-pushed the mergeconflict/fm-sb-types branch from c2191f0 to e725e86 Compare March 18, 2026 23:14
@mergeconflict mergeconflict force-pushed the mergeconflict/fm-sb-schema branch from 239ff2c to a3cd348 Compare March 18, 2026 23:14
@mergeconflict mergeconflict force-pushed the mergeconflict/fm-sb-types branch from e725e86 to beef2af Compare March 19, 2026 02:03
Move BundleDataCategory, BundleData, BundleDataSelection, and SledSelection
to nexus/types/src/support_bundle.rs. Move EreportFilters to
nexus/types/src/fm/ereport.rs (where it belongs alongside other ereport
types). Update all consumers to import directly.

Pure refactor, no behavior change.
@mergeconflict mergeconflict force-pushed the mergeconflict/fm-sb-types branch from beef2af to 1f1c514 Compare March 19, 2026 02:29
@mergeconflict mergeconflict force-pushed the mergeconflict/fm-sb-schema branch from a3cd348 to a11968f Compare March 19, 2026 02:32
@mergeconflict mergeconflict marked this pull request as ready for review March 19, 2026 02:33
@mergeconflict mergeconflict requested review from hawkw, jgallagher and smklein and removed request for jgallagher and smklein March 19, 2026 02:33
@mergeconflict mergeconflict force-pushed the mergeconflict/fm-sb-schema branch from a11968f to c25bd47 Compare March 19, 2026 02:51
@mergeconflict mergeconflict force-pushed the mergeconflict/fm-sb-types branch from 1f1c514 to ad04192 Compare March 19, 2026 02:51
@hawkw
Copy link
Member

hawkw commented Mar 19, 2026

This also includes the migration scripts. It notably does not include any models; that's coming in PR #10095.

Just as a point of process, while I am also a fan of trying to split changes up into multiple smaller, individually-reviewable PRs, in this case, I feel like we could probably have included the models in the same branch as the schema changes.

@hawkw
Copy link
Member

hawkw commented Mar 19, 2026

Also, it looks like you need to do this thing which we now have to do, due to sadness.

@mergeconflict mergeconflict force-pushed the mergeconflict/fm-sb-types branch from ad04192 to accc0bd Compare March 19, 2026 12:52
…ield

Add the SupportBundleRequest type to fm::case and the
support_bundles_requested field to Case.

Add Display impls for BundleData, BundleDataSelection, SledSelection,
and EreportFilters so that case formatting can show the full data
selection for each requested support bundle.

Add Serialize/Deserialize derives to the support bundle selection types
(BundleDataSelection, BundleData, BundleDataCategory, SledSelection,
EreportFilters) since SupportBundleRequest contains
Option<BundleDataSelection>.

Add proptest Arbitrary impls for BundleDataSelection and EreportFilters
(in test_utils modules) and a proptest-based serde round-trip test for
BundleDataSelection. Add test_case_display coverage for support bundle
requests, exercising both data_selection: None and Some with
parameterized categories.
@mergeconflict mergeconflict force-pushed the mergeconflict/fm-sb-types branch from accc0bd to bd75858 Compare March 19, 2026 12:53
…on tables, and fm_case_id on support_bundle

Add migration SQL for fm_support_bundle_request and five per-variant data
selection tables (reconfigurator, sled_cubby_info, sp_dumps, host_info,
ereports). Add fm_case_id column to support_bundle. Update dbinit.sql,
Diesel schema, and schema version.
@mergeconflict mergeconflict force-pushed the mergeconflict/fm-sb-schema branch from c25bd47 to 2604576 Compare March 19, 2026 13:42
@mergeconflict mergeconflict marked this pull request as draft March 19, 2026 15:11
@smklein
Copy link
Collaborator

smklein commented Mar 19, 2026

Also, it looks like you need to do this thing which we now have to do, due to sadness.

The alternative is asynchronous schema changes, where you don't really know when they're done. So trust me, this is the less bad option!

@hawkw hawkw added the fault-management Everything related to the fault-management initiative (RFD480 and others) label Mar 19, 2026
@mergeconflict mergeconflict force-pushed the mergeconflict/fm-sb-types branch from bd75858 to 0914f01 Compare March 19, 2026 21:24
Base automatically changed from mergeconflict/fm-sb-types to main March 19, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fault-management Everything related to the fault-management initiative (RFD480 and others)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants