Skip to content
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

disable all clickhouse queries for non-full builds (#213) #214

Merged
merged 1 commit into from
Nov 15, 2024
Merged

Conversation

dinmukhamedm
Copy link
Member

@dinmukhamedm dinmukhamedm commented Nov 15, 2024

  • disable all clickhouse queries for non-full builds

Important

Disable ClickHouse queries for non-full builds by checking Feature::FullBuild across multiple modules.

  • Behavior:
    • Disable ClickHouse queries for non-full builds by checking Feature::FullBuild in insert_evaluation_scores(), insert_events(), insert_label(), delete_label(), insert_span(), get_events_metrics(), and get_traces_metrics().
    • Return early with empty results or success when Feature::FullBuild is not enabled.
  • Files Affected:
    • evaluation_scores.rs, events.rs, labels.rs, spans.rs in app-server/src/ch/
    • events.rs, traces.rs in app-server/src/routes/
    • evaluation-scores.ts in frontend/lib/clickhouse/

This description was created by Ellipsis for 7b14a7a. It will automatically update as commits are pushed.

* disable all clickhouse queries for non-full builds

* move feature flags higher up the call stack
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 7b14a7a in 26 seconds

More details
  • Looked at 195 lines of code in 7 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. app-server/src/ch/evaluation_scores.rs:81
  • Draft comment:
    Consider refactoring the repeated feature flag check if !is_feature_enabled(Feature::FullBuild) into a separate function or macro to improve code maintainability and reduce repetition. This applies to other files as well.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR introduces a feature flag check to disable ClickHouse queries for non-full builds. This is a good practice to avoid unnecessary operations in certain environments. However, the feature flag check is repeated in multiple places, which could be refactored for better maintainability.

Workflow ID: wflow_sNkDb5Vm5uo5ndeJ


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@dinmukhamedm dinmukhamedm merged commit f3a0450 into main Nov 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant