Skip to content

Python: Prefer injected Oracle clients over connection settings - #9985

Open
ZedingZhang (ZedingZhang) wants to merge 1 commit into
microsoft:mainfrom
ZedingZhang:fix/oracle-injected-client-settings-9961
Open

ZedingZhang (ZedingZhang) wants to merge 1 commit into
microsoft:mainfrom
ZedingZhang:fix/oracle-injected-client-settings-9961

Conversation

@ZedingZhang

@ZedingZhang ZedingZhang (ZedingZhang) commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Motivation & Context

OracleStore and OracleCollection reject connection and pool settings alongside an injected async connection or pool. Those settings are irrelevant to the supplied client, so applications cannot reuse their preconfigured client with shared constructor options.

Description & Review Guide

  • What are the major changes? Remove the conflicting-settings rejection from the shared client-construction helper. Expand the existing regression to 32 combinations of store/collection, connection/pool, and redundant settings. Cover invalid client types alongside ignored options, and correct the parameter descriptions of this behavior.
  • What is the impact of these changes? Injected clients take precedence over credentials, pool parameters, and .env options, including empty or invalid values. They remain caller-owned.
  • What do you want reviewers to focus on? Tests verify that settings loading and pool creation are skipped, the supplied client is reused, cleanup leaves it open, and invalid client types are rejected. The regression fails on the original implementation and passes with the fix.

Related Issue

Fixes #9961. The issue has the ready-for-implementation label; no competing open PR was found before submission.

AI Assistance

  • No material AI assistance was used.
  • This is an AI-assisted contribution.

AI assistance details: Codex assisted with investigation, implementation, tests, parameter documentation, and this PR description. Codex executed the reported checks; I reviewed all submitted content and take responsibility for it.

Contribution Checklist

  • The code builds clean without any errors or warnings — Oracle sdist and wheel built successfully.
  • All unit tests pass, and I have added new tests where possible — Oracle unit suite: 178 passed, 1 integration test deselected. Ruff formatting/lint, strict source Pyright, all five test type checkers, and README code-block checks pass. No live Oracle integration tests were run.
  • The PR follows the Contribution Guidelines
  • This PR links to an agreed issue with no competing open PR, or the Related Issue section documents a trivial-change or repository-automation exception.
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified in the change to prioritize injected Oracle clients while preserving caller ownership.

No open issues 🎉

What changed in this PR

Updates the Python Oracle vector-store integration so injected async connections and pools take precedence over connection settings, addressing #9961 while preserving caller ownership.

Changes:

  • Removes the rejection of redundant connection, pool, and .env options when a client is supplied.
  • Expands regression coverage for ignored settings, client reuse, cleanup, and invalid client types.
  • Updates documentation to describe client precedence and ownership.
File Description
python/​packages/​oracle/​tests/​oracle/​test_settings.py Tests injected-client precedence across 32 combinations and retains invalid-client validation.
python/​packages/​oracle/​README.md Clarifies that supplied clients take precedence over connection settings.
python/​packages/​oracle/​agent_framework_oracle/​_vector_store.py Removes the conflicting-settings check and updates constructor parameter documentation.

Review effort: Balanced

This branch was previously deployed

1 inactive deployment
github-app-auth — 7c02be48 Deployed Nov 2, 2026 by ZedingZhang via add_label #26874
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: [Bug]: Oracle vector stores reject settings instead of preferring an injected client

2 participants