-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: add feature flag to clickhouse migration #6444
base: main
Are you sure you want to change the base?
Conversation
Welcome to the SigNoz community! Thank you for your first pull request and making this project better. 🤗 |
|
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.
❌ Changes requested. Reviewed everything up to aae2372 in 56 seconds
More details
- Looked at
76
lines of code in4
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. ee/query-service/app/server.go:198
- Draft comment:
The function nameIsClickhouseMigrationEnable
should beIsClickhouseMigrationEnabled
for consistency and clarity. - Reason this comment was not posted:
Marked as duplicate.
2. pkg/query-service/constants/constants.go:153
- Draft comment:
The function name should beIsClickhouseMigrationEnabled
for consistency with naming conventions. - Reason this comment was not posted:
Confidence changes required:50%
The functionIsClickhouseMigrationEnable
is correctly placed in the constants file, as it deals with environment variables and configuration constants. However, the function name should beIsClickhouseMigrationEnabled
to maintain consistency with the naming convention used in the rest of the codebase.
3. pkg/query-service/app/server.go:168
- Draft comment:
The feature flag for ClickHouse migrations is correctly implemented, resolving the issue described in the PR. - Reason this comment was not posted:
Confidence changes required:0%
The PR correctly implements the feature flag for ClickHouse migrations, ensuring that migrations only run when the environment variable is set to true. This resolves the issue described in the PR.
Workflow ID: wflow_ZVMZ6TrViQkrXuAR
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
LGTM, you can ask @srikanthccv for a review as well |
Summary
The issue was that ClickHouse migrations were starting automatically when the server launched. To address this, I implemented a flag feature for conditional migrations. An environment variable,
CLICKHOUSE_MIGRATION_ENABLED
, was introduced with a default value offalse
. When set tofalse
, migrations do not run; if changed totrue
, migrations will execute. This allows for an optimized, dynamic approach to managing migrations.Related Issues / PR's
resolves #5678
Screenshots
NA
Affected Areas and Manually Tested Areas
Important
Adds a feature flag to conditionally execute ClickHouse migrations based on an environment variable.
CLICKHOUSE_MIGRATION_ENABLED
environment variable to control ClickHouse migrations.false
(default), migrations are skipped; iftrue
, migrations are executed.IsClickhouseMigrationEnable()
inconstants.go
to check the environment variable.ClickHouseMigrate()
inmigrate.go
to accept aconfig
parameter and conditionally execute migrations.NewServer()
inserver.go
in bothee/query-service/app
andpkg/query-service/app
to use the new feature flag for migrations.This description was created by for aae2372. It will automatically update as commits are pushed.