Skip to content

[PECO-AI] PECOBLR-1968: Add warnings in logs if someone uses a connection param that is not defined in python sql connector#752

Open
nikhilsuri-db wants to merge 1 commit intomainfrom
peco-ai-PECOBLR-1968-3
Open

[PECO-AI] PECOBLR-1968: Add warnings in logs if someone uses a connection param that is not defined in python sql connector#752
nikhilsuri-db wants to merge 1 commit intomainfrom
peco-ai-PECOBLR-1968-3

Conversation

@nikhilsuri-db
Copy link
Contributor

@nikhilsuri-db nikhilsuri-db commented Mar 10, 2026

PR Description: PECO Agent Workflow (Partner Ecosystem)

Jira Ticket: https://databricks.atlassian.net/browse/PECOBLR-1968

Changes

Added a KNOWN_KWARGS frozenset constant to client.py listing all recognized **kwargs keys consumed by Connection.__init__ and its downstream callees. Immediately after the logger.debug(...) call, the code computes the set difference between provided keys and KNOWN_KWARGS, then emits a logger.warning if any unknown keys are found. Three tests were added to ClientTestSuite to verify the warning behavior.

Test Cases Written

  • test_unknown_connection_param_issues_warning — verifies that passing an unrecognized kwarg calls logger.warning
  • test_unknown_connection_param_warning_names_the_param — verifies the warning message contains the unkno...

Summary: Added a KNOWN_KWARGS frozenset constant to client.py listing all recognized **kwargs keys consumed by Connection.__init__ and its downstream callees. Immediately after the logger.debug(...) call, the code computes the set difference between provided keys and KNOWN_KWARGS, then emits a logger.warning if any unknown keys are found. Three tests were added to ClientTestSuite to verify the warning behavior.

@github-actions
Copy link

Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@nikhilsuri-db nikhilsuri-db changed the title [PECOBLR-1968] Implement fix [PECO-AI] PECOBLR-1968: Add warnings in logs if someone uses a connection param that is not defined in python sql connector Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant