Skip to content

nexus: trim trailing nulls in omicron.public.ereport serials#10452

Merged
hawkw merged 4 commits into
mainfrom
eliza/million-dollar-mistake
May 19, 2026
Merged

nexus: trim trailing nulls in omicron.public.ereport serials#10452
hawkw merged 4 commits into
mainfrom
eliza/million-dollar-mistake

Conversation

@hawkw
Copy link
Copy Markdown
Member

@hawkw hawkw commented May 15, 2026

This branch adds a (data-only) migration to remove trailing NUL characters from the serial_number column in omicron.public.ereport. This way, we can query and JOIN on OXV2 serials without encountering sadness. Alongside #10457, which picks up the MGS patch to remove these characters from new ereports, this will fix #10437. Sigh.

@hawkw hawkw marked this pull request as ready for review May 15, 2026 21:48
@hawkw hawkw requested review from jgallagher and smklein May 15, 2026 21:48
@hawkw hawkw added this to the 20 milestone May 15, 2026
Comment thread schema/crdb/ereport-trim-serial-trailing-nulls/up.sql
ctx.client
.batch_execute(&format!(
"
INSERT INTO omicron.public.ereport (
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely test cases!

hawkw added a commit that referenced this pull request May 19, 2026
…10457)

This updates the MGS dep to 
oxidecomputer/management-gateway-service@745a508.
Along with #10452, this is necessary for #10437.

I had considered waiting to get
oxidecomputer/management-gateway-service#494 in the update as well, and
may still do so depending on when I hear back from people about various
things. But, I did want to [take a moment to get some feedback][1]
from potential actual users of the faux-mgs interface on whether they
actually like my (perhaps unnecessarily cutesy) output format before
merging it.

[1]: oxidecomputer/management-gateway-service#494 (comment)
@hawkw hawkw enabled auto-merge (squash) May 19, 2026 16:19
@hawkw hawkw merged commit ee809dd into main May 19, 2026
18 checks passed
@hawkw hawkw deleted the eliza/million-dollar-mistake branch May 19, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0XV2 serial numbers in ereports tragically end with \0\0\0

3 participants