From 135a545deac3544ea20e43e1dced9550a0fe9064 Mon Sep 17 00:00:00 2001
From: Charis <26616127+charislam@users.noreply.github.com>
Date: Thu, 27 Feb 2025 15:43:07 -0500
Subject: [PATCH 01/15] docs: update troubleshooting for invalid claim (#33884)
invalid cliam: missing sub seems to (also?) be returned as a 403, not a 401. Discovered this when I was testing something else, so updating the troubleshooting guide for it.
---
.../auth-error-401-invalid-claim-missing-sub--AFwMR.mdx | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/apps/docs/content/troubleshooting/auth-error-401-invalid-claim-missing-sub--AFwMR.mdx b/apps/docs/content/troubleshooting/auth-error-401-invalid-claim-missing-sub--AFwMR.mdx
index 871d852df5c..e7277102b49 100644
--- a/apps/docs/content/troubleshooting/auth-error-401-invalid-claim-missing-sub--AFwMR.mdx
+++ b/apps/docs/content/troubleshooting/auth-error-401-invalid-claim-missing-sub--AFwMR.mdx
@@ -12,6 +12,10 @@ sdk = [ "auth-getuser" ]
[[errors]]
http_status_code = 401
message = "invalid claim: missing sub"
+
+[[errors]]
+http_status_code = 403
+message = "invalid claim: missing sub"
---
The missing sub claim error is returned when `supabase.auth.getUser()` is called with an invalid JWT in the session or when the user attempts to register/sign in but hasn't completed the sign in when the `getUser` call is made.
From 2fa4ccb723a9d9f4d682e4bf70b0e8761324079d Mon Sep 17 00:00:00 2001
From: Charis <26616127+charislam@users.noreply.github.com>
Date: Thu, 27 Feb 2025 15:54:26 -0500
Subject: [PATCH 02/15] chore(docs): add spelling exception (#33818)
Presigned/presigning should be allowed
---
supa-mdx-lint/Rule003Spelling.toml | 1 +
1 file changed, 1 insertion(+)
diff --git a/supa-mdx-lint/Rule003Spelling.toml b/supa-mdx-lint/Rule003Spelling.toml
index 2846ee73b81..671d1f4461b 100644
--- a/supa-mdx-lint/Rule003Spelling.toml
+++ b/supa-mdx-lint/Rule003Spelling.toml
@@ -75,6 +75,7 @@ allow_list = [
"[Pp]laintext",
"[Pp]olyfill(s|ed)?",
"[Pp]oolers?",
+ "[Pp]resign(ed|ing)?",
"[Pp]sycopg",
"[Qq]uickstarts?",
"[Rr]ealtime",
From d30478cc22b5373ef049185f1e0af3b3ac22c9b4 Mon Sep 17 00:00:00 2001
From: Sabu Siyad
- Your current compute can burst up to{' '} - {currentComputeInstanceSpecs.max_disk_io_mbs?.toLocaleString()} Mbps for - 30 minutes a day and reverts to the baseline performance of{' '} + Your current compute can burst above the baseline disk throughput of{' '} {currentComputeInstanceSpecs.baseline_disk_io_mbs?.toLocaleString()}{' '} - Mbps. + Mbps for short periods of time.
)} @@ -306,6 +304,13 @@ const InfrastructureActivity = () => { 'Micro'} +Baseline IO Bandwidth
++ {currentComputeInstanceSpecs.baseline_disk_io_mbs?.toLocaleString()}{' '} + Mbps +
+Maximum IO Bandwidth (burst limit) @@ -314,13 +319,6 @@ const InfrastructureActivity = () => { {currentComputeInstanceSpecs.max_disk_io_mbs?.toLocaleString()} Mbps
Baseline IO Bandwidth
-- {currentComputeInstanceSpecs.baseline_disk_io_mbs?.toLocaleString()}{' '} - Mbps -
-- {connectionPoolingUnavailable - ? 'Connection Pooling is not available for this project' - : 'Connection pooling configuration'} -
-Connection pooling configuration
+ {!allowPgBouncerSelection &&Please start a new project to enable this feature.
- )} -+ The maximum number of concurrent client connections allowed.{' '} + {type === 'Supavisor' ? ( + <> + This value is fixed at {defaultMaxClientConn} based on your + compute size of {computeSize} and cannot be changed. + > + ) : ( + <> + This has a default of {defaultMaxClientConn} based on your compute + size of {computeSize}. + > + )} +
+ {type === 'Supavisor' && ( +
+ Please refer to our{' '}
+
+ Are you sure you wish to switch your pooler type to {formattedTargetPooler} and apply the + provided configurations? +
+{generateBackupName(backup)}
+{label}
+ +{description}
If you wish to use a Direct Connection with these, please purchase{' '}
IPv4 support
diff --git a/apps/studio/components/interfaces/Connect/DatabaseConnectionString.tsx b/apps/studio/components/interfaces/Connect/DatabaseConnectionString.tsx
index deedd3bfcb7..5801e3be505 100644
--- a/apps/studio/components/interfaces/Connect/DatabaseConnectionString.tsx
+++ b/apps/studio/components/interfaces/Connect/DatabaseConnectionString.tsx
@@ -6,11 +6,13 @@ import { getAddons } from 'components/interfaces/Billing/Subscription/Subscripti
import AlertError from 'components/ui/AlertError'
import DatabaseSelector from 'components/ui/DatabaseSelector'
import ShimmeringLoader from 'components/ui/ShimmeringLoader'
-import { usePoolingConfigurationQuery } from 'data/database/pooling-configuration-query'
+import { usePgbouncerConfigQuery } from 'data/database/pgbouncer-config-query'
+import { useSupavisorConfigurationQuery } from 'data/database/supavisor-configuration-query'
import { useReadReplicasQuery } from 'data/read-replicas/replicas-query'
import { useProjectAddonsQuery } from 'data/subscriptions/project-addons-query'
import { useSendEventMutation } from 'data/telemetry/send-event-mutation'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
+import { useFlag } from 'hooks/ui/useFlag'
import { pluckObjectFields } from 'lib/helpers'
import { useDatabaseSelectorStateSnapshot } from 'state/database-selector'
import {
@@ -32,6 +34,8 @@ import {
CONNECTION_PARAMETERS,
DATABASE_CONNECTION_TYPES,
DatabaseConnectionType,
+ IPV4_ADDON_TEXT,
+ PGBOUNCER_ENABLED_BUT_NO_IPV4_ADDON_TEXT,
} from './Connect.constants'
import { CodeBlockFileHeader, ConnectionPanel } from './ConnectionPanel'
import { getConnectionStrings } from './DatabaseSettings.utils'
@@ -54,19 +58,28 @@ export const DatabaseConnectionString = () => {
const { ref: projectRef } = useParams()
const org = useSelectedOrganization()
const state = useDatabaseSelectorStateSnapshot()
+ const allowPgBouncerSelection = useFlag('dualPoolerSupport')
const [selectedTab, setSelectedTab] = useState
- If you are connecting via our connection pooler, you do not need this add-on as our
- pooler resolves to IPv4 addresses. You can check your connection info in your{' '}
-
- project database settings
-
- .
-
+ If you are connecting via the Supavisor connection pooler, you do not need this add-on
+ as our pooler resolves to IPv4 addresses. You can check your connection info in your{' '}
+