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

Upgrade PGBouncer to psycopg3 #19325

Conversation

sethsamuel
Copy link
Contributor

@sethsamuel sethsamuel commented Dec 30, 2024

What does this PR do?

Updates psycopg to 3 for the pgbouncer integration.

Motivation

psycopg2 is deprecated and hasn't been updated in quite some time.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Copy link

codecov bot commented Dec 30, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 87.95%. Comparing base (b0ae51d) to head (cd64eea).
Report is 1 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
activemq ?
cassandra ?
datadog_checks_dev 77.63% <ø> (ø)
hive ?
hivemq ?
hudi ?
ignite ?
jboss_wildfly ?
kafka ?
pgbouncer 92.13% <90.00%> (+0.47%) ⬆️
presto ?
solr ?

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

@@ -73,47 +74,46 @@ def _collect_stats(self, db):
metric_scope.append(SERVERS_METRICS)

try:
with db.cursor(cursor_factory=pgextras.DictCursor) as cursor:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

PG3 with automatically starts a transaction, i.e., adds a BEGIN, which breaks many of the queries.

@sethsamuel sethsamuel changed the title Upgrade pgbouncer to psycopg3 Upgrade PGBouncer to psycopg3 Dec 30, 2024
@sethsamuel sethsamuel added the qa/skip-qa Automatically skip this PR for the next QA label Jan 22, 2025
@sethsamuel sethsamuel marked this pull request as ready for review January 22, 2025 15:55
@sethsamuel sethsamuel requested review from a team as code owners January 22, 2025 15:55
iliakur
iliakur previously approved these changes Jan 22, 2025

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

@sethsamuel sethsamuel added this pull request to the merge queue Jan 23, 2025
Merged via the queue into master with commit 5b65299 Jan 23, 2025
48 checks passed
@sethsamuel sethsamuel deleted the seth.samuel/DBMON-4860-upgrade-psycopg-to-3-for-pgbouncer-integration branch January 23, 2025 19:00
github-actions bot pushed a commit that referenced this pull request Jan 23, 2025
* WIP

* WIP

* v3

* Changelog

* Use source

* Comments

* Binary

* Build psycopg (#19326)

* WIP

* Merge fix

* Dep

* Fix license

* WIP

* WIP

* Changelog

* test

* test

* Version

* Changelog

* Always add bin path to $PATH on macos builders

* Add a dummy change to test that a macos build with a cache hit works

* Revert "Add a dummy change to test that a macos build with a cache hit works"

This reverts commit 4df3963.

---------

Co-authored-by: Alex Lopez <[email protected]>
Co-authored-by: Alex Lopez <[email protected]> 5b65299
sethsamuel added a commit that referenced this pull request Jan 28, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jan 28, 2025
* Revert "Upgrade PGBouncer to psycopg3 (#19325)"

This reverts commit 5b65299.

* Changelog

---------

Co-authored-by: Enrico Donnici <[email protected]>
datadog-agent-integrations-bot bot pushed a commit that referenced this pull request Jan 28, 2025
* Revert "Upgrade PGBouncer to psycopg3 (#19325)"

This reverts commit 5b65299.

* Changelog

---------

Co-authored-by: Enrico Donnici <[email protected]>
(cherry picked from commit d6358fb)
sethsamuel added a commit that referenced this pull request Jan 28, 2025
* Revert "Upgrade PGBouncer to psycopg3 (#19325)"

This reverts commit 5b65299.

* Changelog

---------

Co-authored-by: Enrico Donnici <[email protected]>
github-actions bot pushed a commit that referenced this pull request Jan 28, 2025
* Revert "Upgrade PGBouncer to psycopg3 (#19325)"

This reverts commit 5b65299.

* Changelog

---------

Co-authored-by: Enrico Donnici <[email protected]> d6358fb
iliakur pushed a commit that referenced this pull request Jan 28, 2025
* Revert "Update Posgres to psycopg3 (#19322)"

This reverts commit b13f5e0.

* Changelog

* Dep

* Revert "Upgrade PGBouncer to psycopg3" (#19497)

* Revert "Upgrade PGBouncer to psycopg3 (#19325)"

This reverts commit 5b65299.

* Changelog

---------

Co-authored-by: Enrico Donnici <[email protected]>

---------

Co-authored-by: Enrico Donnici <[email protected]>
datadog-agent-integrations-bot bot pushed a commit that referenced this pull request Jan 28, 2025
* Revert "Update Posgres to psycopg3 (#19322)"

This reverts commit b13f5e0.

* Changelog

* Dep

* Revert "Upgrade PGBouncer to psycopg3" (#19497)

* Revert "Upgrade PGBouncer to psycopg3 (#19325)"

This reverts commit 5b65299.

* Changelog

---------

Co-authored-by: Enrico Donnici <[email protected]>

---------

Co-authored-by: Enrico Donnici <[email protected]>
(cherry picked from commit a74f10a)
github-actions bot pushed a commit that referenced this pull request Jan 28, 2025
* Revert "Update Posgres to psycopg3 (#19322)"

This reverts commit b13f5e0.

* Changelog

* Dep

* Revert "Upgrade PGBouncer to psycopg3" (#19497)

* Revert "Upgrade PGBouncer to psycopg3 (#19325)"

This reverts commit 5b65299.

* Changelog

---------

Co-authored-by: Enrico Donnici <[email protected]>

---------

Co-authored-by: Enrico Donnici <[email protected]> a74f10a
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.

4 participants