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

[CT-2310] [Bug] The test_no_introspect test fails intermittently #7179

Closed
Tracked by #7808
peterallenwebb opened this issue Mar 16, 2023 · 4 comments · Fixed by #7208 or #8279
Closed
Tracked by #7808

[CT-2310] [Bug] The test_no_introspect test fails intermittently #7179

peterallenwebb opened this issue Mar 16, 2023 · 4 comments · Fixed by #7208 or #8279
Assignees
Labels
bug Something isn't working flaky_test repo ci/cd Testing and continuous integration for dbt-core + adapter plugins tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality

Comments

@peterallenwebb
Copy link
Contributor

peterallenwebb commented Mar 16, 2023

The Tests and Code Checks action has been failing on the main branch of dbt-core due to intermittent failure of the test_no_introspect test. We need to improve the reliablity of this test.

Initial investigation uncovered log lines suggesting that the issue may be related to closing an already-closed connection:

[DEBUG] file_log: 14:50:53.859407 [debug] [Thread-1  ]: Traceback (most recent call last):
  File "/home/runner/work/dbt-core/dbt-core/plugins/postgres/dbt/adapters/postgres/connections.py", line 66, in exception_handler
    yield
  File "/home/runner/work/dbt-core/dbt-core/core/dbt/adapters/sql/connections.py", line 80, in add_query
    cursor = connection.handle.cursor()
psycopg2.InterfaceError: connection already closed

However, there is another issue, which is that the resulting DbtRuntimeException is constructed with the wrong type in postgres/connections.py at line 89. The parameter is an Exception rather than a str:

raise dbt.exceptions.DbtRuntimeError(e) from e

As a result, a secondary exception is generated during exception handling.

@peterallenwebb peterallenwebb added the bug Something isn't working label Mar 16, 2023
@github-actions github-actions bot changed the title [Bug] The test_no_introspect test fails intermittently [CT-2310] [Bug] The test_no_introspect test fails intermittently Mar 16, 2023
@emmyoop emmyoop added the triage label Mar 16, 2023
@dbeatty10 dbeatty10 removed the triage label Mar 16, 2023
@jtcohen6 jtcohen6 added repo ci/cd Testing and continuous integration for dbt-core + adapter plugins tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality and removed bug Something isn't working labels Mar 17, 2023
@aranke aranke mentioned this issue Mar 29, 2023
6 tasks
@jtcohen6
Copy link
Contributor

Was this really resolved by #7208? Or did we just mark the test to skip?

https://github.com/dbt-labs/dbt-core/pull/7208/files#r1151279272

I'm going to reopen this and add it to the Flaky Tests epic

@jtcohen6 jtcohen6 reopened this Jun 25, 2023
@jtcohen6 jtcohen6 assigned aranke and unassigned aranke Jul 18, 2023
@martynydbt martynydbt added the bug Something isn't working label Jul 26, 2023
@emmyoop emmyoop self-assigned this Jul 26, 2023
@martynydbt
Copy link

@emmyoop Will run these tests through the flakey tester to determine 1. if they are still flakey and 2. how flakey.
If they are pretty flakey we will try to address this sprint. If not we will punt to next sprint.

@emmyoop
Copy link
Member

emmyoop commented Jul 26, 2023

@emmyoop
Copy link
Member

emmyoop commented Jul 26, 2023

This test is marked to be skipped on main. It's not flaky. It failed 1000/1000 runs once I removed the skip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flaky_test repo ci/cd Testing and continuous integration for dbt-core + adapter plugins tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality
Projects
None yet
6 participants