diff --git a/.github/workflows/docs-lint-v2-scheduled.yml b/.github/workflows/docs-lint-v2-scheduled.yml index a6cfd2506a3..f476dfcf920 100644 --- a/.github/workflows/docs-lint-v2-scheduled.yml +++ b/.github/workflows/docs-lint-v2-scheduled.yml @@ -45,18 +45,15 @@ jobs: git config --global user.email 'github-docs-bot@supabase.com' BRANCH_NAME="bot/docs-lint-fixes" EXISTING_BRANCH=$(git ls-remote --heads origin $BRANCH_NAME) - if [ -n "$EXISTING_BRANCH" ]; then - git checkout $BRANCH_NAME - else - git checkout -b $BRANCH_NAME + if [[ -n "$EXISTING_BRANCH" ]]; then + git push origin --delete $BRANCH_NAME fi + git checkout -b $BRANCH_NAME supa-mdx-lint apps/docs/content --fix || FIX_FAILED=1 git add . git commit -m '[bot] fix lint errors' || true git push origin $BRANCH_NAME - if [ -z "$EXISTING_BRANCH" ]; then - gh pr create --title '[bot] fix lint errors' --body 'This PR fixes lint errors in the documentation.' --head $BRANCH_NAME - fi + gh pr create --title '[bot] fix lint errors' --body 'This PR fixes lint errors in the documentation.' --head $BRANCH_NAME if [ "${FIX_FAILED:-0}" -eq 1 ]; then echo "Fix did not correct all errors." exit 1 diff --git a/apps/docs/content/guides/auth/managing-user-data.mdx b/apps/docs/content/guides/auth/managing-user-data.mdx index 47022bf98f9..150c6069ab2 100644 --- a/apps/docs/content/guides/auth/managing-user-data.mdx +++ b/apps/docs/content/guides/auth/managing-user-data.mdx @@ -182,7 +182,7 @@ val metadata = user?.userMetadata ## Deleting users -You may delete users directly or via the management console at Authentication > Users. Note that deleting a user from the `auth.users` table does not automatically sign out a user. As Supabase makes use of JSON Web Tokens (JWT), a user's JWT will remain "valid" until it has expired. Should you wish to immediately revoke access for a user, do consider making use of a Row Level Security policy as described below. +You may delete users directly or via the management console at Authentication > Users. Note that deleting a user from the `auth.users` table does not automatically sign out a user. As Supabase makes use of JSON Web Tokens (JWT), a user's JWT will remain "valid" until it has expired. diff --git a/apps/docs/content/guides/database/replication/setting-up-replication.mdx b/apps/docs/content/guides/database/replication/setting-up-replication.mdx index 170b54b64d4..36d4d528705 100644 --- a/apps/docs/content/guides/database/replication/setting-up-replication.mdx +++ b/apps/docs/content/guides/database/replication/setting-up-replication.mdx @@ -10,9 +10,9 @@ sidebar_label: 'Setting up replication and CDC' To set up replication, the following is recommended: - Instance size of XL or greater -- [IPv4 add-on](/guides/platform/ipv4-address) enabled +- [IPv4 add-on](/docs/guides/platform/ipv4-address) enabled -To create a replication slot, you will need to use the `postgres` user and follow the instructions in our [guide](/guides/database/postgres/setup-replication-external). +To create a replication slot, you will need to use the `postgres` user and follow the instructions in our [guide](/docs/guides/database/postgres/setup-replication-external). If you are running Postgres 17 or higher, you can create a new user and grant them replication diff --git a/apps/docs/content/guides/functions/examples/auth-send-email-hook-react-email-resend.mdx b/apps/docs/content/guides/functions/examples/auth-send-email-hook-react-email-resend.mdx index 4ca2f65f668..aa095e5c618 100644 --- a/apps/docs/content/guides/functions/examples/auth-send-email-hook-react-email-resend.mdx +++ b/apps/docs/content/guides/functions/examples/auth-send-email-hook-react-email-resend.mdx @@ -294,7 +294,7 @@ Set the secrets from the `.env` file: supabase secrets set --env-file supabase/functions/.env ``` -Now your Supabase Edge Function will be triggered anytime an Auth Email needs to be send to the user! +Now your Supabase Edge Function will be triggered anytime an Auth Email needs to be sent to the user! ## More resources diff --git a/apps/docs/spec/cli_v1_commands.yaml b/apps/docs/spec/cli_v1_commands.yaml index 624088d0d46..2050f77a58a 100644 --- a/apps/docs/spec/cli_v1_commands.yaml +++ b/apps/docs/spec/cli_v1_commands.yaml @@ -1678,6 +1678,8 @@ commands: > If you do not want to be prompted for the database password, such as in a CI environment, you may specify it explicitly via the `SUPABASE_DB_PASSWORD` environment variable. Some commands like `db dump`, `db push`, and `db pull` require your project to be linked first. + + The selected project ref is stored in `supabase/.temp/project_ref`. examples: - id: basic-usage name: Basic usage diff --git a/apps/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyRow.tsx b/apps/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyRow.tsx index 473adfc4bed..5c0b93ebab7 100644 --- a/apps/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyRow.tsx +++ b/apps/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyRow.tsx @@ -78,10 +78,10 @@ const PolicyRow = ({
Applied to:{' '} {policy.roles.slice(0, 3).map((role, i) => ( - - {role} - {policy.roles.length > 1 ? '' : ' '} - + + {role} + {i < Math.min(policy.roles.length, 3) - 1 && ', '} + ))} {policy.roles.length > 1 ? 'roles' : 'role'}
diff --git a/apps/studio/components/interfaces/Home/ServiceStatus.tsx b/apps/studio/components/interfaces/Home/ServiceStatus.tsx index 2c3381b054b..41aae7700a8 100644 --- a/apps/studio/components/interfaces/Home/ServiceStatus.tsx +++ b/apps/studio/components/interfaces/Home/ServiceStatus.tsx @@ -25,20 +25,20 @@ const SERVICE_STATUS_THRESHOLD = 5 // minutes const StatusMessage = ({ status, isLoading, - isSuccess, + isHealthy, isProjectNew, }: { isLoading: boolean - isSuccess: boolean + isHealthy: boolean isProjectNew: boolean status?: ProjectServiceStatus }) => { + if (isHealthy) return 'Healthy' if (isLoading) return 'Checking status' if (status === 'UNHEALTHY') return 'Unhealthy' if (status === 'COMING_UP') return 'Coming up...' if (status === 'ACTIVE_HEALTHY') return 'Healthy' if (isProjectNew) return 'Coming up...' - if (isSuccess) return 'Healthy' return 'Unable to connect' } @@ -52,21 +52,21 @@ const CheckIcon = () => const StatusIcon = ({ isLoading, - isSuccess, + isHealthy, isProjectNew, projectStatus, }: { isLoading: boolean - isSuccess: boolean + isHealthy: boolean isProjectNew: boolean projectStatus?: ProjectServiceStatus }) => { + if (isHealthy) return if (isLoading) return if (projectStatus === 'UNHEALTHY') return if (projectStatus === 'COMING_UP') return if (projectStatus === 'ACTIVE_HEALTHY') return if (isProjectNew) return - if (isSuccess) return return } @@ -124,17 +124,17 @@ export const ServiceStatus = () => { error?: string docsUrl?: string isLoading: boolean - isSuccess?: boolean + isHealthy: boolean + status: ProjectServiceStatus logsUrl: string - status?: ProjectServiceStatus }[] = [ { name: 'Database', error: undefined, docsUrl: undefined, isLoading: isLoading, - isSuccess: dbStatus?.healthy, - status: dbStatus?.status, + isHealthy: !!dbStatus?.healthy, + status: dbStatus?.status ?? 'UNHEALTHY', logsUrl: '/logs/postgres-logs', }, { @@ -142,8 +142,8 @@ export const ServiceStatus = () => { error: restStatus?.error, docsUrl: undefined, isLoading, - isSuccess: restStatus?.healthy, - status: restStatus?.status, + isHealthy: !!restStatus?.healthy, + status: restStatus?.status ?? 'UNHEALTHY', logsUrl: '/logs/postgrest-logs', }, ...(authEnabled @@ -153,8 +153,8 @@ export const ServiceStatus = () => { error: authStatus?.error, docsUrl: undefined, isLoading, - isSuccess: authStatus?.healthy, - status: authStatus?.status, + isHealthy: !!authStatus?.healthy, + status: authStatus?.status ?? 'UNHEALTHY', logsUrl: '/logs/auth-logs', }, ] @@ -166,8 +166,8 @@ export const ServiceStatus = () => { error: realtimeStatus?.error, docsUrl: undefined, isLoading, - isSuccess: realtimeStatus?.healthy, - status: realtimeStatus?.status, + isHealthy: !!realtimeStatus?.healthy, + status: realtimeStatus?.status ?? 'UNHEALTHY', logsUrl: '/logs/realtime-logs', }, ] @@ -179,8 +179,8 @@ export const ServiceStatus = () => { error: storageStatus?.error, docsUrl: undefined, isLoading, - isSuccess: storageStatus?.healthy, - status: storageStatus?.status, + isHealthy: !!storageStatus?.healthy, + status: storageStatus?.status ?? 'UNHEALTHY', logsUrl: '/logs/storage-logs', }, ] @@ -192,7 +192,12 @@ export const ServiceStatus = () => { error: undefined, docsUrl: 'https://supabase.com/docs/guides/functions/troubleshooting', isLoading, - isSuccess: edgeFunctionsStatus?.healthy, + isHealthy: !!edgeFunctionsStatus?.healthy, + status: edgeFunctionsStatus?.healthy + ? 'ACTIVE_HEALTHY' + : isLoading + ? 'COMING_UP' + : ('UNHEALTHY' as ProjectServiceStatus), logsUrl: '/logs/edge-functions-logs', }, ] @@ -200,7 +205,7 @@ export const ServiceStatus = () => { ] const isLoadingChecks = services.some((service) => service.isLoading) - const allServicesOperational = services.every((service) => service.isSuccess) + const allServicesOperational = services.every((service) => service.isHealthy) // If the project is less than 5 minutes old, and status is not operational, then it's likely the service is still starting up const isProjectNew = @@ -234,7 +239,7 @@ export const ServiceStatus = () => { -