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

Merged
merged 2 commits into from
Nov 15, 2024
Merged

Conversation

dinmukhamedm
Copy link
Member

@dinmukhamedm dinmukhamedm commented Nov 15, 2024

Important

Disable ClickHouse queries for non-full builds by adding feature flag checks in multiple files and functions.

  • Behavior:
    • Disable ClickHouse queries if Feature::FullBuild is not enabled in evaluation_scores.rs, events.rs, labels.rs, spans.rs, and evaluation-scores.ts.
    • Affected functions include insert_evaluation_scores, insert_events, insert_label, insert_span, and various metric retrieval functions.
  • Files:
    • evaluation_scores.rs: Added feature flag check in insert_evaluation_scores.
    • events.rs: Added feature flag check in insert_events and metric functions.
    • labels.rs: Added feature flag check in insert_label and delete_label.
    • spans.rs: Added feature flag check in insert_span and metric functions.
    • evaluation-scores.ts: Added feature flag check in getEvaluationTimeProgression.

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

@dinmukhamedm dinmukhamedm changed the base branch from main to dev November 15, 2024 06:15
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! Incremental review on 4cd8b6c in 19 seconds

More details
  • Looked at 239 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. frontend/lib/clickhouse/evaluation-scores.ts:15
  • Draft comment:
    Consider using template literals for the query string to improve readability and maintainability. This will make it easier to modify the query in the future.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The feature flag check is correctly implemented, but the query string construction could be improved for readability and maintainability.

Workflow ID: wflow_qevhimTkc8Res8s9


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

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.

❌ Changes requested. Reviewed everything up to 4cd8b6c in 1 minute and 16 seconds

More details
  • Looked at 239 lines of code in 5 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:
    The feature flag check is correctly implemented here to prevent ClickHouse queries when the 'FullBuild' feature is not enabled. This pattern is consistently applied across the modified files.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The feature flag check is correctly implemented in all files, ensuring that ClickHouse queries are only executed when the 'FullBuild' feature is enabled. This is consistent across all modified files.

Workflow ID: wflow_GdOVBHLM8xSIsg4s


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.

@@ -75,6 +78,10 @@ pub async fn insert_evaluation_scores(
return Ok(());
}

if !is_feature_enabled(Feature::FullBuild) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This feature flag check for 'FullBuild' is a duplicate of existing checks in the codebase. Consider reusing the existing pattern or refactoring to avoid duplication.

  • Feature flag check in insert_events (events.rs)
  • Feature flag check in insert_span (spans.rs)
  • Feature flag check in insert_labels (labels.rs)
  • Feature flag check in utils (utils.rs)
  • Feature flag check in consumer (consumer.rs)

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! Incremental review on dea16b1 in 25 seconds

More details
  • Looked at 165 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. app-server/src/ch/events.rs:130
  • Draft comment:
    The feature flag check for Feature::FullBuild was removed from this function. According to the PR description, it should be added to disable ClickHouse queries for non-full builds. Please ensure the feature flag check is present.
  • Reason this comment was not posted:
    Comment did not seem useful.
2. app-server/src/ch/spans.rs:127
  • Draft comment:
    The feature flag check for Feature::FullBuild was removed from this function. According to the PR description, it should be added to disable ClickHouse queries for non-full builds. Please ensure the feature flag check is present.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_bo2W7xQvoWovIMcr


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

@dinmukhamedm dinmukhamedm merged commit 7b14a7a into dev Nov 15, 2024
1 check passed
@dinmukhamedm dinmukhamedm deleted the fix/skip-ch branch November 15, 2024 06:25
dinmukhamedm added a commit that referenced this pull request Nov 15, 2024
disable all clickhouse queries for non-full builds (#213)
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