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

Fix auth in clickhouse server running in test suite #4085

Closed
wants to merge 4 commits into from

Conversation

antonpirker
Copy link
Member


Thank you for contributing to sentry-python! Please add tests to validate your changes, and lint your code using tox -e linters.

Running the test suite on your PR might require maintainer approval. The AWS Lambda tests additionally require a maintainer to add a special label, and they will fail until this label is added.

Copy link

codecov bot commented Feb 21, 2025

❌ 27 Tests Failed:

Tests completed Failed Passed Skipped
22951 27 22924 5844
View the top 3 failed test(s) by shortest run time
tests.integrations.clickhouse_driver.test_clickhouse_driver test_clickhouse_client_breadcrumbs_with_pii
Stack Traces | 0.055s run time
.../integrations/clickhouse_driver/test_clickhouse_driver.py:130: in test_clickhouse_client_breadcrumbs_with_pii
    client.execute("DROP TABLE IF EXISTS test")
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7........./site-packages/clickhouse_driver/client.py:370: in execute
    with self.disconnect_on_error(query, settings):
.../hostedtoolcache/Python/3.7.17.../x64/lib/python3.7/contextlib.py:112: in __enter__
    return next(self.gen)
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7........./site-packages/clickhouse_driver/client.py:313: in disconnect_on_error
    self.establish_connection(settings)
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7........./site-packages/clickhouse_driver/client.py:300: in establish_connection
    self.connection.force_connect()
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7............/site-packages/clickhouse_driver/connection.py:258: in force_connect
    self.connect()
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7............/site-packages/clickhouse_driver/connection.py:399: in connect
    return self._init_connection(host, port)
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7............/site-packages/clickhouse_driver/connection.py:343: in _init_connection
    self.receive_hello()
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7............/site-packages/clickhouse_driver/connection.py:528: in receive_hello
    raise self.receive_exception()
E   clickhouse_driver.errors.ServerException: Code: 194.
E   DB::Exception: default: Authentication failed: password is incorrect, or there is no user with such name.
E   
E   If you use ClickHouse Cloud, the password can be reset at https://clickhouse.cloud/
E   on the settings page for the corresponding service.
E   
E   If you have installed ClickHouse and forgot password you can reset it in the configuration file.
E   The password for default user is typically located at .../etc/clickhouse-server/users.d/default-password.xml
E   and deleting this file will reset the password.
E   See also .../etc/clickhouse-server/users.xml on the server where ClickHouse is installed.
E   
E   . Stack trace:
E   
E   0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000dd109bb
E   1. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x0000000008bae62c
E   2. DB::AccessControl::authenticate(DB::Credentials const&, Poco::Net::IPAddress const&, String const&) const @ 0x00000000115b2f81
E   3. DB::Session::authenticate(DB::Credentials const&, Poco::Net::SocketAddress const&, std::vector<String, std::allocator<String>> const&) @ 0x0000000012915305
E   4. DB::Session::authenticate(String const&, String const&, Poco::Net::SocketAddress const&, std::vector<String, std::allocator<String>> const&) @ 0x0000000012914952
E   5. DB::TCPHandler::receiveHello() @ 0x0000000013e9107d
E   6. DB::TCPHandler::runImpl() @ 0x0000000013e8451e
E   7. DB::TCPHandler::run() @ 0x0000000013ea4839
E   8. Poco::Net::TCPServerConnection::start() @ 0x0000000017461687
E   9. Poco::Net::TCPServerDispatcher::run() @ 0x0000000017461ad9
E   10. Poco::PooledThread::run() @ 0x000000001742e05b
E   11. Poco::ThreadImpl::runnableEntry(void*) @ 0x000000001742c53d
E   12. ? @ 0x00007f34809dcac3
E   13. ? @ 0x00007f3480a6da04
tests.integrations.clickhouse_driver.test_clickhouse_driver test_clickhouse_dbapi_breadcrumbs
Stack Traces | 0.055s run time
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7.../clickhouse_driver/dbapi/cursor.py:113: in execute
    **execute_kwargs
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7........./site-packages/clickhouse_driver/client.py:370: in execute
    with self.disconnect_on_error(query, settings):
