feat: Match the dashboard api container by pattern #97

Merged
ahmad merged 1 commit from feature/96-dashboard-container-pattern into main 2026-10-10 05:40:08 +00:00
Owner

Issue

Closes #96

Problem

The "API errors" Loki panel matches the api container by exact name. With rolling-services, replicas are numbered (rihla-api-2, rihla-api-3, …), so the panel goes empty after the first swap. Needed for suhba/rihla#417.

Solution

The panel query uses =~, so api-container is a regular expression. An exact name such as trip-app-1 still matches only that container.

Review notes

N/A

Risks and trade-offs

A name containing . now matches any character in that position. No current container name has one.

### Issue Closes #96 ### Problem The "API errors" Loki panel matches the api container by exact name. With `rolling-services`, replicas are numbered (`rihla-api-2`, `rihla-api-3`, …), so the panel goes empty after the first swap. Needed for suhba/rihla#417. ### Solution The panel query uses `=~`, so `api-container` is a regular expression. An exact name such as `trip-app-1` still matches only that container. ### Review notes N/A ### Risks and trade-offs A name containing `.` now matches any character in that position. No current container name has one.
feat: Match the dashboard's api container by pattern
All checks were successful
PR / validate (pull_request) Successful in 19s
8039b8b45f
A rolled service's replicas are numbered, not named, so the API
errors panel matched nothing after the first swap. An exact name is
still a pattern that matches only itself.
ahmad_bot approved these changes 2026-10-10 05:39:28 +00:00
ahmad_bot left a comment

Verified on 8039b8b4: the panel matcher is =~ and Loki anchors label regexes, so an exact name such as trip-app-1 still matches only itself (#96 AC2) and rihla-api-.* matches the numbered replicas (AC1). The input description and the README row say the value is a regular expression. The sed substitution is unchanged; the eight current consumers pass plain names with no /, & or \, so none breaks. CI green, title 50.

Note, not blocking: the branch commit's subject is 52 chars; the squash takes the 50-char title, so what lands on main is within the bar.

Verified on 8039b8b4: the panel matcher is `=~` and Loki anchors label regexes, so an exact name such as `trip-app-1` still matches only itself (#96 AC2) and `rihla-api-.*` matches the numbered replicas (AC1). The input description and the README row say the value is a regular expression. The `sed` substitution is unchanged; the eight current consumers pass plain names with no `/`, `&` or `\`, so none breaks. CI green, title 50. Note, not blocking: the branch commit's subject is 52 chars; the squash takes the 50-char title, so what lands on main is within the bar.
ahmad merged commit 1c8c3ae060 into main 2026-10-10 05:40:08 +00:00
ahmad deleted branch feature/96-dashboard-container-pattern 2026-10-10 05:40:09 +00:00
Sign in to join this conversation.
No description provided.