Make Zulip's alertmanager integration closer to matrix-hookshot-adapter's formatting #287

Merged
raito merged 1 commit from alertmanager-zulip-ng into main 2025-08-27 12:40:51 +00:00
Owner

As @delroth asked for, the last commit contains a patch to Zulip to enable an alerting formatting closer to the one we had on Matrix.

I plan to send this change to upstream and discuss a bit first, I surmise they will want to make some parts of it configurable.

As @delroth asked for, the last commit contains a patch to Zulip to enable an alerting formatting closer to the one we had on Matrix. I plan to send this change to upstream and discuss a bit first, I surmise they will want to make some parts of it configurable.
We have VMs sitting on the AFNix hypervisor for Lix secret tenancy.
Let the VM pick their tenant themselves.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
The `hostId` concept is akin to ZFS' `hostId` and aim to enable VM
identity across virtual machines renames, e.g. ZFS datasets consistency.

In addition, it ensure clash-free network interface names and VSOCK
CIDs.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
https://github.com/ryantm/agenix/pull/255
Otherwise, VMs cannot decrypt their secrets at all.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This matches the matrix-hookshot-adapter's formatting made by @K900 more
or less.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito force-pushed alertmanager-zulip-ng from e397bf005c to a65af4cc0c 2025-08-27 00:38:27 +00:00 Compare
requested review from delroth 2025-08-27 00:38:34 +00:00
raito changed title from WIP: Make Zulip's alertmanager integration closer to matrix-hookshot-adapter's formatting to Make Zulip's alertmanager integration closer to matrix-hookshot-adapter's formatting 2025-08-27 00:38:37 +00:00
delroth approved these changes 2025-08-27 00:43:36 +00:00
delroth left a comment
Owner

Approval conditional on actual testing to make sure the formatting is good - feel free to apply minor changes without asking me for another look.

Approval conditional on actual testing to make sure the formatting is good - feel free to apply minor changes without asking me for another look.
raito force-pushed alertmanager-zulip-ng from a65af4cc0c to f340a3767e 2025-08-27 02:26:32 +00:00 Compare
Author
Owner

Pending final formatting validation

Pending final formatting validation
Owner

The formatting seems wrong

The formatting seems wrong
Owner

More precisely, the labels contain line breaks, which means that the call to dedent is useless because there is no common whitespace at the beginning of each line

More precisely, the labels contain line breaks, which means that the call to `dedent` is useless because there is no common whitespace at the beginning of each line
@ -0,0 +83,4 @@
+ labels_block = "\n".join(f"- {k}: {v.tame(check_string)}" for k, v in labels.items())
+ annotations_block = "\n".join(f"- {k}: {v.tame(check_string)}" for k, v in annotations.items())
+
+ body = dedent(f"""{icon} **{heading}**

Should be

body = dedent("""
    {icon} **{heading}**
    {silence_link}
    ```spoiler Details
    **Description**:
    {desc}

    **Labels:**
    {labels_block}

    **Annotations:**
    {annotations_block}
    ```
    """).strip().format(...)
Should be ````python body = dedent(""" {icon} **{heading}** {silence_link} ```spoiler Details **Description**: {desc} **Labels:** {labels_block} **Annotations:** {annotations_block} ``` """).strip().format(...) ````
Author
Owner

Thanks!

Thanks!
raito marked this conversation as resolved
raito force-pushed alertmanager-zulip-ng from f340a3767e to 22f1cbb06a 2025-08-27 12:40:35 +00:00 Compare
Author
Owner

It's now perfect, thank you @tom-hubrecht !

It's now perfect, thank you @tom-hubrecht !
raito merged commit 22f1cbb06a into main 2025-08-27 12:40:51 +00:00
raito deleted branch alertmanager-zulip-ng 2025-08-27 12:40:51 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No milestone
No project
No assignees
3 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: the-distro/infra#287
No description provided.