flipt-io / flipt

Enterprise-ready, GitOps enabled, CloudNative feature management solution
https://flipt.io
GNU General Public License v3.0
3.81k stars 216 forks source link

fix(storage): enable pgx simple protocol if prepared statements disabled #3436

Closed lzakharov closed 2 months ago

lzakharov commented 2 months ago

Hi! According to the migration from lib/pq to pgx in v1.41.0 it's necessary to replace binary_parameters=yes option with default_query_exec_mode=simple_protocol. Otherwise, the use of prepared statements will not be disabled.

Reference: https://pkg.go.dev/github.com/jackc/pgx/v5#ParseConfig.

GeorgeMac commented 2 months ago

Thanks for bringing this to our attention and fixing it @lzakharov !

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 64.65%. Comparing base (554d2c9) to head (23a2a43). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3436 +/- ## ======================================= Coverage 64.65% 64.65% ======================================= Files 174 174 Lines 13916 13916 ======================================= Hits 8998 8998 Misses 4229 4229 Partials 689 689 ``` | [Flag](https://app.codecov.io/gh/flipt-io/flipt/pull/3436/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flipt-io) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/flipt-io/flipt/pull/3436/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flipt-io) | `64.65% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flipt-io#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

markphelps commented 2 months ago

@all-contributors please add @lzakharov for code

allcontributors[bot] commented 2 months ago

@markphelps

I've put up a pull request to add @lzakharov! :tada: