diff --git a/.github/actions/deploy/deploy.mjs b/.github/actions/deploy/deploy.mjs index 8cb74a05f5..dcbb812252 100644 --- a/.github/actions/deploy/deploy.mjs +++ b/.github/actions/deploy/deploy.mjs @@ -68,8 +68,8 @@ const createHelmCommand = ({ isDryRun }) => { ] : []; const webReplicaCount = isProduction ? 3 : isBeta ? 2 : 2; - const graphqlReplicaCount = isProduction ? 3 : isBeta ? 2 : 2; - const syncReplicaCount = isProduction ? 6 : isBeta ? 3 : 2; + const graphqlReplicaCount = isProduction ? 10 : isBeta ? 10 : 2; + const syncReplicaCount = isProduction ? 10 : isBeta ? 10 : 2; const namespace = isProduction ? 'production' : isBeta ? 'beta' : 'dev'; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const host = DEPLOY_HOST || CANARY_DEPLOY_HOST; @@ -101,6 +101,7 @@ const createHelmCommand = ({ isDryRun }) => { `--set-string graphql.app.payment.stripe.apiKey="${STRIPE_API_KEY}"`, `--set-string graphql.app.payment.stripe.webhookKey="${STRIPE_WEBHOOK_KEY}"`, `--set graphql.app.experimental.enableJwstCodec=true`, + `--set graphql.app.features.earlyAccessPreview=false`, `--set sync.replicaCount=${syncReplicaCount}`, `--set-string sync.image.tag="${imageTag}"`, ...serviceAnnotations, diff --git a/.github/helm/affine/charts/graphql/templates/deployment.yaml b/.github/helm/affine/charts/graphql/templates/deployment.yaml index 295a226839..d1c7f27c69 100644 --- a/.github/helm/affine/charts/graphql/templates/deployment.yaml +++ b/.github/helm/affine/charts/graphql/templates/deployment.yaml @@ -75,6 +75,8 @@ spec: value: "{{ .Values.app.objectStorage.r2.enabled }}" - name: ENABLE_CAPTCHA value: "{{ .Values.app.captcha.enabled }}" + - name: FEATURES_EARLY_ACCESS_PREVIEW + value: "{{ .Values.app.features.earlyAccessPreview }}" - name: OAUTH_EMAIL_SENDER valueFrom: secretKeyRef: diff --git a/.github/helm/affine/charts/graphql/values.yaml b/.github/helm/affine/charts/graphql/values.yaml index 4aacb499fd..f0a8ab4948 100644 --- a/.github/helm/affine/charts/graphql/values.yaml +++ b/.github/helm/affine/charts/graphql/values.yaml @@ -58,6 +58,8 @@ app: secretName: 'stripe' apiKey: '' webhookKey: '' + features: + earlyAccessPreview: false serviceAccount: create: true diff --git a/packages/backend/server/src/config/default.ts b/packages/backend/server/src/config/default.ts index d49aad9709..4a6fcab1e2 100644 --- a/packages/backend/server/src/config/default.ts +++ b/packages/backend/server/src/config/default.ts @@ -91,6 +91,10 @@ export const getDefaultAFFiNEConfig: () => AFFiNEConfig = () => { ENABLE_LOCAL_EMAIL: ['auth.localEmail', 'boolean'], STRIPE_API_KEY: 'payment.stripe.keys.APIKey', STRIPE_WEBHOOK_KEY: 'payment.stripe.keys.webhookKey', + FEATURES_EARLY_ACCESS_PREVIEW: [ + 'featureFlags.earlyAccessPreview', + 'boolean', + ], } satisfies AFFiNEConfig['ENV_MAP'], affineEnv: 'dev', get affine() {