Skip to content

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

chore: simplify CPU messaging for compute sizes (#48109)

Ali Waseemda7a10be6b47
diff --git a/apps/docs/content/guides/platform/compute-and-disk.mdx b/apps/docs/content/guides/platform/compute-and-disk.mdx
index 05be8fe5fe8..a14a3658921 100644
--- a/apps/docs/content/guides/platform/compute-and-disk.mdx
+++ b/apps/docs/content/guides/platform/compute-and-disk.mdx
@@ -16,20 +16,20 @@ In paid organizations, Nano Compute are billed at the same price as Micro Comput
</Admonition>
-| Compute Size | Hourly Price USD | Monthly Price USD | CPU | Memory | Max DB Size (Recommended)[^2] |
-| ------------ | ------------------------- | ------------------------------------------------------------------------------------------------------- | ----------------------- | ------------ | ----------------------------- |
-| Nano[^3] | <Price price="0" /> | <Price price="0" /> | Shared | Up to 0.5 GB | 500 MB |
-| Micro | <Price price="0.01344" /> | ~<Price price="10" /> | 2-core ARM (shared) | 1 GB | 10 GB |
-| Small | <Price price="0.0206" /> | ~<Price price="15" /> | 2-core ARM (shared) | 2 GB | 50 GB |
-| Medium | <Price price="0.0822" /> | ~<Price price="60" /> | 2-core ARM (shared) | 4 GB | 100 GB |
-| Large | <Price price="0.1517" /> | ~<Price price="110" /> | 2-core ARM (dedicated) | 8 GB | 200 GB |
-| XL | <Price price="0.2877" /> | ~<Price price="210" /> | 4-core ARM (dedicated) | 16 GB | 500 GB |
-| 2XL | <Price price="0.562" /> | ~<Price price="410" /> | 8-core ARM (dedicated) | 32 GB | 1 TB |
-| 4XL | <Price price="1.32" /> | ~<Price price="960" /> | 16-core ARM (dedicated) | 64 GB | 2 TB |
-| 8XL | <Price price="2.562" /> | ~<Price price="1" />,870 | 32-core ARM (dedicated) | 128 GB | 4 TB |
-| 12XL | <Price price="3.836" /> | ~<Price price="2" />,800 | 48-core ARM (dedicated) | 192 GB | 6 TB |
-| 16XL | <Price price="5.12" /> | ~<Price price="3" />,730 | 64-core ARM (dedicated) | 256 GB | 10 TB |
-| >16XL | - | [Contact Us](/dashboard/support/new?category=sales&subject=Enquiry%20about%20larger%20instance%20sizes) | Custom | Custom | Custom |
+| Compute Size | Hourly Price USD | Monthly Price USD | CPU | Memory | Max DB Size (Recommended)[^2] |
+| ------------ | ------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------- | ------------ | ----------------------------- |
+| Nano[^3] | <Price price="0" /> | <Price price="0" /> | Shared | Up to 0.5 GB | 500 MB |
+| Micro | <Price price="0.01344" /> | ~<Price price="10" /> | 2-core (shared) | 1 GB | 10 GB |
+| Small | <Price price="0.0206" /> | ~<Price price="15" /> | 2-core (shared) | 2 GB | 50 GB |
+| Medium | <Price price="0.0822" /> | ~<Price price="60" /> | 2-core (shared) | 4 GB | 100 GB |
+| Large | <Price price="0.1517" /> | ~<Price price="110" /> | 2-core (dedicated) | 8 GB | 200 GB |
+| XL | <Price price="0.2877" /> | ~<Price price="210" /> | 4-core (dedicated) | 16 GB | 500 GB |
+| 2XL | <Price price="0.562" /> | ~<Price price="410" /> | 8-core (dedicated) | 32 GB | 1 TB |
+| 4XL | <Price price="1.32" /> | ~<Price price="960" /> | 16-core (dedicated) | 64 GB | 2 TB |
+| 8XL | <Price price="2.562" /> | ~<Price price="1" />,870 | 32-core (dedicated) | 128 GB | 4 TB |
+| 12XL | <Price price="3.836" /> | ~<Price price="2" />,800 | 48-core (dedicated) | 192 GB | 6 TB |
+| 16XL | <Price price="5.12" /> | ~<Price price="3" />,730 | 64-core (dedicated) | 256 GB | 10 TB |
+| >16XL | - | [Contact Us](/dashboard/support/new?category=sales&subject=Enquiry%20about%20larger%20instance%20sizes) | Custom | Custom | Custom |
[^1]: Database max connections are recommended values and can be [customized via `max_connections`](/docs/guides/database/custom-postgres-config) depending on your use case. Be aware of [these considerations](/docs/guides/troubleshooting/how-to-change-max-database-connections-_BQ8P5) before modifying.
diff --git a/apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsx b/apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsx
index 43058206532..3ca0fc769a1 100644
--- a/apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsx
+++ b/apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsx
@@ -35,7 +35,6 @@ import { useCheckEntitlements } from '@/hooks/misc/useCheckEntitlements'
import { useIsFeatureEnabled } from '@/hooks/misc/useIsFeatureEnabled'
import { useSelectedOrganizationQuery } from '@/hooks/misc/useSelectedOrganization'
import { useSelectedProjectQuery } from '@/hooks/misc/useSelectedProject'
-import { getCloudProviderArchitecture } from '@/lib/cloudprovider-utils'
import { DOCS_URL } from '@/lib/constants'
const INITIALLY_VISIBLE_COUNT = 6
@@ -197,8 +196,6 @@ export function ComputeSizeField({ form, disabled }: ComputeSizeFieldProps) {
) : (
<>
{visibleOptions.map((compute) => {
- const cpuArchitecture = getCloudProviderArchitecture(project?.cloud_provider)
-
const lockedMicroDueToPITR =
compute.identifier === 'ci_micro' && !!subscriptionPitr
const lockedNanoDueToPlan =
@@ -220,7 +217,7 @@ export function ComputeSizeField({ form, disabled }: ComputeSizeFieldProps) {
const cpuLabel = (() => {
const cpuCores = compute.meta?.cpu_cores
if (typeof cpuCores === 'number') {
- return `${cpuCores}-core ${cpuArchitecture} CPU`
+ return `${cpuCores}-core CPU`
}
if (cpuCores) {
return `${cpuCores} CPU`
diff --git a/apps/studio/components/interfaces/ProjectCreation/ComputeSizeSelector.tsx b/apps/studio/components/interfaces/ProjectCreation/ComputeSizeSelector.tsx
index 730ed0ef42d..49ab883d35f 100644
--- a/apps/studio/components/interfaces/ProjectCreation/ComputeSizeSelector.tsx
+++ b/apps/studio/components/interfaces/ProjectCreation/ComputeSizeSelector.tsx
@@ -17,7 +17,6 @@ import { CreateProjectForm } from './ProjectCreation.schema'
import { InlineLink } from '@/components/ui/InlineLink'
import Panel from '@/components/ui/Panel'
import { instanceSizeSpecs } from '@/data/projects/new-project.constants'
-import { getCloudProviderArchitecture } from '@/lib/cloudprovider-utils'
import { DOCS_URL } from '@/lib/constants'
interface ComputeSizeSelectorProps {
@@ -77,11 +76,7 @@ export const ComputeSizeSelector = ({ form }: ComputeSizeSelectorProps) => {
<div className="text-sm">
<span className="text-foreground">
{instanceSizeSpecs[option].ram} RAM /{' '}
- {instanceSizeSpecs[option].cpu}{' '}
- {getCloudProviderArchitecture(
- form.getValues('cloudProvider') as CloudProvider
- )}{' '}
- CPU
+ {instanceSizeSpecs[option].cpu} CPU
</span>
<p
translate="no"
diff --git a/apps/studio/components/ui/ComputeBadgeWrapper.tsx b/apps/studio/components/ui/ComputeBadgeWrapper.tsx
index 671791b97ac..66218618298 100644
--- a/apps/studio/components/ui/ComputeBadgeWrapper.tsx
+++ b/apps/studio/components/ui/ComputeBadgeWrapper.tsx
@@ -9,7 +9,6 @@ import { ProjectDetail } from '@/data/projects/project-detail-query'
import { useOrgSubscriptionQuery } from '@/data/subscriptions/org-subscription-query'
import { useProjectAddonsQuery } from '@/data/subscriptions/project-addons-query'
import { ResourceWarning } from '@/data/usage/resource-warnings-query'
-import { getCloudProviderArchitecture } from '@/lib/cloudprovider-utils'
import { useTrack } from '@/lib/telemetry/track'
export const ChevronsUpAnimated = () => (
@@ -66,9 +65,6 @@ export const ComputeBadgeWrapper = ({
// once open it will fetch the addons
const [open, setOpenState] = useState(false)
- // returns hardcoded values for infra
- const cpuArchitecture = getCloudProviderArchitecture(cloudProvider)
-
// fetches addons
const { data: addons, isPending: isLoadingAddons } = useProjectAddonsQuery(
{ projectRef },
@@ -159,7 +155,7 @@ export const ComputeBadgeWrapper = ({
<>
<Row
label="CPU"
- stat={`${meta.cpu_cores ?? '?'}-core ${cpuArchitecture} ${meta.cpu_dedicated ? '(Dedicated)' : '(Shared)'}`}
+ stat={`${meta.cpu_cores ?? '?'}-core ${meta.cpu_dedicated ? '(Dedicated)' : '(Shared)'}`}
/>
<Row label="Memory" stat={`${meta.memory_gb ?? '-'} GB`} />
</>
diff --git a/apps/studio/lib/cloudprovider-utils.test.ts b/apps/studio/lib/cloudprovider-utils.test.ts
deleted file mode 100644
index faa36c52b77..00000000000
--- a/apps/studio/lib/cloudprovider-utils.test.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { describe, expect, it } from 'vitest'
-
-import { getCloudProviderArchitecture } from './cloudprovider-utils'
-import { PROVIDERS } from './constants'
-
-describe('getCloudProviderArchitecture', () => {
- it('should return the correct architecture', () => {
- const result = getCloudProviderArchitecture(PROVIDERS.AWS.id)
-
- expect(result).toBe('ARM')
- })
-
- it('should return the correct architecture for fly', () => {
- const result = getCloudProviderArchitecture(PROVIDERS.FLY.id)
-
- expect(result).toBe('x86 64-bit')
- })
-
- it('should return an empty string if the cloud provider is not supported', () => {
- const result = getCloudProviderArchitecture('unknown')
-
- expect(result).toBe('')
- })
-})
diff --git a/apps/studio/lib/cloudprovider-utils.ts b/apps/studio/lib/cloudprovider-utils.ts
deleted file mode 100644
index e40898ff32a..00000000000
--- a/apps/studio/lib/cloudprovider-utils.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { PROVIDERS } from './constants'
-
-export function getCloudProviderArchitecture(cloudProvider: string | undefined) {
- switch (cloudProvider) {
- case PROVIDERS.AWS.id:
- return 'ARM'
- case PROVIDERS.FLY.id:
- return 'x86 64-bit'
- default:
- return ''
- }
-}
diff --git a/apps/studio/tests/pages/new/[slug].test.tsx b/apps/studio/tests/pages/new/[slug].test.tsx
index 8e343be4b70..3c77f3cfc76 100644
--- a/apps/studio/tests/pages/new/[slug].test.tsx
+++ b/apps/studio/tests/pages/new/[slug].test.tsx
@@ -481,7 +481,7 @@ describe('project creation wizard', () => {
await generateAndWaitForStrongPassword()
await user.click(getSelectTriggerByLabel('Compute size'))
- await user.click(await screen.findByText('4 GB RAM / 2-core ARM CPU'))
+ await user.click(await screen.findByText('4 GB RAM / 2-core CPU'))
fireEvent.click(screen.getByRole('button', { name: 'Create new project' }))