snowflakedb / snowflake-connector-net

Snowflake Connector for .NET
Apache License 2.0
173 stars 130 forks source link

SNOW-902632 connection string driven pool config #873

Closed sfc-gh-knozderko closed 3 months ago

sfc-gh-knozderko commented 4 months ago

Description

SNOW-902632 connection string driven pool config

Checklist

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 94.13490% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 82.33%. Comparing base (85204fc) to head (db8130a).

Files Patch % Lines
...Data/Core/Session/SFSessionHttpClientProperties.cs 90.00% 7 Missing and 3 partials :warning:
Snowflake.Data/Core/Session/SessionPool.cs 92.78% 1 Missing and 6 partials :warning:
...ion/SessionPropertiesWithDefaultValuesExtractor.cs 96.42% 1 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## pool/SNOW-860872-connection-pool #873 +/- ## ==================================================================== + Coverage 81.94% 82.33% +0.38% ==================================================================== Files 100 104 +4 Lines 9589 9810 +221 Branches 877 905 +28 ==================================================================== + Hits 7858 8077 +219 + Misses 1486 1484 -2 - Partials 245 249 +4 ```

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

sfc-gh-mhofman commented 3 months ago

I would do one thing around _configOverriden. When user is changing tech config of any pool I would make a copy of the initial settings. You have all the means to make it simple - _poolConfig. Then within the setters whether it's a new value or previous (reverted) value you can compare initial config with the new one implementing Equals on the ConnectionPoolConfig. This way if only user reverts the changes to the pool, he will get rid of the false indication in the logs that something in the pool got changed.