Skip to content

Commit c3cad11

Browse files
authored
Fix bad logging/error handling (#170)
1 parent 67cf9db commit c3cad11

File tree

6 files changed

+31
-6
lines changed

6 files changed

+31
-6
lines changed

Diff for: .github/workflows/test_cloud.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on: # yamllint disable-line rule:truthy
55
push:
66
branches:
77
- '*_cloud'
8+
workflow_dispatch:
89

910
jobs:
1011
cloud_tests:

Diff for: .github/workflows/test_matrix.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ jobs:
2929
- '3.11'
3030
clickhouse-version:
3131
- '22.8'
32-
- '23.2'
3332
- '23.3'
34-
- '23.4'
33+
- '23.5'
34+
- '23.6'
3535
- latest
3636

3737
steps:

Diff for: CHANGELOG.md

+24
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
### Release [1.4.4], 2023-07-19
2+
#### Bug Fixes
3+
- Fixed two logging/exception handling issues that would cause exception on startup or when handling some exceptions
4+
from the ClickHouse server. Partially addresses https://github.com/ClickHouse/dbt-clickhouse/issues/169.
5+
- Fixed issue with the `on_cluster` macro that would break the exchange tables step of incremental materializations
6+
with an active cluster. Thanks to [Andrew Davis](https://github.com/Savid) for the PR. Closes
7+
https://github.com/ClickHouse/dbt-clickhouse/issues/167
8+
9+
### Release [1.4.3], 2023-06-27
10+
#### Bug Fix
11+
- Use correct return value for `execute`. This would cause an exception when running hooks. Thanks to
12+
[Sergey Reshetnikov](https://github.com/PrVrSs) for the PR. Closed https://github.com/ClickHouse/dbt-clickhouse/issues/161
13+
14+
#### Improvement
15+
- Added macros for creating distributed tables. See the `distributed_table.sql` include file. Thanks to
16+
[gladkikhtutu](https://github.com/gladkikhtutu) for the contribution.
17+
18+
### Release [1.4.2], 2023-05-14
19+
#### Bug fixes
20+
- Create initial dbt database (if not found) on the defined cluster on first run, instead of just the execution node.
21+
Thanks to [Jens Hoevenaars](https://github.com/codenation-nl) for the PR
22+
- Fix the SYSTEM SYNC REPLICA statement when exchanging tables ON CLUSTER for incremental materializations. Thanks to
23+
[Schum](https://github.com/Schum-io) for PR. Closed https://github.com/ClickHouse/dbt-clickhouse/issues/157.
24+
125
### Release [1.4.1], 2023-05-11
226
#### Improvements
327
- Reduce the number of SQL calls for Modify Comment operations. Thanks to [Konstantin Ilchenko](https://github.com/simpl1g).

Diff for: dbt/adapters/clickhouse/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = '1.4.3'
1+
version = '1.4.4'

Diff for: dbt/adapters/clickhouse/connections.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def exception_handler(self, sql):
3030
logger.debug('Error running SQL: {}', sql)
3131
if isinstance(exp, dbt.exceptions.DbtRuntimeError):
3232
raise
33-
raise dbt.exceptions.DbtRuntimeError from exp
33+
raise dbt.exceptions.DbtRuntimeError('ClickHouse exception: ' + str(exp)) from exp
3434

3535
@classmethod
3636
def open(cls, connection):

Diff for: dbt/adapters/clickhouse/dbclient.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def _check_atomic_exchange(self) -> bool:
180180
for table in swap_tables:
181181
self.command(f'DROP TABLE IF EXISTS {table}')
182182
except DbtDatabaseError:
183-
logger.info('Unexpected server exception dropping table', exc_info=True)
183+
logger.info('Unexpected server exception dropping table')
184184
except DbtDatabaseError:
185-
logger.warning('Failed to run exchange test', exc_info=True)
185+
logger.warning('Failed to run exchange test')
186186
return False

0 commit comments

Comments
 (0)