Remove unsafeLogUnredactedQueries for now#580
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Removes the unsafeLogUnredactedQueries configuration option across the common + Node clients so query text is no longer emitted in logs, and URL query search params are always redacted when logging request context.
Changes:
- Removed
unsafeLogUnredactedQueriesfrom public config/types and connection params wiring. - Stopped including raw
queryin structured logargs(client + node connection lifecycle logs). - Always deletes
queryfrom URL/search params before logging (debug/error contexts), and deletes now-obsolete tests/docs.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/client-node/src/connection/node_base_connection.ts | Removes query text from logs and always redacts query from logged URL/search params. |
| packages/client-node/tests/utils/http_stubs.ts | Removes the deprecated config field from test connection params. |
| packages/client-node/tests/unit/node_client.test.ts | Removes the deprecated config field from unit test client config. |
| packages/client-node/tests/integration/node_logger_support.test.ts | Removes tests that exercised the unsafe toggle. |
| packages/client-common/src/connection.ts | Removes unsafeLogUnredactedQueries from the ConnectionParams interface. |
| packages/client-common/src/config.ts | Removes the public config option and stops mapping it into connection params. |
| packages/client-common/src/client.ts | Stops including query text in structured logs at the client layer. |
| packages/client-common/tests/utils/client.ts | Removes test-only config that depended on the unsafe toggle. |
| packages/client-common/tests/unit/config.test.ts | Updates expected connection params object to no longer include the removed field. |
| CHANGELOG.md | Removes documentation mentioning the unsafe logging toggle. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8912cf7 to
3e0cfdd
Compare
6b35c38 to
46ef34a
Compare
|
@copilot review risks this PR can introduce. |
|
@peter-leonov-ch I've opened a new pull request, #583, to work on those changes. Once the pull request is ready, I'll request review from you. |
e87af82 to
64fdfc8
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> polish the test
64fdfc8 to
38ebd96
Compare
38ebd96 to
b6ce135
Compare
|
Addressed risk analysis from: |
| }), | ||
| ).rejects.toThrow() // We expect this to fail since the query is invalid, but we want to check the logs | ||
| for (const entry of logs) { | ||
| expect(entry.message).not.toContain(secret) |
There was a problem hiding this comment.
do we need to add an explicit test for query itself?
There was a problem hiding this comment.
Fair point, added.
Summary
unsafeLogUnredactedQueriestoggle from the code