Skip to content

fix: restore SLI 'No Data' badge lost in merge#44

Merged
TerrifiedBug merged 1 commit intomainfrom
fix/sli-no-data-badge
Mar 7, 2026
Merged

fix: restore SLI 'No Data' badge lost in merge#44
TerrifiedBug merged 1 commit intomainfrom
fix/sli-no-data-badge

Conversation

@TerrifiedBug
Copy link
Copy Markdown
Owner

Summary

  • The merge of PR feat: pipeline health SLIs #33 (Pipeline Health SLIs) lost the "No Data" badge fix due to conflict resolution
  • PipelineHealthBadge now distinguishes between "No SLIs configured" (hidden) and "SLIs configured but no traffic" (gray dot with "No Data" tooltip)

Test plan

  • npx tsc --noEmit passes

When SLIs are configured but the pipeline has no traffic yet, show a
gray "No Data" badge instead of hiding the indicator entirely. This was
lost during the merge of PR #33 due to conflict resolution.
@github-actions github-actions bot added the fix label Mar 7, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 7, 2026

Greptile Summary

This PR restores the "No Data" gray-dot health badge for pipelines that have SLIs configured but haven't received traffic yet — a behavior lost during the merge of PR #33.

The fix adds a hasSlis flag derived from healthQuery.data?.slis?.length. This correctly maps to the two distinct states returned by evaluatePipelineHealth in sli-evaluator.ts:

  • No SLIs configured: server returns { status: "no_data", slis: [] }hasSlis = false → badge is hidden (no change from pre-feat: pipeline health SLIs #33 behavior)
  • SLIs configured, all metrics are no_data (e.g. rate-based SLIs with zero throughput): server returns { status: "no_data", slis: [<entries>] }hasSlis = true → gray dot with "No Data" tooltip is shown

The logic is sound and the implementation is minimal and focused. The change is a 16-line addition to a single frontend component plus supporting UI updates (tag badges, table column).

Confidence Score: 5/5

  • This PR is safe to merge — it is a small, focused UI fix with correct logic that accurately restores intended behavior.
  • The change is a 16-line addition to a single frontend component. The hasSlis condition accurately mirrors the two possible no_data states produced by evaluatePipelineHealth on the server: an empty slis array when no SLIs exist, and a non-empty array when SLIs are defined but traffic is absent. All code paths are accounted for and the fix restores the intended behavior without introducing regressions.
  • No files require special attention

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[PipelineHealthBadge renders] --> B{healthQuery.data\ndefined?}
    B -- No / loading --> C[return null\nhide badge]
    B -- Yes --> D{status}
    D -- null --> C
    D -- no_data --> E{hasSlis?\nslis.length > 0}
    E -- true\nSLIs configured\nbut no traffic --> F[Gray dot\nTooltip: 'No Data — SLIs configured\nbut no traffic yet']
    E -- false\nNo SLIs configured --> C
    D -- healthy --> G[Green dot\nTooltip: 'All SLIs met']
    D -- degraded --> H[Yellow dot\nTooltip: 'One or more SLIs breached']
Loading

Last reviewed commit: 2c7ac34

@TerrifiedBug TerrifiedBug merged commit 67707fe into main Mar 7, 2026
12 checks passed
@TerrifiedBug TerrifiedBug deleted the fix/sli-no-data-badge branch March 7, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant