Skip to content

Rename alert field on Alert response to payload - #11281

Merged
david-crespo merged 1 commit into
mainfrom
alert-payload
Sep 11, 2026
Merged

Rename alert field on Alert response to payload#11281
david-crespo merged 1 commit into
mainfrom
alert-payload

Conversation

@david-crespo

@david-crespo david-crespo commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

While working on oxidecomputer/console#3320, we found the alert field on the Alert response a little awkward to talk about, a sign about naming that we try to take seriously when it's not too costly. Fortunately the alert list endpoint added in #11072 has not been in a release yet, so it's really no big deal to change it. Here we rename it to payload. @hawkw, @fakemonster, and I considered alternatives like data and details, but we're landing on payload.

data was a strong candidate because in the actual body we send to the webhook receiver, we call the whole thing the payload and we call the alert contents data there (see below). Still, I like that payload indicates it's the thing that is sent on somewhere. Somehow the metonymy there is much more tolerable than alert and Alert — maybe just because it's across two different objects rather than within the same one.

#[derive(serde::Serialize, Debug)]
struct Payload<'a> {
alert_class: AlertClass,
alert_version: u32,
alert_id: AlertUuid,
data: &'a serde_json::Value,
delivery: DeliveryMetadata<'a>,
}

david-crespo added a commit to oxidecomputer/console that referenced this pull request Sep 11, 2026
In the alerts table and detail modal, "Alert ID" and "Alert class" become
"ID" and "Class" since the context is already alerts. The alert data is
labeled "Payload" to match the API field rename in
oxidecomputer/omicron#11281, and AlertBodyViewer becomes AlertPayload.
david-crespo added a commit to oxidecomputer/console that referenced this pull request Sep 11, 2026
In the alerts table and detail modal, "Alert ID" and "Alert class" become
"ID" and "Class" since the context is already alerts. The alert data is
labeled "Payload" to match the API field rename in
oxidecomputer/omicron#11281, and AlertBodyViewer becomes AlertPayload.

@hawkw hawkw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We discussed this a bit on Matrix, and I'm on board with the renaming. I had thought about calling it that when I added the API, but vacillated and went with alert instead; in hindsight I should have stuck with payload. Glad we got this in before shipping R23.

@david-crespo
david-crespo enabled auto-merge (squash) September 11, 2026 19:49
@david-crespo
david-crespo merged commit 6deb5ff into main Sep 11, 2026
19 checks passed
@david-crespo
david-crespo deleted the alert-payload branch September 11, 2026 20:02
david-crespo added a commit to oxidecomputer/console that referenced this pull request Sep 11, 2026
Bumping to the version going to dogfood, then will bump again for
oxidecomputer/omicron#11281.
david-crespo added a commit to oxidecomputer/console that referenced this pull request Sep 12, 2026
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.

2 participants