.../hostedtoolcache/Python/3.7.17.../x64/lib/python3.7/contextlib.py:112: in __enter__
    return next(self.gen)
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7........./site-packages/clickhouse_driver/client.py:313: in disconnect_on_error
    self.establish_connection(settings)
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7........./site-packages/clickhouse_driver/client.py:300: in establish_connection
    self.connection.force_connect()
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7............/site-packages/clickhouse_driver/connection.py:258: in force_connect
    self.connect()
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7............/site-packages/clickhouse_driver/connection.py:399: in connect
    return self._init_connection(host, port)
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7............/site-packages/clickhouse_driver/connection.py:343: in _init_connection
    self.receive_hello()
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7............/site-packages/clickhouse_driver/connection.py:528: in receive_hello
    raise self.receive_exception()
E   clickhouse_driver.errors.ServerException: Code: 194.
E   DB::Exception: default: Authentication failed: password is incorrect, or there is no user with such name.
E   
E   If you use ClickHouse Cloud, the password can be reset at https://clickhouse.cloud/
E   on the settings page for the corresponding service.
E   
E   If you have installed ClickHouse and forgot password you can reset it in the configuration file.
E   The password for default user is typically located at ....../etc/clickhouse-server/users.d/default-password.xml
E   and deleting this file will reset the password.
E   See also ....../etc/clickhouse-server/users.xml on the server where ClickHouse is installed.
E   
E   . Stack trace:
E   
E   0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000dd109bb
E   1. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x0000000008bae62c
E   2. DB::AccessControl::authenticate(DB::Credentials const&, Poco::Net::IPAddress const&, String const&) const @ 0x00000000115b2f81
E   3. DB::Session::authenticate(DB::Credentials const&, Poco::Net::SocketAddress const&, std::vector<String, std::allocator<String>> const&) @ 0x0000000012915305
E   4. DB::Session::authenticate(String const&, String const&, Poco::Net::SocketAddress const&, std::vector<String, std::allocator<String>> const&) @ 0x0000000012914952
E   5. DB::TCPHandler::receiveHello() @ 0x0000000013e9107d
E   6. DB::TCPHandler::runImpl() @ 0x0000000013e8451e
E   7. DB::TCPHandler::run() @ 0x0000000013ea4839
E   8. Poco::Net::TCPServerConnection::start() @ 0x0000000017461687
E   9. Poco::Net::TCPServerDispatcher::run() @ 0x0000000017461ad9
E   10. Poco::PooledThread::run() @ 0x000000001742e05b
E   11. Poco::ThreadImpl::runnableEntry(void*) @ 0x000000001742c53d
E   12. ? @ 0x00007f34809dcac3
E   13. ? @ 0x00007f3480a6da04

During handling of the above exception, another exception occurred:
.../integrations/clickhouse_driver/test_clickhouse_driver.py:482: in test_clickhouse_dbapi_breadcrumbs
    cursor.execute("DROP TABLE IF EXISTS test")
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7.../clickhouse_driver/dbapi/cursor.py:117: in execute
    raise OperationalError(orig)
E   clickhouse_driver.dbapi.errors.OperationalError: Code: 194.
E   DB::Exception: default: Authentication failed: password is incorrect, or there is no user with such name.
E   
E   If you use ClickHouse Cloud, the password can be reset at https://clickhouse.cloud/
E   on the settings page for the corresponding service.
E   
E   If you have installed ClickHouse and forgot password you can reset it in the configuration file.
E   The password for default user is typically located at ....../etc/clickhouse-server/users.d/default-password.xml
E   and deleting this file will reset the password.
E   See also ....../etc/clickhouse-server/users.xml on the server where ClickHouse is installed.
E   
E   . Stack trace:
E   
E   0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000dd109bb
E   1. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x0000000008bae62c
E   2. DB::AccessControl::authenticate(DB::Credentials const&, Poco::Net::IPAddress const&, String const&) const @ 0x00000000115b2f81
E   3. DB::Session::authenticate(DB::Credentials const&, Poco::Net::SocketAddress const&, std::vector<String, std::allocator<String>> const&) @ 0x0000000012915305
E   4. DB::Session::authenticate(String const&, String const&, Poco::Net::SocketAddress const&, std::vector<String, std::allocator<String>> const&) @ 0x0000000012914952
E   5. DB::TCPHandler::receiveHello() @ 0x0000000013e9107d
E   6. DB::TCPHandler::runImpl() @ 0x0000000013e8451e
E   7. DB::TCPHandler::run() @ 0x0000000013ea4839
E   8. Poco::Net::TCPServerConnection::start() @ 0x0000000017461687
E   9. Poco::Net::TCPServerDispatcher::run() @ 0x0000000017461ad9
E   10. Poco::PooledThread::run() @ 0x000000001742e05b
E   11. Poco::ThreadImpl::runnableEntry(void*) @ 0x000000001742c53d
E   12. ? @ 0x00007f34809dcac3
E   13. ? @ 0x00007f3480a6da04
tests.integrations.clickhouse_driver.test_clickhouse_driver test_clickhouse_client_spans_with_pii
Stack Traces | 0.056s run time
.../integrations/clickhouse_driver/test_clickhouse_driver.py:364: in test_clickhouse_client_spans_with_pii
    client.execute("DROP TABLE IF EXISTS test")
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7........./site-packages/clickhouse_driver/client.py:370: in execute
    with self.disconnect_on_error(query, settings):
