-
Notifications
You must be signed in to change notification settings - Fork 84
ENG-2109: Adds read_only parameter to MSSQL connection string #7041
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7041 +/- ##
==========================================
- Coverage 87.03% 87.00% -0.03%
==========================================
Files 528 528
Lines 34668 34683 +15
Branches 4005 4010 +5
==========================================
+ Hits 30174 30177 +3
- Misses 3620 3630 +10
- Partials 874 876 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Greptile OverviewGreptile SummaryThis PR adds a Key Changes:
Issues Found:
Confidence Score: 3/5
Important Files ChangedFile Analysis
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (1)
-
src/fides/api/service/connectors/microsoft_sql_server_connector.py, line 25-48 (link)style: Missing unit tests for
build_uri()method. Other connectors (PostgreSQL, MongoDB, MariaDB, MySQL) have dedicated test files intests/ops/service/connection_config/that test URL building logic. Consider creatingtest_mssql_connector.pyto test:- URL with
read_only_connection=True - URL with
read_only_connection=False - URL with
read_only_connection=None - Default behavior when field is not provided
Also, tests should use URL parsing (per custom rule 49769419):
from urllib.parse import urlparse, parse_qs parsed = urlparse(uri) query_params = parse_qs(parsed.query) assert query_params.get("read_only") == ["True"]
Context Used: Rule from
dashboard- When writing tests that validate URL properties, always parse the URL into components and assert on ... (source) - URL with
5 files reviewed, 2 comments
adamsachs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks for addressing the structural concern on the query args, and for providing some more evidence for why we think read_only should work here.
there's still some doubt about whether this is going to be effective, but i don't think that should hold us up from merging - let's see if we can figure out a way to validate it internally! at least our CI checks passing should make us feel better that we haven't broken anything core with the mssql integration 👍
Ticket ENG-2109
Description Of Changes
read_onlyas a connection parameter to the MSSQL connectionApplicationIntent=ReadOnly(in ODBC parlance)Code Changes
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works