fix(ui): reflect MaxRetriesReached layer state in dashboard - #947
Open
DjinnS wants to merge 2 commits into
Open
Conversation
The layer state API translation (getLayerState) had no case for the MaxRetriesReached backend state, so it silently collapsed to success/error. The frontend LayerState type didn't know about it either, so no component could render it. Add a dedicated retriesExhausted state end-to-end (API, type, badge, status bar counter, filter dropdown, table icon) so layers stuck after exhausting retries are visible instead of looking healthy or wrongly errored.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #947 +/- ##
==========================================
+ Coverage 47.62% 47.73% +0.11%
==========================================
Files 99 99
Lines 6163 6165 +2
==========================================
+ Hits 2935 2943 +8
+ Misses 3022 3014 -8
- Partials 206 208 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Codecov flagged 0% patch coverage on the new retriesExhausted branch since internal/server/api had no test suite. Add a table-driven test for getLayerState covering disabled, MaxRetriesReached, and default success cases.
Member
|
screenshot @DjinnS ? 😄 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getLayerStateininternal/server/api/layers.go) had no case for the backend'sMaxRetriesReachedstate, so it silently collapsed tosuccess(or wrongly toerror).LayerStatetype didn't include it either, so no component could render it even if the backend sent it.retriesExhaustedstate end-to-end: API translation, TS type, badge (Tag.tsx, red "Max Retries" label), status bar counter/bubble (LayersStatusBar.tsx), filter dropdown option (StatesDropdown.tsx), and table warning icon (Table.tsx).Why
Layers stuck in
MaxRetriesReached(retries exhausted on plan/apply, needs manual intervention) were invisible in the dashboard — looking either healthy or generically errored, with no way to filter for them.Test plan
go vet ./internal/server/...yarn --cwd ui lintyarn --cwd ui format-checkyarn --cwd ui build(tsc + vite)MaxRetriesReachedNo existing test suite for
internal/server/apipackage (no_test.gothere yet), so none added per repo convention of extending existing suites rather than creating new ones from scratch.