ROX-19064: Reset Scanner V4 DB connection pool after init#19327
ROX-19064: Reset Scanner V4 DB connection pool after init#19327
Conversation
|
Skipping CI for Draft Pull Request. |
|
/test all |
|
Images are ready for the commit at 061abfa. To use with deploy scripts, first |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19327 +/- ##
==========================================
+ Coverage 49.62% 49.67% +0.04%
==========================================
Files 2680 2689 +9
Lines 202231 202536 +305
==========================================
+ Hits 100362 100602 +240
- Misses 94382 94426 +44
- Partials 7487 7508 +21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@dcaravel: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description
The Scanner V4 Indexer and Matcher perform DB migrations on startup that can introduce new PostgreSQL custom types.
Existing connections in the connection pool may be unaware of the new types leading to errors, such as:
unable to encode <thing> into text format for unknown type (OID 16417)Full error:
This was consistently observed after enabling Scanner V4 in CI.
Claircore v1.5.50+ adds this
Reset()into the store initialization logic. When StackRox is updated to use that version theseReset()'s can be removed. Adding these to StackRox enables us to backport to prior releases that will not haveClaircoreversion bumps.Reviewing the PGX code a second called to
Reset()is harmless in this context, keeping these after a Claircore version bump should be OK as well (outside of the smell).User-facing documentation
Testing and quality
Automated testing
No new tests added
How I validated my change
CI