-
Notifications
You must be signed in to change notification settings - Fork 3.1k
refactor(config): rename ANALYTICS_ENABLED
to IS_ANALYTICS_ENABLED
#11652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR introduces changes to standardize environment variable naming while also making significant security and database configuration changes.
- CRITICAL: Disabling TLS certificate validation in
packages/twenty-front/codegen.cjs
andcodegen-metadata.cjs
withNODE_TLS_REJECT_UNAUTHORIZED = '0'
creates serious security vulnerabilities - Added
allow_experimental_json_type
andindex_granularity=8192
settings to ClickHouse tables inpackages/twenty-server/src/database/clickhouse/migrations/001-create-events-table.sql
and002-create-pageview-table.sql
- Renamed
ANALYTICS_ENABLED
toIS_ANALYTICS_ENABLED
across multiple files for consistent boolean naming convention - Potential issue in
analytics.service.ts
whereAnalyticsException
is returned instead of thrown inpreventAnalyticsIfDisabled
method
18 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile
packages/twenty-server/src/database/clickhouse/migrations/002-create-pageview-table.sql
Show resolved
Hide resolved
packages/twenty-server/src/database/clickhouse/migrations/run-migrations.ts
Outdated
Show resolved
Hide resolved
Updated all occurrences of `ANALYTICS_ENABLED` to `IS_ANALYTICS_ENABLED` for better naming consistency. Adjusted environment variables, code references, and tests accordingly to reflect the change. line setting NODE_TLS_REJECT_UNAUTHORIZED to '0'. This improves security by no longer bypassing TLS certificate validation.
4db6829
to
8c76260
Compare
Added a new script command to run ClickHouse migrations in production. This ensures proper database setup for ClickHouse during deployment.
Removed the command to enable the experimental JSON type as it is no longer required. This simplifies the migration script and aligns with updated database configuration practices.
Cleaned up unnecessary ESLint disable comments and outdated TODO notes across various components. This improves code readability and reduces clutter without affecting functionality.
@@ -29,7 +29,7 @@ export const GET_CLIENT_CONFIG = gql` | |||
defaultSubdomain | |||
frontDomain | |||
debugMode | |||
analyticsEnabled | |||
isAnalyticsEnabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe let's rename the env variable only since this will create a breaking change during the next deploy :(
Updated all occurrences of
ANALYTICS_ENABLED
toIS_ANALYTICS_ENABLED
for better naming consistency. Adjusted environment variables, code references, and tests accordingly to reflect the change.