Skip to content

Commit dd97026

Browse files
committed
fix: render component IDs as plain ints in alert email summaries
Previously, component IDs in alert summaries were shown as `numpy.int64` objects, which rendered in emails like: Components: [np.int64(1122), np.int64(1123), ...] This commit ensures component IDs are converted to plain Python ints during aggregation, so they display cleanly as: Components: [1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130] This improves readability and avoids confusion for users receiving alert emails. Signed-off-by: cyiallou - Costas <[email protected]>
1 parent 4e188ff commit dd97026

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/frequenz/lib/notebooks/alerts/alert_email.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def generate_alert_summary(
303303
"state_value",
304304
lambda x: [html.escape(str(s)) for s in x.unique()],
305305
),
306-
unique_components=("component_id", lambda x: list(x.unique())),
306+
unique_components=("component_id", lambda x: [int(c) for c in x.unique()]),
307307
)
308308
.reset_index()
309309
)

0 commit comments

Comments
 (0)