Skip to content

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

chore: allow triggering of restarts for v3 projects (#49586)

Tarun Khandelwald7ae1c7eaee8
diff --git a/apps/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx b/apps/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx
index db3b604491a..351179f520e 100644
--- a/apps/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx
+++ b/apps/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx
@@ -20,11 +20,7 @@ import { useProjectRestartMutation } from '@/data/projects/project-restart-mutat
import { useProjectRestartServicesMutation } from '@/data/projects/project-restart-services-mutation'
import { useAsyncCheckPermissions } from '@/hooks/misc/useCheckPermissions'
import { useIsFeatureEnabled } from '@/hooks/misc/useIsFeatureEnabled'
-import {
- useIsAwsK8sCloudProvider,
- useIsProjectActive,
- useSelectedProjectQuery,
-} from '@/hooks/misc/useSelectedProject'
+import { useIsProjectActive, useSelectedProjectQuery } from '@/hooks/misc/useSelectedProject'
import { PROJECT_STATUS } from '@/lib/constants'
import { type ResponseError } from '@/types'
@@ -37,7 +33,6 @@ export const RestartServerButton = () => {
const entityLabel = isBranch ? 'branch' : 'project'
const entityLabelCapitalized = entityLabel.charAt(0).toUpperCase() + entityLabel.slice(1)
const canRestart = isProjectActive || project?.status === PROJECT_STATUS.ACTIVE_UNHEALTHY
- const isAwsK8s = useIsAwsK8sCloudProvider()
const { setProjectStatus } = useSetProjectStatus()
const [serviceToRestart, setServiceToRestart] = useState<'project' | 'branch' | 'database'>()
@@ -114,11 +109,7 @@ export const RestartServerButton = () => {
canRestartProject && canRestart ? 'rounded-r-none focus-visible:rounded-r-sm' : ''
)}
disabled={
- project === undefined ||
- !canRestartProject ||
- !canRestart ||
- projectRestartDisabled ||
- isAwsK8s
+ project === undefined || !canRestartProject || !canRestart || projectRestartDisabled
}
onClick={() => setServiceToRestart(entityLabel)}
tooltip={{
@@ -130,9 +121,7 @@ export const RestartServerButton = () => {
? `You need additional permissions to restart this ${entityLabel}`
: !canRestart
? `Unable to restart ${entityLabel} as ${entityLabel} is not active`
- : isAwsK8s
- ? `${entityLabelCapitalized} restart is not supported for AWS (Revamped) projects`
- : undefined,
+ : undefined,
},
}}
>