Skip to content

Conversation

@Aaron1011
Copy link
Member

We now produce a DelayedError from the clickhouse client code. This error gets suppressed in 'get_all_migration_records', and immediately logged everywhere else

We now produce a `DelayedError` from the clickhouse client code.
This error gets suppressed in 'get_all_migration_records',
and immediately logged everywhere else
Copilot AI review requested due to automatic review settings November 4, 2025 19:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors error handling in ClickHouse queries by replacing the new_with_err_logging method and run_query_synchronous_with_err_logging function with a new DelayedError type that provides more explicit control over when errors are logged.

Key changes:

  • Removed Error::new_with_err_logging method in favor of using DelayedError
  • Renamed run_query_synchronous_with_err_logging to run_query_synchronous_delayed_err across all ClickHouse client implementations
  • Updated the migration manager to use the new delayed error handling approach

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tensorzero-core/src/error/mod.rs Removed the new_with_err_logging method from the Error type
tensorzero-core/src/db/clickhouse/mod.rs Updated method signature to return DelayedError instead of Error
tensorzero-core/src/db/clickhouse/migration_manager/mod.rs Updated to use new delayed error method and call suppress_logging_of_error_message()
tensorzero-core/src/db/clickhouse/clickhouse_client/production_clickhouse_client.rs Replaced error logging parameter with DelayedError return type and explicit .log() calls
tensorzero-core/src/db/clickhouse/clickhouse_client/mod.rs Updated trait definition and mock to use DelayedError
tensorzero-core/src/db/clickhouse/clickhouse_client/fake_clickhouse_client.rs Updated implementation to return DelayedError
tensorzero-core/src/db/clickhouse/clickhouse_client/disabled_clickhouse_client.rs Updated implementation to return DelayedError

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings November 4, 2025 20:22
@Aaron1011 Aaron1011 added the force-add-to-merge-queue A special label that allows a PR to be *added* to the merge queue early label Nov 4, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Aaron1011 Aaron1011 removed the force-add-to-merge-queue A special label that allows a PR to be *added* to the merge queue early label Nov 4, 2025
@Aaron1011 Aaron1011 added this pull request to the merge queue Nov 5, 2025
Any commits made after this event will not be merged.
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.

3 participants