@skyhook-io/radar-app 1.22.0 → 1.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/App.tsx +98 -29
- package/src/RadarApp.tsx +5 -0
- package/src/api/client.ts +18 -1
- package/src/api/cnpg-history.ts +3 -3
- package/src/api/cnpg-storage.ts +3 -3
- package/src/api/diagnose.test.ts +34 -0
- package/src/api/diagnose.ts +17 -4
- package/src/api/radarFeatures.test.ts +13 -1
- package/src/api/radarFeatures.ts +2 -0
- package/src/api/resourceActions.test.ts +829 -0
- package/src/api/resourceActions.ts +584 -0
- package/src/api/resourceActions.ui.test.tsx +1882 -0
- package/src/api/reviewedActionMutation.ts +56 -28
- package/src/api/substrateHealth.ts +2 -3
- package/src/api/traffic.ts +13 -5
- package/src/api/workloadMetrics.test.ts +11 -2
- package/src/api/workloadMetrics.ts +2 -2
- package/src/api/workloadSource.test.tsx +857 -0
- package/src/api/workloadSource.ts +292 -0
- package/src/components/APIUnreachableBanner.test.tsx +19 -0
- package/src/components/APIUnreachableBanner.tsx +20 -0
- package/src/components/ConnectionErrorView.test.tsx +63 -2
- package/src/components/ConnectionErrorView.tsx +88 -68
- package/src/components/diagnose/ActivityTurn.tsx +6 -4
- package/src/components/diagnose/AnalysisStory.test.tsx +12 -0
- package/src/components/diagnose/AssessmentCard.tsx +1 -2
- package/src/components/diagnose/ContinueInAgentButton.test.tsx +7 -0
- package/src/components/diagnose/DiagnoseContext.question.test.tsx +34 -1
- package/src/components/diagnose/DiagnoseContext.tsx +28 -3
- package/src/components/diagnose/DiagnoseSurface.tsx +5 -4
- package/src/components/diagnose/Home.test.tsx +6 -0
- package/src/components/diagnose/Home.tsx +13 -3
- package/src/components/diagnose/InvestigationEvidencePane.story.test.tsx +1 -1
- package/src/components/diagnose/InvestigationEvidencePane.test.tsx +61 -0
- package/src/components/diagnose/InvestigationEvidencePane.tsx +19 -2
- package/src/components/diagnose/InvestigationFindingsFooter.test.tsx +413 -0
- package/src/components/diagnose/InvestigationView.followupFailure.test.tsx +122 -0
- package/src/components/diagnose/InvestigationView.tsx +130 -25
- package/src/components/diagnose/LocalDiagnoseAction.history.test.tsx +1 -1
- package/src/components/diagnose/LocalDiagnoseAction.tsx +2 -2
- package/src/components/diagnose/QuestionComposer.test.tsx +16 -2
- package/src/components/diagnose/QuestionComposer.tsx +13 -8
- package/src/components/diagnose/diagnoseEvidenceTypes.ts +47 -8
- package/src/components/diagnose/investigationEvidence/adapters/diagnose.test.ts +153 -0
- package/src/components/diagnose/investigationEvidence/adapters/diagnose.ts +9 -13
- package/src/components/diagnose/investigationEvidence/adapters/issues.ts +21 -5
- package/src/components/diagnose/investigationEvidence/bodies/network.tsx +63 -26
- package/src/components/diagnose/investigationEvidence/identity.test.ts +1 -1
- package/src/components/diagnose/investigationEvidence/projection.test.ts +1 -1
- package/src/components/diagnose/investigationState.ts +9 -0
- package/src/components/diagnose/launch.ts +1 -1
- package/src/components/diagnose/parts.test.tsx +11 -3
- package/src/components/diagnose/toolCallLabel.ts +3 -0
- package/src/components/dock/PodDebugSession.test.tsx +66 -0
- package/src/components/dock/PodDebugSession.tsx +3 -1
- package/src/components/dock/TerminalTab.test.tsx +43 -3
- package/src/components/dock/TerminalTab.tsx +10 -1
- package/src/components/helm/HelmReleaseDrawer.tsx +1 -1
- package/src/components/helm/InstallWizard.tsx +1 -1
- package/src/components/home/ActivitySummary.tsx +3 -8
- package/src/components/home/ClusterHealthCard.tsx +91 -17
- package/src/components/home/ClusterHealthCard.utilization.test.tsx +187 -0
- package/src/components/home/HomeView.tsx +6 -26
- package/src/components/home/TopologyPreview.test.tsx +31 -30
- package/src/components/home/TopologyPreview.tsx +19 -28
- package/src/components/home/mcpToolCatalog.ts +4 -4
- package/src/components/resources/PodEvictAction.test.tsx +951 -0
- package/src/components/resources/PodEvictAction.tsx +167 -0
- package/src/components/resources/ResourcesView.tsx +3 -0
- package/src/components/resources/renderers/JobAdmissionRenderers.tsx +5 -4
- package/src/components/resources/renderers/RolloutRenderer.tsx +4 -1
- package/src/components/resources/renderers/WorkloadRenderer.tsx +7 -1
- package/src/components/settings/LocalConnectionSettings.tsx +4 -4
- package/src/components/settings/SettingsDialog.tsx +23 -18
- package/src/components/settings/integrationQueries.test.ts +98 -0
- package/src/components/settings/integrationQueries.ts +36 -0
- package/src/components/traffic/TrafficView.reconnect.test.tsx +229 -0
- package/src/components/traffic/TrafficView.tsx +91 -35
- package/src/components/ui/Markdown.test.tsx +37 -0
- package/src/components/ui/Markdown.tsx +15 -2
- package/src/components/useContextSwitchFlow.test.tsx +27 -2
- package/src/components/useContextSwitchFlow.tsx +20 -22
- package/src/components/workload/WorkloadView.tsx +83 -4
- package/src/components/workload/WorkloadView.workloadSource.test.tsx +121 -0
- package/src/context/ConnectionContext.tsx +24 -5
- package/src/context/ConnectionProvider.connectionId.test.tsx +14 -0
- package/src/context/ConnectionProvider.handover.test.tsx +94 -0
- package/src/context/DiagnoseCustomization.tsx +20 -2
- package/src/hooks/useEventSource.test.tsx +275 -4
- package/src/hooks/useEventSource.ts +278 -51
- package/src/index.ts +1 -0
- package/src/utils/navigation.test.ts +1 -6
- package/src/utils/navigation.ts +9 -44
- package/src/utils/network-policy-navigation.test.ts +21 -36
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it, vi } from 'vitest'
|
|
2
2
|
import { getRadarUpgradeRequirement } from '@skyhook-io/k8s-ui'
|
|
3
|
-
import { ApiError } from './client'
|
|
3
|
+
import { ApiError, shouldRetryReplacedMember } from './client'
|
|
4
4
|
import {
|
|
5
5
|
RADAR_FEATURES,
|
|
6
6
|
RadarFeatureUnsupportedError,
|
|
@@ -187,6 +187,18 @@ describe('shouldRetryRadarQuery', () => {
|
|
|
187
187
|
})
|
|
188
188
|
})
|
|
189
189
|
|
|
190
|
+
describe('shouldRetryReplacedMember', () => {
|
|
191
|
+
it('retries only HTTP 409 and 503, once each', () => {
|
|
192
|
+
for (const status of [409, 503]) {
|
|
193
|
+
expect(shouldRetryReplacedMember(0, new ApiError('x', status))).toBe(true)
|
|
194
|
+
expect(shouldRetryReplacedMember(1, new ApiError('x', status))).toBe(false)
|
|
195
|
+
}
|
|
196
|
+
for (const error of [new ApiError('x', 404), new ApiError('x', 500), new TypeError('Failed to fetch')]) {
|
|
197
|
+
expect(shouldRetryReplacedMember(0, error)).toBe(false)
|
|
198
|
+
}
|
|
199
|
+
})
|
|
200
|
+
})
|
|
201
|
+
|
|
190
202
|
describe('affirmative mutation support', () => {
|
|
191
203
|
it.each(['argoRollback', 'argoAutoSyncEnable', 'workloadRestartPreconditions'] as const)('%s distinguishes checking, failed and known answers', feature => {
|
|
192
204
|
expect(radarControlBlockedReason(feature, 'unknown', false)).toBe("Checking this cluster's Radar…")
|
package/src/api/radarFeatures.ts
CHANGED
|
@@ -55,6 +55,7 @@ export const RADAR_FEATURES = {
|
|
|
55
55
|
drainPlan: { label: 'Drain plans', minimumVersion: 'v1.14.0' },
|
|
56
56
|
applications: { label: 'Applications', minimumVersion: 'v1.7.7' },
|
|
57
57
|
workloadHistory: { label: 'Workload history', flag: 'workloadHistory', flagShippedWithEndpoint: true },
|
|
58
|
+
workloadSource: { label: 'Workload source', flag: 'workloadSource', flagShippedWithEndpoint: true },
|
|
58
59
|
deploymentPause: { label: 'Deployment rollout pause and resume', flag: 'deploymentPause', flagShippedWithEndpoint: true },
|
|
59
60
|
substrateHealthMetrics: { label: 'Agent Substrate charts', flag: 'substrateHealthMetrics', flagShippedWithEndpoint: true, requireAffirmativeSupport: true },
|
|
60
61
|
cnpgWorkspace: { label: 'CloudNativePG views', flag: 'cnpgWorkspace', flagShippedWithEndpoint: true },
|
|
@@ -74,6 +75,7 @@ export const RADAR_FEATURES = {
|
|
|
74
75
|
veleroRuns: { label: 'Velero backup and restore lists', flag: 'veleroRuns', flagShippedWithEndpoint: true },
|
|
75
76
|
veleroDeleteBackup: { label: 'Delete a Velero backup', flag: 'veleroDeleteBackup', flagShippedWithEndpoint: true },
|
|
76
77
|
workloadRestartPreconditions: { label: 'Reviewed workload restarts', flag: 'workloadRestartPreconditions', flagShippedWithEndpoint: true, requireAffirmativeSupport: true },
|
|
78
|
+
resourceActions: { label: 'Resource action preview and execute', flag: 'resourceActions', flagShippedWithEndpoint: true, requireAffirmativeSupport: true },
|
|
77
79
|
resourceDeletePreconditions: { label: 'Delete only the object you reviewed', flag: 'resourceDeletePreconditions', flagShippedWithEndpoint: true },
|
|
78
80
|
gitopsWriteEvidence: { label: 'GitOps revert warnings', flag: 'gitopsWriteEvidence', flagShippedWithEndpoint: true },
|
|
79
81
|
serviceEndpointSlices: { label: 'Service EndpointSlice inventories', flag: 'serviceEndpointSlices', flagShippedWithEndpoint: true },
|