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

[FEATURE] Enable strict_min/max for ExpectTableRowCountToBeBetween #10845

Conversation

anthonyburdi
Copy link
Contributor

@anthonyburdi anthonyburdi commented Jan 10, 2025

Enable strict_min and strict_max parameters for ExpectTableRowCountToBeBetween

  • Description of PR changes above includes a link to an existing GitHub issue
  • PR title is prefixed with one of: [BUGFIX], [FEATURE], [DOCS], [MAINTENANCE], [CONTRIB]
  • Code is linted - run invoke lint (uses ruff format + ruff check)
  • Appropriate tests and docs have been updated

For more information about contributing, visit our community resources.

After you submit your PR, keep the page open and monitor the statuses of the various checks made by our continuous integration process at the bottom of the page. Please fix any issues that come up and reach out on Slack if you need help. Thanks for contributing!

Copy link

netlify bot commented Jan 10, 2025

Deploy Preview for niobium-lead-7998 canceled.

Name Link
🔨 Latest commit 9bce712
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/6781af447a972600087f094d

…-and-max-on-table-row-count-between

# Conflicts:
#	great_expectations/expectations/core/expect_table_row_count_to_be_between.py
@anthonyburdi anthonyburdi changed the title Add strict_min/max [FEATURE] Enable strict_min/max for ExpectTableRowCountToBeBetween Jan 10, 2025
Copy link

codecov bot commented Jan 10, 2025

❌ 191 Tests Failed:

