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

Bump psycopg3 version && add timeouts on blocking functions #15492

Merged
merged 2 commits into from
Aug 7, 2023

Conversation

jmeunier28
Copy link
Contributor

@jmeunier28 jmeunier28 commented Aug 7, 2023

What does this PR do?

Updates psycopg3 to the latest released version, which contains nice fixes like this one:

Fix connect() to avoid “leaking” an open PGconn attached to the OperationalError in case of connection failure. Error.pgconn is now a shallow copy of the real libpq connection, and the latter is closed before the exception propagates (ticket #565).

Also, adds a timeout parameter on blocking functions like WaitGroup.wait() and close_all_connections. On master we have seen the tests timeout, and it could be due to us blocking forever when we can't close the connection, which happens every time we call check.cancel().

Motivation

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached
  • If the PR doesn't need to be tested during QA, please add a qa/skip-qa label.

edengorevoy
edengorevoy previously approved these changes Aug 7, 2023
Copy link
Contributor

@edengorevoy edengorevoy left a comment

Choose a reason for hiding this comment

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

looks good to me, the threading.Event, Conditions + Timer setup is cool ⚡

@github-actions
Copy link

github-actions bot commented Aug 7, 2023

Test Results

     12 files       12 suites   14m 41s ⏱️
   223 tests    221 ✔️   2 💤 0
1 344 runs  1 296 ✔️ 48 💤 0

Results for commit b2e9308.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Merging #15492 (b2e9308) into master (8bb548d) will decrease coverage by 0.01%.
The diff coverage is 82.60%.

Flag Coverage Δ
postgres 91.69% <82.60%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@jmeunier28 jmeunier28 merged commit 2192e76 into master Aug 7, 2023
29 checks passed
@jmeunier28 jmeunier28 deleted the jmeunier/add-timeouts branch August 7, 2023 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants