refactor(api): remove exam-env feature flag (#63909)

This commit is contained in:
Shaun Hamilton
2025-11-24 16:38:06 +02:00
committed by GitHub
parent 5b3a248e72
commit 22a56eddfb
4 changed files with 6 additions and 14 deletions

View File

@@ -40,7 +40,6 @@ import {
FCC_ENABLE_DEV_LOGIN_MODE, FCC_ENABLE_DEV_LOGIN_MODE,
FCC_ENABLE_SWAGGER_UI, FCC_ENABLE_SWAGGER_UI,
FCC_ENABLE_SHADOW_CAPTURE, FCC_ENABLE_SHADOW_CAPTURE,
FCC_ENABLE_EXAM_ENVIRONMENT,
FCC_ENABLE_SENTRY_ROUTES, FCC_ENABLE_SENTRY_ROUTES,
GROWTHBOOK_FASTIFY_API_HOST, GROWTHBOOK_FASTIFY_API_HOST,
GROWTHBOOK_FASTIFY_CLIENT_KEY GROWTHBOOK_FASTIFY_CLIENT_KEY
@@ -223,15 +222,13 @@ export const build = async (
} }
}); });
if (FCC_ENABLE_EXAM_ENVIRONMENT ?? fastify.gb.isOn('exam-environment')) { void fastify.register(function (fastify, _opts, done) {
void fastify.register(function (fastify, _opts, done) { fastify.addHook('onRequest', fastify.authorizeExamEnvironmentToken);
fastify.addHook('onRequest', fastify.authorizeExamEnvironmentToken);
void fastify.register(examEnvironmentValidatedTokenRoutes); void fastify.register(examEnvironmentValidatedTokenRoutes);
done(); done();
}); });
void fastify.register(examEnvironmentOpenRoutes); void fastify.register(examEnvironmentOpenRoutes);
}
if (FCC_ENABLE_SENTRY_ROUTES ?? fastify.gb.isOn('sentry-routes')) { if (FCC_ENABLE_SENTRY_ROUTES ?? fastify.gb.isOn('sentry-routes')) {
void fastify.register(publicRoutes.sentryRoutes); void fastify.register(publicRoutes.sentryRoutes);

View File

@@ -32,7 +32,6 @@ vi.mock('../../utils/env', async importOriginal => {
const actual = await importOriginal<typeof import('../../utils/env.js')>(); const actual = await importOriginal<typeof import('../../utils/env.js')>();
return { return {
...actual, ...actual,
FCC_ENABLE_EXAM_ENVIRONMENT: 'true',
DEPLOYMENT_ENV: 'production' DEPLOYMENT_ENV: 'production'
}; };
}); });

View File

@@ -192,9 +192,6 @@ export const FCC_API_LOG_TRANSPORT = _FCC_API_LOG_TRANSPORT;
export const FCC_ENABLE_SHADOW_CAPTURE = undefinedOrBool( export const FCC_ENABLE_SHADOW_CAPTURE = undefinedOrBool(
process.env.FCC_ENABLE_SHADOW_CAPTURE process.env.FCC_ENABLE_SHADOW_CAPTURE
); );
export const FCC_ENABLE_EXAM_ENVIRONMENT = undefinedOrBool(
process.env.FCC_ENABLE_EXAM_ENVIRONMENT
);
export const FCC_ENABLE_SENTRY_ROUTES = undefinedOrBool( export const FCC_ENABLE_SENTRY_ROUTES = undefinedOrBool(
process.env.FCC_ENABLE_SENTRY_ROUTES process.env.FCC_ENABLE_SENTRY_ROUTES
); );

View File

@@ -61,7 +61,6 @@ SHOW_UPCOMING_CHANGES=false
FCC_ENABLE_SWAGGER_UI=true FCC_ENABLE_SWAGGER_UI=true
FCC_ENABLE_DEV_LOGIN_MODE=true FCC_ENABLE_DEV_LOGIN_MODE=true
FCC_ENABLE_SHADOW_CAPTURE=false FCC_ENABLE_SHADOW_CAPTURE=false
FCC_ENABLE_EXAM_ENVIRONMENT=false
FCC_ENABLE_SENTRY_ROUTES=false FCC_ENABLE_SENTRY_ROUTES=false
FCC_API_LOG_LEVEL=info FCC_API_LOG_LEVEL=info
FCC_API_LOG_TRANSPORT=pretty FCC_API_LOG_TRANSPORT=pretty