Tests completed Failed Passed Skipped
21440 191 21249 5858
View the top 3 failed tests by shortest run time
::tests.integration.data_sources_and_expectations.expectations.test_expect_select_column_values_to_be_unique_within_record
Stack Traces | 0s run time
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12............/site-packages/urllib3/connection.py:198: in _new_conn
    sock = connection.create_connection(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../urllib3/util/connection.py:85: in create_connection
    raise err
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../urllib3/util/connection.py:73: in create_connection
    sock.connect(sa)
E   ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/urllib3/connectionpool.py:787: in urlopen
    response = self._make_request(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/urllib3/connectionpool.py:493: in _make_request
    conn.request(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12............/site-packages/urllib3/connection.py:445: in request
    self.endheaders()
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12/http/client.py:1331: in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12/http/client.py:1091: in _send_output
    self.send(msg)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12/http/client.py:1035: in send
    self.connect()
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12............/site-packages/urllib3/connection.py:276: in connect
    self.sock = self._new_conn()
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12............/site-packages/urllib3/connection.py:213: in _new_conn
    raise NewConnectionError(
E   urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f178eae6d50>: Failed to establish a new connection: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/urllib3/connectionpool.py:841: in urlopen
    retries = retries.increment(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../urllib3/util/retry.py:519: in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
E   urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8088): Max retries exceeded with url: /v1/statement (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f178eae6d50>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:807: in execute
    response = self._request.post(self._query, additional_http_headers)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:563: in post
    http_response = self._post(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:911: in decorated
    raise error
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:893: in decorated
    result = func(*args, **kwargs)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/requests/sessions.py:637: in post
    return self.request("POST", url, data=data, json=json, **kwargs)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/requests/adapters.py:700: in send
    raise ConnectionError(e, request=request)
E   requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8088): Max retries exceeded with url: /v1/statement (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f178eae6d50>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1964: in _exec_single_context
    self.dialect.do_execute(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../trino/sqlalchemy/dialect.py:437: in do_execute
    cursor.execute(statement, parameters)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/trino/dbapi.py:585: in execute
    self._iterator = iter(self._query.execute())
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:809: in execute
    raise trino.exceptions.TrinoConnectionError("failed to execute: {}".format(e))
E   trino.exceptions.TrinoConnectionError: failed to execute: HTTPConnectionPool(host='localhost', port=8088): Max retries exceeded with url: /v1/statement (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f178eae6d50>: Failed to establish a new connection: [Errno 111] Connection refused'))

The above exception was the direct cause of the following exception:
great_expectations/self_check/util.py:1466: in build_test_backends_list
    engine = _create_trino_engine(db_hostname)
great_expectations/self_check/util.py:2417: in _create_trino_engine
    schemas = conn.execute(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1416: in execute
    return meth(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/sql/elements.py:515: in _execute_on_connection
    return connection._execute_clauseelement(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1638: in _execute_clauseelement
    ret = self._execute_context(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1843: in _execute_context
    return self._exec_single_context(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1983: in _exec_single_context
    self._handle_dbapi_exception(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:2352: in _handle_dbapi_exception
    raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1964: in _exec_single_context
    self.dialect.do_execute(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../trino/sqlalchemy/dialect.py:437: in do_execute
    cursor.execute(statement, parameters)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/trino/dbapi.py:585: in execute
    self._iterator = iter(self._query.execute())
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:809: in execute
    raise trino.exceptions.TrinoConnectionError("failed to execute: {}".format(e))
E   sqlalchemy.exc.OperationalError: (trino.exceptions.TrinoConnectionError) failed to execute: HTTPConnectionPool(host='localhost', port=8088): Max retries exceeded with url: /v1/statement (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f178eae6d50>: Failed to establish a new connection: [Errno 111] Connection refused'))
E   [SQL: show schemas from memory like 'schema']
E   (Background on this error at: https://sqlalche..../e/20/e3q8)

The above exception was the direct cause of the following exception:
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/pluggy/_hooks.py:513: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/pluggy/_manager.py:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/_pytest/python.py:245: in pytest_pycollect_makeitem
    return list(collector._genfunctions(name, obj))
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/_pytest/python.py:462: in _genfunctions
    self.ihook.pytest_generate_tests.call_extra(methods, dict(metafunc=metafunc))
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/pluggy/_hooks.py:574: in call_extra
    return self._hookexec(self.name, hookimpls, kwargs, firstresult)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/pluggy/_manager.py:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
tests/conftest.py:337: in pytest_generate_tests
    test_backends = build_test_backends_list_v2_api(metafunc)
tests/conftest.py:287: in build_test_backends_list_v2_api
    test_backend_names: List[str] = build_test_backends_list_v3_api(metafunc)
tests/conftest.py:317: in build_test_backends_list_v3_api
    test_backend_names: List[str] = build_test_backends_list_v3(
great_expectations/self_check/util.py:1471: in build_test_backends_list
    raise ImportError("trino tests are requested, but unable to connect") from e  # noqa: TRY003 # FIXME CoP
E   ImportError: trino tests are requested, but unable to connect
::tests.integration.data_sources_and_expectations.expectations.test_expect_table_row_count_to_be_between
Stack Traces | 0s run time
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12............/site-packages/urllib3/connection.py:198: in _new_conn
    sock = connection.create_connection(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../urllib3/util/connection.py:85: in create_connection
    raise err
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../urllib3/util/connection.py:73: in create_connection
    sock.connect(sa)
E   ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/urllib3/connectionpool.py:787: in urlopen
    response = self._make_request(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/urllib3/connectionpool.py:493: in _make_request
    conn.request(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12............/site-packages/urllib3/connection.py:445: in request
    self.endheaders()
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12/http/client.py:1331: in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12/http/client.py:1091: in _send_output
    self.send(msg)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12/http/client.py:1035: in send
    self.connect()
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12............/site-packages/urllib3/connection.py:276: in connect
    self.sock = self._new_conn()
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12............/site-packages/urllib3/connection.py:213: in _new_conn
    raise NewConnectionError(
E   urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f178ea47950>: Failed to establish a new connection: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/urllib3/connectionpool.py:841: in urlopen
    retries = retries.increment(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../urllib3/util/retry.py:519: in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
E   urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8088): Max retries exceeded with url: /v1/statement (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f178ea47950>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:807: in execute
    response = self._request.post(self._query, additional_http_headers)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:563: in post
    http_response = self._post(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:911: in decorated
    raise error
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:893: in decorated
    result = func(*args, **kwargs)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/requests/sessions.py:637: in post
    return self.request("POST", url, data=data, json=json, **kwargs)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/requests/adapters.py:700: in send
    raise ConnectionError(e, request=request)
E   requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8088): Max retries exceeded with url: /v1/statement (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f178ea47950>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1964: in _exec_single_context
    self.dialect.do_execute(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../trino/sqlalchemy/dialect.py:437: in do_execute
    cursor.execute(statement, parameters)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/trino/dbapi.py:585: in execute
    self._iterator = iter(self._query.execute())
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:809: in execute
    raise trino.exceptions.TrinoConnectionError("failed to execute: {}".format(e))
E   trino.exceptions.TrinoConnectionError: failed to execute: HTTPConnectionPool(host='localhost', port=8088): Max retries exceeded with url: /v1/statement (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f178ea47950>: Failed to establish a new connection: [Errno 111] Connection refused'))

The above exception was the direct cause of the following exception:
great_expectations/self_check/util.py:1466: in build_test_backends_list
    engine = _create_trino_engine(db_hostname)
great_expectations/self_check/util.py:2417: in _create_trino_engine
    schemas = conn.execute(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1416: in execute
    return meth(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/sql/elements.py:515: in _execute_on_connection
    return connection._execute_clauseelement(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1638: in _execute_clauseelement
    ret = self._execute_context(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1843: in _execute_context
    return self._exec_single_context(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1983: in _exec_single_context
    self._handle_dbapi_exception(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:2352: in _handle_dbapi_exception
    raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1964: in _exec_single_context
    self.dialect.do_execute(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../trino/sqlalchemy/dialect.py:437: in do_execute
    cursor.execute(statement, parameters)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/trino/dbapi.py:585: in execute
    self._iterator = iter(self._query.execute())
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:809: in execute
    raise trino.exceptions.TrinoConnectionError("failed to execute: {}".format(e))
E   sqlalchemy.exc.OperationalError: (trino.exceptions.TrinoConnectionError) failed to execute: HTTPConnectionPool(host='localhost', port=8088): Max retries exceeded with url: /v1/statement (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f178ea47950>: Failed to establish a new connection: [Errno 111] Connection refused'))
E   [SQL: show schemas from memory like 'schema']
E   (Background on this error at: https://sqlalche..../e/20/e3q8)

The above exception was the direct cause of the following exception:
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/pluggy/_hooks.py:513: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/pluggy/_manager.py:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/_pytest/python.py:245: in pytest_pycollect_makeitem
    return list(collector._genfunctions(name, obj))
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/_pytest/python.py:462: in _genfunctions
    self.ihook.pytest_generate_tests.call_extra(methods, dict(metafunc=metafunc))
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/pluggy/_hooks.py:574: in call_extra
    return self._hookexec(self.name, hookimpls, kwargs, firstresult)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/pluggy/_manager.py:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
tests/conftest.py:337: in pytest_generate_tests
    test_backends = build_test_backends_list_v2_api(metafunc)
tests/conftest.py:287: in build_test_backends_list_v2_api
    test_backend_names: List[str] = build_test_backends_list_v3_api(metafunc)
tests/conftest.py:317: in build_test_backends_list_v3_api
    test_backend_names: List[str] = build_test_backends_list_v3(
great_expectations/self_check/util.py:1471: in build_test_backends_list
    raise ImportError("trino tests are requested, but unable to connect") from e  # noqa: TRY003 # FIXME CoP
E   ImportError: trino tests are requested, but unable to connect
::tests.render.test_EmailRenderer
Stack Traces | 0s run time
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12............/site-packages/urllib3/connection.py:198: in _new_conn
    sock = connection.create_connection(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../urllib3/util/connection.py:85: in create_connection
    raise err
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../urllib3/util/connection.py:73: in create_connection
    sock.connect(sa)
E   ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/urllib3/connectionpool.py:787: in urlopen
    response = self._make_request(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/urllib3/connectionpool.py:493: in _make_request
    conn.request(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12............/site-packages/urllib3/connection.py:445: in request
    self.endheaders()
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12/http/client.py:1331: in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12/http/client.py:1091: in _send_output
    self.send(msg)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12/http/client.py:1035: in send
    self.connect()
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12............/site-packages/urllib3/connection.py:276: in connect
    self.sock = self._new_conn()
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12............/site-packages/urllib3/connection.py:213: in _new_conn
    raise NewConnectionError(
E   urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f178e4e48f0>: Failed to establish a new connection: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/urllib3/connectionpool.py:841: in urlopen
    retries = retries.increment(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../urllib3/util/retry.py:519: in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
E   urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8088): Max retries exceeded with url: /v1/statement (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f178e4e48f0>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:807: in execute
    response = self._request.post(self._query, additional_http_headers)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:563: in post
    http_response = self._post(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:911: in decorated
    raise error
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:893: in decorated
    result = func(*args, **kwargs)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/requests/sessions.py:637: in post
    return self.request("POST", url, data=data, json=json, **kwargs)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12........./site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/requests/adapters.py:700: in send
    raise ConnectionError(e, request=request)
E   requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8088): Max retries exceeded with url: /v1/statement (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f178e4e48f0>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1964: in _exec_single_context
    self.dialect.do_execute(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../trino/sqlalchemy/dialect.py:437: in do_execute
    cursor.execute(statement, parameters)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/trino/dbapi.py:585: in execute
    self._iterator = iter(self._query.execute())
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:809: in execute
    raise trino.exceptions.TrinoConnectionError("failed to execute: {}".format(e))
E   trino.exceptions.TrinoConnectionError: failed to execute: HTTPConnectionPool(host='localhost', port=8088): Max retries exceeded with url: /v1/statement (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f178e4e48f0>: Failed to establish a new connection: [Errno 111] Connection refused'))

The above exception was the direct cause of the following exception:
great_expectations/self_check/util.py:1466: in build_test_backends_list
    engine = _create_trino_engine(db_hostname)
great_expectations/self_check/util.py:2417: in _create_trino_engine
    schemas = conn.execute(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1416: in execute
    return meth(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/sql/elements.py:515: in _execute_on_connection
    return connection._execute_clauseelement(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1638: in _execute_clauseelement
    ret = self._execute_context(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1843: in _execute_context
    return self._exec_single_context(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1983: in _exec_single_context
    self._handle_dbapi_exception(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:2352: in _handle_dbapi_exception
    raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../sqlalchemy/engine/base.py:1964: in _exec_single_context
    self.dialect.do_execute(
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12.../trino/sqlalchemy/dialect.py:437: in do_execute
    cursor.execute(statement, parameters)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/trino/dbapi.py:585: in execute
    self._iterator = iter(self._query.execute())
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12................../site-packages/trino/client.py:809: in execute
    raise trino.exceptions.TrinoConnectionError("failed to execute: {}".format(e))
E   sqlalchemy.exc.OperationalError: (trino.exceptions.TrinoConnectionError) failed to execute: HTTPConnectionPool(host='localhost', port=8088): Max retries exceeded with url: /v1/statement (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f178e4e48f0>: Failed to establish a new connection: [Errno 111] Connection refused'))
E   [SQL: show schemas from memory like 'schema']
E   (Background on this error at: https://sqlalche..../e/20/e3q8)

The above exception was the direct cause of the following exception:
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/pluggy/_hooks.py:513: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/pluggy/_manager.py:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/_pytest/python.py:245: in pytest_pycollect_makeitem
    return list(collector._genfunctions(name, obj))
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/_pytest/python.py:462: in _genfunctions
    self.ihook.pytest_generate_tests.call_extra(methods, dict(metafunc=metafunc))
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/pluggy/_hooks.py:574: in call_extra
    return self._hookexec(self.name, hookimpls, kwargs, firstresult)
.../hostedtoolcache/Python/3.12.8............................................................................................................................../x64/lib/python3.12....../site-packages/pluggy/_manager.py:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
tests/conftest.py:337: in pytest_generate_tests
    test_backends = build_test_backends_list_v2_api(metafunc)
tests/conftest.py:287: in build_test_backends_list_v2_api
    test_backend_names: List[str] = build_test_backends_list_v3_api(metafunc)
tests/conftest.py:317: in build_test_backends_list_v3_api
    test_backend_names: List[str] = build_test_backends_list_v3(
great_expectations/self_check/util.py:1471: in build_test_backends_list
    raise ImportError("trino tests are requested, but unable to connect") from e  # noqa: TRY003 # FIXME CoP
E   ImportError: trino tests are requested, but unable to connect

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@anthonyburdi anthonyburdi marked this pull request as ready for review January 10, 2025 23:39
@anthonyburdi anthonyburdi self-assigned this Jan 10, 2025
Copy link
Contributor

@shiplet shiplet left a comment

Choose a reason for hiding this comment

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

lgtm! though I suspect it'll need some updated tests as well?

@anthonyburdi anthonyburdi added this pull request to the merge queue Jan 13, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 13, 2025
@anthonyburdi anthonyburdi added this pull request to the merge queue Jan 13, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 13, 2025
@anthonyburdi anthonyburdi added this pull request to the merge queue Jan 13, 2025
@anthonyburdi
Copy link
Contributor Author

lgtm! though I suspect it'll need some updated tests as well?

The only test I'm seeing directly related is the integration test (which is updated in this PR) and all tests are passing in CI (aside from one that is unrelated that Chetan is looking into). If there are other tests though that I'm missing I'm happy to address!

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 13, 2025
@anthonyburdi anthonyburdi added this pull request to the merge queue Jan 13, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 13, 2025
@donaldheppner donaldheppner added this pull request to the merge queue Jan 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 15, 2025
@NathanFarmer NathanFarmer added this pull request to the merge queue Jan 17, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 17, 2025
@NathanFarmer NathanFarmer added this pull request to the merge queue Jan 17, 2025
Merged via the queue into develop with commit ccaa0f1 Jan 17, 2025
78 of 99 checks passed
@NathanFarmer NathanFarmer deleted the f/zelda-1178/zelda-1217/enable-strict-min-and-max-on-table-row-count-between branch January 17, 2025 14:25
nicgrayson added a commit that referenced this pull request Jan 27, 2025
* origin/develop: (102 commits)
  [DOCS] restore lychee (#10889)
  [RELEASE] 1.3.3 (#10888)
  [DOCS] add migration guide to 0.18 docs (#10885)
  [MAINTENANCE] Migrate from `databricks-sql-connector` to `databricks-sqlalchemy` in tests (#10886)
  [BUGFIX] Allow adding Expectations with identical attributes to Suites (#10884)
  [DOCS] Corrections and clarifications for result_format (#10875)
  [BUGFIX] Make validation results' describe_dict return a serializable dict (#10863)
  [MAINTENANCE] Convert BatchTestSetup.asset property to BatchTestSetup… (#10864)
  [MAINTENANCE] Add method to set analytics user_agent_str (#10883)
  [DOCS] Update documentation around batch_parameters and link to updated API docs. (#10877)
  [MAINTENANCE] Add user-agent-str to analytics events (#10869)
  [RELEASE] 1.3.2 (#10874)
  [DOCS] Add titles to properties and methods sections in API Reference (#10821)
  [MAINTENANCE] Handle `aws-chunked` encoding type data in `TupleS3StoreBackend` (#10861)
  [Docs] update screenshot of observed value (#10867)
  [MAINTENANCE] Enforce a minimum length of 2 for MulticolumnMapExpectation `column_list` (#10850)
  [BUGFIX] Add input args validators to various Expectations (#10833)
  [DOCS] fix custom SQL Expectation approach for cloud (#10844)
  [FEATURE] Enable strict_min/max for ExpectTableRowCountToBeBetween (#10845)
  [DOCS] Adding keys to duplicated headers (#10846)
  ...
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.

4 participants