Fix/backup graceful degradation - #1496
Conversation
Prohibit using or casting to `any` type in TypeScript code. Use proper types, type guards, `unknown`, or specific interfaces. Assisted-by: Claude Opus 4.6 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
When the DevWorkspaceOperatorConfig (DWOC) is missing, inaccessible,
or has no backup configuration, the dashboard now returns valid
responses instead of 500/403 errors.
Backend:
- getClusterBackupConfig() catches 403/404 and returns
{ enabled: false, schedule: "", registry: "" }
- getWorkspaceBackupStatus() returns { status: "never" } early
when registry is empty, skipping DevWorkspace/Job queries
- Uses isKubeClientError() type guard instead of casting to any
Frontend:
- WorkspacesListContainer gates backup-status calls on non-empty
backupConfig.registry
- Backup Status column only renders when backup is configured
- fetchBackupConfig deduplicates in-flight requests and uses
TTL cache instead of force-refreshing on every tab switch
Fixes: eclipse-che/che#23777
Assisted-by: Claude Opus 4.6
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1496 kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1496", name: che-dashboard}]}}]" |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1496 +/- ##
==========================================
+ Coverage 92.22% 92.25% +0.02%
==========================================
Files 561 562 +1
Lines 54692 55000 +308
Branches 4064 4102 +38
==========================================
+ Hits 50442 50742 +300
- Misses 4203 4211 +8
Partials 47 47 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@akurinnoy Patch coverage is 76.42276% with 29 lines in your changes missing coverage. Can you fix this? |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: akurinnoy, olexii4, svor The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Add tests for backup config fetching on mount, backup status fetching with registry guard, WebSocket backup annotation change detection, and in-flight request deduplication. Assisted-by: Claude Opus 4.6 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
|
New changes are detected. LGTM label has been removed. |
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1496 (linux/amd64, linux/arm64) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1496", name: che-dashboard}]}}]" |

What does this PR do?
This PR fixes 500/403 errors on the Workspaces page when backup is not configured. The backend part catches the DWOC is not found or backup is not configured and returns
{enabled: false}silently.Requires eclipse-che/che-operator#2099 for the dashboard SA to read the DWOC.
Screenshot/screencast of this PR
What issues does this PR fix or reference?
fixes eclipse-che/che#23777
Is it tested? How?
Manually verified on ROSA cluster:
Release Notes
Docs PR