prometheus / prometheus/alertmanager

UI: implement the full Silence lifecycle with SilenceService

Open
#5,491 0 comments 0 reactions 1 assignee View on GitHub

@siavashs is already working on this.

Since Aug 29, 2026.

component/api component/silences component/ui kind/enhancement
Dominant language
Go
Stars
8.6k
Forks
2.5k
Avg merge
2d 6h
Merged PRs (30d)
61

Description

Parent: #5451
API dependencies: #5479, #5481, #5482

Summary

Implement Silence list, detail, create, update, affected-alert preview, expire/delete, and feature-gated multi-matcher-set behavior using generated silence.v3alpha.SilenceService clients.

No API v2 fallback or handwritten Silence wire model is permitted.

List and detail views

  • Add URL-backed filtering, deterministic sorting, and pagination for active, pending, and expired silences.
  • Show creator and comment context in list rows/cards as requested by #4303.
  • Render sorted matcher sets as requested by #3834, annotations, timestamps, current state, IDs, and replacement relationships where available.
  • Add clean nested routes for list, detail, create, and edit.
  • Render affected-alert previews through AlertService.

State-count contract requirement

The Elm UI shows active, pending, and expired tab counts. Fetching every page solely to compute those counts is unbounded.

Before the SilenceService proto freezes, resolve one of the following:

  1. Add bounded state counts/facets to ListSilences; or
  2. Obtain an explicit maintainer-approved parity exception and document the removed counts.

Form and mutations

  • Build create/update forms supporting one or more OR-of-AND matcher sets and all matcher operators.
  • Preserve UTF-8 label names and correct escaping for quotes, backslashes, and regex values.
  • Support optional creator/comment, start/end/duration inputs, local/UTC display, first-day-of-week preference, and annotations.
  • Validate incomplete matchers, duplicate annotation keys, IDs, timestamps, and end boundaries before submission.
  • Pre-populate forms from Alert labels and existing Silences.
  • Navigate to the resulting/replacement ID after successful create or history-changing update.
  • Require an explicit confirmation before expire/delete.

Feature-gated multi-set behavior

  • Single-set CRUD remains available without the multi-set capability.
  • Multi-set requests are sent faithfully and never flattened.
  • When disabled, structured FailedPrecondition details identify the required feature and are rendered as an actionable message.
  • When enabled, list/detail/edit must preserve every matcher set even though API v2 cannot represent the resource faithfully.

Acceptance criteria

  • List/detail/create/update/expire/delete workflows use generated v3alpha messages and methods.
  • Active/pending/expired filtering, sorting, pagination, and agreed count behavior are deterministic.
  • Creator/comment, matcher sets, annotations, timestamps, state, IDs, and affected alerts are visible and accessible.
  • Form validation and URL pre-population handle every matcher operator, UTF-8 names, and escaping correctly.
  • Empty creator and comment remain valid.
  • Replacement updates navigate to the resulting ID.
  • Expire/delete always requires confirmation and handles NotFound/Aborted races.
  • Multi-set feature-disabled and feature-enabled behavior is covered without flattening.
  • No API v2 calls or handwritten Silence wire models remain.
  • Component and real-server tests cover route prefixes, pagination, filters, previews, forms, mutations, errors, and feature gating.

Dependencies and related work

  • Connect data layer: #5487.
  • Application shell/settings: #5488.
  • Shared matcher, pagination, error, and feature contracts: #5479.
  • Unary SilenceService: #5482.
  • AlertService #5481 for affected-alert previews.
  • Multi-matcher Silence model: #4946.

Likely code areas

  • ui/mantine-ui/src/pages/Silences.page.tsx and new detail/form pages
  • matcher-set, date/time, annotation, preview, confirmation, and pagination components
  • generated Silence/Alert query and mutation adapters
  • replacement/removal of ui/mantine-ui/src/data/silences.ts

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.