diff --git a/.github/workflows/test_cloud.yml b/.github/workflows/test_cloud.yml index cbf0f3e7..d11a2d11 100644 --- a/.github/workflows/test_cloud.yml +++ b/.github/workflows/test_cloud.yml @@ -5,6 +5,7 @@ on: # yamllint disable-line rule:truthy push: branches: - '*_cloud' + workflow_dispatch: jobs: cloud_tests: diff --git a/.github/workflows/test_matrix.yml b/.github/workflows/test_matrix.yml index c0d9bac3..d204477c 100644 --- a/.github/workflows/test_matrix.yml +++ b/.github/workflows/test_matrix.yml @@ -29,9 +29,9 @@ jobs: - '3.11' clickhouse-version: - '22.8' - - '23.2' - '23.3' - - '23.4' + - '23.5' + - '23.6' - latest steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 989ec917..e66caf96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +### Release [1.4.4], 2023-07-19 +#### Bug Fixes +- Fixed two logging/exception handling issues that would cause exception on startup or when handling some exceptions +from the ClickHouse server. Partially addresses https://github.com/ClickHouse/dbt-clickhouse/issues/169. +- Fixed issue with the `on_cluster` macro that would break the exchange tables step of incremental materializations +with an active cluster. Thanks to [Andrew Davis](https://github.com/Savid) for the PR. Closes +https://github.com/ClickHouse/dbt-clickhouse/issues/167 + +### Release [1.4.3], 2023-06-27 +#### Bug Fix +- Use correct return value for `execute`. This would cause an exception when running hooks. Thanks to +[Sergey Reshetnikov](https://github.com/PrVrSs) for the PR. Closed https://github.com/ClickHouse/dbt-clickhouse/issues/161 + +#### Improvement +- Added macros for creating distributed tables. See the `distributed_table.sql` include file. Thanks to +[gladkikhtutu](https://github.com/gladkikhtutu) for the contribution. + +### Release [1.4.2], 2023-05-14 +#### Bug fixes +- Create initial dbt database (if not found) on the defined cluster on first run, instead of just the execution node. +Thanks to [Jens Hoevenaars](https://github.com/codenation-nl) for the PR +- Fix the SYSTEM SYNC REPLICA statement when exchanging tables ON CLUSTER for incremental materializations. Thanks to +[Schum](https://github.com/Schum-io) for PR. Closed https://github.com/ClickHouse/dbt-clickhouse/issues/157. + ### Release [1.4.1], 2023-05-11 #### Improvements - Reduce the number of SQL calls for Modify Comment operations. Thanks to [Konstantin Ilchenko](https://github.com/simpl1g). diff --git a/dbt/adapters/clickhouse/__version__.py b/dbt/adapters/clickhouse/__version__.py index 50e4bb93..f91302bf 100644 --- a/dbt/adapters/clickhouse/__version__.py +++ b/dbt/adapters/clickhouse/__version__.py @@ -1 +1 @@ -version = '1.4.3' +version = '1.4.4' diff --git a/dbt/adapters/clickhouse/connections.py b/dbt/adapters/clickhouse/connections.py index 5c1705f8..85c141be 100644 --- a/dbt/adapters/clickhouse/connections.py +++ b/dbt/adapters/clickhouse/connections.py @@ -30,7 +30,7 @@ def exception_handler(self, sql): logger.debug('Error running SQL: {}', sql) if isinstance(exp, dbt.exceptions.DbtRuntimeError): raise - raise dbt.exceptions.DbtRuntimeError from exp + raise dbt.exceptions.DbtRuntimeError('ClickHouse exception: ' + str(exp)) from exp @classmethod def open(cls, connection): diff --git a/dbt/adapters/clickhouse/dbclient.py b/dbt/adapters/clickhouse/dbclient.py index a779aecc..2051d635 100644 --- a/dbt/adapters/clickhouse/dbclient.py +++ b/dbt/adapters/clickhouse/dbclient.py @@ -180,7 +180,7 @@ def _check_atomic_exchange(self) -> bool: for table in swap_tables: self.command(f'DROP TABLE IF EXISTS {table}') except DbtDatabaseError: - logger.info('Unexpected server exception dropping table', exc_info=True) + logger.info('Unexpected server exception dropping table') except DbtDatabaseError: - logger.warning('Failed to run exchange test', exc_info=True) + logger.warning('Failed to run exchange test') return False