Skip to content

ROX-33664: Replace archived jackc/pgtype with pgx/v5/pgtype#20057

Merged
janisz merged 1 commit intorelease-4.8from
dashrews/fix-pgproto-33664
Apr 17, 2026
Merged

ROX-33664: Replace archived jackc/pgtype with pgx/v5/pgtype#20057
janisz merged 1 commit intorelease-4.8from
dashrews/fix-pgproto-33664

Conversation

@dashrews78
Copy link
Copy Markdown
Contributor

Description

NOTE: This is only a partial fix as the removal of pgproto3/v2 requires an upgrade of ClairCore

Backport of PR #15855 to release-4.8. Replace the direct import of the archived github.com/jackc/pgtype (v4-era) with github.com/jackc/pgx/v5/pgtype in query_metadata.go. This removes our direct dependency on the archived pgtype package, which transitively pulls in pgproto3/v2.

The pgtype dependency remains as indirect via ClairCore, but our code no longer imports it directly.

API change: pgtype.Numeric.Status != pgtype.Present → !asNumeric.Valid

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

change me!

Backport of PR #15855 to release-4.8. Replace the direct import of the
archived github.com/jackc/pgtype (v4-era) with github.com/jackc/pgx/v5/pgtype
in query_metadata.go. This removes our direct dependency on the archived
pgtype package, which transitively pulls in pgproto3/v2 (CVE-2026-32286).

The pgtype dependency remains as indirect via ClairCore, but our code no
longer imports it directly.

API change: pgtype.Numeric.Status != pgtype.Present → !asNumeric.Valid

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@dashrews78 dashrews78 requested a review from janisz April 16, 2026 16:52
@dashrews78 dashrews78 requested a review from a team as a code owner April 16, 2026 16:52
@github-actions github-actions bot added area/postgres backport PR to backport changes from master to release branch labels Apr 16, 2026
@rhacs-bot
Copy link
Copy Markdown
Contributor

Images are ready for the commit at 0aca82b.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.8.11-rc.0-2-g0aca82bc94.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 48.73%. Comparing base (29bd8be) to head (0aca82b).
⚠️ Report is 1 commits behind head on release-4.8.

Files with missing lines Patch % Lines
pkg/search/postgres/query_metadata.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           release-4.8   #20057   +/-   ##
============================================
  Coverage        48.73%   48.73%           
============================================
  Files             2595     2595           
  Lines           190828   190828           
============================================
  Hits             93005    93005           
  Misses           90511    90511           
  Partials          7312     7312           
Flag Coverage Δ
go-unit-tests 48.73% <0.00%> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@janisz
Copy link
Copy Markdown
Contributor

janisz commented Apr 17, 2026

/retest

@janisz janisz merged commit 5f4d804 into release-4.8 Apr 17, 2026
110 of 121 checks passed
@janisz janisz deleted the dashrews/fix-pgproto-33664 branch April 17, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/postgres backport PR to backport changes from master to release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants