Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

[FE-4543] fix(studio): remove outdated resize downtime warning (#51344)

Charis28f59449c34b
diff --git a/apps/studio/components/interfaces/DiskManagement/DiskManagementReviewAndSubmitDialog/DiskManagementReviewAndSubmitDialog.hooks.ts b/apps/studio/components/interfaces/DiskManagement/DiskManagementReviewAndSubmitDialog/DiskManagementReviewAndSubmitDialog.hooks.ts
index c38d10ded94..71ca93bd3f8 100644
--- a/apps/studio/components/interfaces/DiskManagement/DiskManagementReviewAndSubmitDialog/DiskManagementReviewAndSubmitDialog.hooks.ts
+++ b/apps/studio/components/interfaces/DiskManagement/DiskManagementReviewAndSubmitDialog/DiskManagementReviewAndSubmitDialog.hooks.ts
@@ -2,7 +2,6 @@ import { useMemo } from 'react'
import { useFormState, useWatch, type UseFormReturn } from 'react-hook-form'
import { DiskStorageSchemaType } from '../DiskManagement.schema'
-import { ComputeInstanceAddonVariantId } from '../DiskManagement.types'
import {
calculateComputeSizePrice,
calculateDiskSizePrice,
@@ -19,13 +18,6 @@ import {
useSelectedProjectQuery,
} from '@/hooks/misc/useSelectedProject'
-const COMPUTE_SIZES_BELOW_LARGE: Array<ComputeInstanceAddonVariantId> = [
- 'ci_nano',
- 'ci_micro',
- 'ci_small',
- 'ci_medium',
-]
-
export function shouldShowComputeBillingBadge({
isDirty,
hasComputeSizeError,
@@ -183,14 +175,6 @@ export function useDiskManagementReviewChanges(
// Show cooldown warning whenever any disk attribute that enforces the 4-hour lock changes
const anyDiskAttributeChange = hasIOPSChanges || hasStorageTypeChanges || hasTotalSizeChanges
- // Show extended downtime warning when resizing to/from a size below large
- const hasExtendedDowntimeRisk =
- hasComputeChanges &&
- (COMPUTE_SIZES_BELOW_LARGE.includes(
- (defaultValues?.computeSize ?? 'ci_nano') as ComputeInstanceAddonVariantId
- ) ||
- COMPUTE_SIZES_BELOW_LARGE.includes(computeSize as ComputeInstanceAddonVariantId))
-
// Throughput is only a user-configurable, separately-billed attribute for GP3. For IO2 it is
// derived from provisioned IOPS (0.256 MiB/s per IOPS) and isn't surfaced as its own value, so
// the form clears it to 0 — rendering a misleading "→ 0 MB/s". Only show the row when the
@@ -243,7 +227,6 @@ export function useDiskManagementReviewChanges(
anyDiskAttributeChange,
showThroughputRow,
hasAnyBreakdownRows,
- hasExtendedDowntimeRisk,
// labels
oldComputeLabel,
newComputeLabel,
diff --git a/apps/studio/components/interfaces/DiskManagement/DiskManagementReviewAndSubmitDialog/DiskManagementReviewAndSubmitDialog.tsx b/apps/studio/components/interfaces/DiskManagement/DiskManagementReviewAndSubmitDialog/DiskManagementReviewAndSubmitDialog.tsx
index 3e140536b50..748f2349a23 100644
--- a/apps/studio/components/interfaces/DiskManagement/DiskManagementReviewAndSubmitDialog/DiskManagementReviewAndSubmitDialog.tsx
+++ b/apps/studio/components/interfaces/DiskManagement/DiskManagementReviewAndSubmitDialog/DiskManagementReviewAndSubmitDialog.tsx
@@ -1,5 +1,5 @@
import { PermissionAction } from '@supabase/shared-types/out/constants'
-import { AlertTriangle, ArrowRight } from 'lucide-react'
+import { ArrowRight } from 'lucide-react'
import { UseFormReturn } from 'react-hook-form'
import {
Alert,
@@ -84,7 +84,6 @@ export const DiskManagementReviewAndSubmitDialog = ({
anyDiskAttributeChange,
showThroughputRow,
hasAnyBreakdownRows,
- hasExtendedDowntimeRisk,
oldComputeLabel,
newComputeLabel,
} = useDiskManagementReviewChanges(form, numReplicas)
@@ -268,20 +267,6 @@ export const DiskManagementReviewAndSubmitDialog = ({
</div>
)}
- {hasExtendedDowntimeRisk && (
- <>
- <DialogSectionSeparator />
- <DialogSection>
- <Alert variant="warning">
- <AlertTriangle />
- <AlertTitle>
- Resizes may require more downtime than normal on this project.
- </AlertTitle>
- </Alert>
- </DialogSection>
- </>
- )}
-
<DialogFooter className="px-5 py-4">
<Button block size="large" onClick={() => setIsDialogOpen(false)}>
Cancel