.../hostedtoolcache/Python/3.7.17.../x64/lib/python3.7/contextlib.py:112: in __enter__
    return next(self.gen)
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7........./site-packages/clickhouse_driver/client.py:313: in disconnect_on_error
    self.establish_connection(settings)
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7........./site-packages/clickhouse_driver/client.py:300: in establish_connection
    self.connection.force_connect()
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7............/site-packages/clickhouse_driver/connection.py:258: in force_connect
    self.connect()
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7............/site-packages/clickhouse_driver/connection.py:399: in connect
    return self._init_connection(host, port)
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7............/site-packages/clickhouse_driver/connection.py:343: in _init_connection
    self.receive_hello()
.tox/py3.7-clickhouse_driver-v0.2.9/lib/python3.7............/site-packages/clickhouse_driver/connection.py:528: in receive_hello
    raise self.receive_exception()
E   clickhouse_driver.errors.ServerException: Code: 194.
E   DB::Exception: default: Authentication failed: password is incorrect, or there is no user with such name.
E   
E   If you use ClickHouse Cloud, the password can be reset at https://clickhouse.cloud/
E   on the settings page for the corresponding service.
E   
E   If you have installed ClickHouse and forgot password you can reset it in the configuration file.
E   The password for default user is typically located at .../etc/clickhouse-server/users.d/default-password.xml
E   and deleting this file will reset the password.
E   See also .../etc/clickhouse-server/users.xml on the server where ClickHouse is installed.
E   
E   . Stack trace:
E   
E   0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000dd109bb
E   1. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x0000000008bae62c
E   2. DB::AccessControl::authenticate(DB::Credentials const&, Poco::Net::IPAddress const&, String const&) const @ 0x00000000115b2f81
E   3. DB::Session::authenticate(DB::Credentials const&, Poco::Net::SocketAddress const&, std::vector<String, std::allocator<String>> const&) @ 0x0000000012915305
E   4. DB::Session::authenticate(String const&, String const&, Poco::Net::SocketAddress const&, std::vector<String, std::allocator<String>> const&) @ 0x0000000012914952
E   5. DB::TCPHandler::receiveHello() @ 0x0000000013e9107d
E   6. DB::TCPHandler::runImpl() @ 0x0000000013e8451e
E   7. DB::TCPHandler::run() @ 0x0000000013ea4839
E   8. Poco::Net::TCPServerConnection::start() @ 0x0000000017461687
E   9. Poco::Net::TCPServerDispatcher::run() @ 0x0000000017461ad9
E   10. Poco::PooledThread::run() @ 0x000000001742e05b
E   11. Poco::ThreadImpl::runnableEntry(void*) @ 0x000000001742c53d
E   12. ? @ 0x00007f34809dcac3
E   13. ? @ 0x00007f3480a6da04

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@antonpirker antonpirker force-pushed the antonpirker/fix-clickhouse branch from c1a5cea to 52532a4 Compare February 21, 2025 09:34
@antonpirker antonpirker deleted the antonpirker/fix-clickhouse branch February 21, 2025 15:20
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