Enable SQS in code instead of in env vars.

This commit is contained in:
Sam Rose 2024-10-14 17:20:36 +01:00
parent c9d42a0e29
commit 58b4a37fca
No known key found for this signature in database
3 changed files with 7 additions and 3 deletions

View File

@ -27,7 +27,6 @@ services:
BB_ADMIN_USER_PASSWORD: ${BB_ADMIN_USER_PASSWORD}
PLUGINS_DIR: ${PLUGINS_DIR}
OFFLINE_MODE: ${OFFLINE_MODE:-}
TENANT_FEATURE_FLAGS: "*:SQS"
depends_on:
- worker-service
- redis-service
@ -55,7 +54,6 @@ services:
REDIS_URL: redis-service:6379
REDIS_PASSWORD: ${REDIS_PASSWORD}
OFFLINE_MODE: ${OFFLINE_MODE:-}
TENANT_FEATURE_FLAGS: "*:SQS"
depends_on:
- redis-service
- minio-service

View File

@ -269,7 +269,7 @@ export class FlagSet<V extends Flag<any>, T extends { [key: string]: V }> {
export const flags = new FlagSet({
DEFAULT_VALUES: Flag.boolean(env.isDev()),
AUTOMATION_BRANCHING: Flag.boolean(env.isDev()),
SQS: Flag.boolean(env.isDev()),
SQS: Flag.boolean(true),
[FeatureFlag.AI_CUSTOM_CONFIGS]: Flag.boolean(env.isDev()),
[FeatureFlag.ENRICHED_RELATIONSHIPS]: Flag.boolean(env.isDev()),
[FeatureFlag.TABLES_DEFAULT_ADMIN]: Flag.boolean(env.isDev()),

View File

@ -10,6 +10,7 @@ const schema = {
TEST_BOOLEAN: Flag.boolean(false),
TEST_STRING: Flag.string("default value"),
TEST_NUMBER: Flag.number(0),
TEST_BOOLEAN_DEFAULT_TRUE: Flag.boolean(true),
}
const flags = new FlagSet(schema)
@ -123,6 +124,11 @@ describe("feature flags", () => {
},
expected: flags.defaults(),
},
{
it: "should be possible to override a default true flag to false",
environmentFlags: "default:!TEST_BOOLEAN_DEFAULT_TRUE",
expected: { TEST_BOOLEAN_DEFAULT_TRUE: false },
},
])(
"$it",
async ({