From cb9f47f5e011fbf1f965c421d25143a4383d3eb2 Mon Sep 17 00:00:00 2001 From: Iain Sproat <68657+iainsproat@users.noreply.github.com> Date: Thu, 5 Dec 2024 12:53:23 +0000 Subject: [PATCH] feat(server/feature flags): adds multi-region blob storage ff --- .circleci/config.yml | 1 + packages/server/package.json | 2 +- packages/shared/src/environment/index.ts | 5 +++++ packages/webhook-service/.vscode/launch.json | 3 ++- utils/helm/speckle-server/templates/_helpers.tpl | 3 +++ .../helm/speckle-server/templates/frontend_2/deployment.yml | 2 ++ 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7f3518a129..f94131d7b0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -621,6 +621,7 @@ jobs: MULTI_REGION_CONFIG_PATH: '../../.circleci/multiregion.test-ci.json' FF_WORKSPACES_MODULE_ENABLED: 'true' FF_WORKSPACES_MULTI_REGION_ENABLED: 'true' + FF_WORKSPACES_MULTI_REGION_BLOB_STORAGE_ENABLED: 'true' RUN_TESTS_IN_MULTIREGION_MODE: true test-frontend-2: diff --git a/packages/server/package.json b/packages/server/package.json index 89b6f99aa2..ba21affca9 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -23,7 +23,7 @@ "dev:clean": "yarn build:clean && yarn dev", "dev:server:test": "cross-env DISABLE_NOTIFICATIONS_CONSUMPTION=true NODE_ENV=test LOG_LEVEL=silent LOG_PRETTY=true node ./bin/ts-www", "test": "cross-env NODE_ENV=test LOG_LEVEL=silent LOG_PRETTY=true mocha", - "test:multiregion": "cross-env RUN_TESTS_IN_MULTIREGION_MODE=true FF_WORKSPACES_MODULE_ENABLED=true FF_WORKSPACES_MULTI_REGION_ENABLED=true yarn test", + "test:multiregion": "cross-env RUN_TESTS_IN_MULTIREGION_MODE=true FF_WORKSPACES_MODULE_ENABLED=true FF_WORKSPACES_MULTI_REGION_ENABLED=true FF_WORKSPACES_MULTI_REGION_BLOB_STORAGE_ENABLED=true yarn test", "test:no-ff": "cross-env DISABLE_ALL_FFS=true yarn test", "test:coverage": "cross-env NODE_ENV=test LOG_LEVEL=silent LOG_PRETTY=true nyc --reporter lcov mocha", "test:report": "yarn test:coverage -- --reporter mocha-junit-reporter --reporter-options mochaFile=reports/test-results.xml", diff --git a/packages/shared/src/environment/index.ts b/packages/shared/src/environment/index.ts index 0f3adc4667..3da8ad3a79 100644 --- a/packages/shared/src/environment/index.ts +++ b/packages/shared/src/environment/index.ts @@ -51,6 +51,10 @@ const parseFeatureFlags = () => { schema: z.boolean(), defaults: { production: false, _: false } }, + FF_WORKSPACES_MULTI_REGION_BLOB_STORAGE_ENABLED: { + schema: z.boolean(), + defaults: { production: false, _: false } + }, // Toggles IFC parsing with experimental .Net parser FF_FILEIMPORT_IFC_DOTNET_ENABLED: { schema: z.boolean(), @@ -79,6 +83,7 @@ export function getFeatureFlags(): { FF_GATEKEEPER_MODULE_ENABLED: boolean FF_BILLING_INTEGRATION_ENABLED: boolean FF_WORKSPACES_MULTI_REGION_ENABLED: boolean + FF_WORKSPACES_MULTI_REGION_BLOB_STORAGE_ENABLED: boolean FF_FILEIMPORT_IFC_DOTNET_ENABLED: boolean } { if (!parsedFlags) parsedFlags = parseFeatureFlags() diff --git a/packages/webhook-service/.vscode/launch.json b/packages/webhook-service/.vscode/launch.json index 9f22179fdb..801e351a0a 100644 --- a/packages/webhook-service/.vscode/launch.json +++ b/packages/webhook-service/.vscode/launch.json @@ -9,7 +9,8 @@ "runtimeArgs": ["dev"], "skipFiles": ["/**"], "env": { - "FF_WORKSPACES_MULTI_REGION_ENABLED": "false" + "FF_WORKSPACES_MULTI_REGION_ENABLED": "false", + "FF_WORKSPACES_MULTI_REGION_BLOB_STORAGE_ENABLED": "false" } } ] diff --git a/utils/helm/speckle-server/templates/_helpers.tpl b/utils/helm/speckle-server/templates/_helpers.tpl index 532f331047..3b883fe984 100644 --- a/utils/helm/speckle-server/templates/_helpers.tpl +++ b/utils/helm/speckle-server/templates/_helpers.tpl @@ -589,6 +589,9 @@ Generate the environment variables for Speckle server and Speckle objects deploy - name: FF_WORKSPACES_MULTI_REGION_ENABLED value: {{ .Values.featureFlags.workspacesMultiRegionEnabled | quote }} +- name: FF_WORKSPACES_MULTI_REGION_BLOB_STORAGE_ENABLED + value: {{ .Values.featureFlags.workspacesMultiRegionBlobStorageEnabled | quote }} + {{- if .Values.featureFlags.billingIntegrationEnabled }} - name: STRIPE_API_KEY valueFrom: diff --git a/utils/helm/speckle-server/templates/frontend_2/deployment.yml b/utils/helm/speckle-server/templates/frontend_2/deployment.yml index 00809b8ba7..1b4e3f31ae 100644 --- a/utils/helm/speckle-server/templates/frontend_2/deployment.yml +++ b/utils/helm/speckle-server/templates/frontend_2/deployment.yml @@ -129,6 +129,8 @@ spec: value: {{ .Values.featureFlags.billingIntegrationEnabled | quote }} - name: NUXT_PUBLIC_FF_WORKSPACES_MULTI_REGION_ENABLED value: {{ .Values.featureFlags.workspacesMultiRegionEnabled | quote }} + - name: NUXT_PUBLIC_FF_WORKSPACES_MULTI_REGION_BLOB_STORAGE_ENABLED + value: {{ .Values.featureFlags.workspacesMultiRegionBlobStorageEnabled | quote }} - name: NUXT_PUBLIC_FF_GENDOAI_MODULE_ENABLED value: {{ .Values.featureFlags.gendoAIModuleEnabled | quote }} {{- if .Values.analytics.survicate_workspace_key }}