Skip to content

Fix bug on -Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production && Enhance Configuration && Optimize Test Command#14

Merged
danielmeppiel merged 3 commits intodanielmeppiel:mainfrom
crazyyanchao:main
May 10, 2025
Merged

Fix bug on -Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production && Enhance Configuration && Optimize Test Command#14
danielmeppiel merged 3 commits intodanielmeppiel:mainfrom
crazyyanchao:main

Conversation

@crazyyanchao
Copy link
Contributor

Version:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
"CORE 11.2.0.4.0 Production"
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production

….example and updating related code in main.py, db_context, and README for Oracle client library directory support.
… MCP server with additional options for event subscription and message sending.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for specifying the Oracle client library directory via an environment variable, updates the database connector to accept and forward this directory when initializing in thick mode, and refines the async pool creation. It also updates configuration examples (including .env.example and README.md) and adds a Chinese translation of the README.

  • Introduce ORACLE_CLIENT_LIB_DIR env var and pass it to DatabaseConnector
  • Extend DatabaseConnector and DatabaseContext signatures to accept lib_dir
  • Update oracledb.create_pool_async invocation and refresh documentation/examples

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
main.py Read ORACLE_CLIENT_LIB_DIR and pass it into the application lifespan
db_context/database.py Extend connector init with lib_dir, conditionally call init_oracle_client, and adjust pool creation
db_context/init.py Forward lib_dir from DatabaseContext to DatabaseConnector
README.md Add references for advanced run commands
README-zh.md Add Chinese documentation
.env.example Document the new ORACLE_CLIENT_LIB_DIR variable
Comments suppressed due to low confidence (2)

db_context/database.py:20

  • Consider adding unit tests for DatabaseConnector to verify that oracledb.init_oracle_client is called both with and without lib_dir when thick_mode is enabled.
if lib_dir:

db_context/database.py:44

  • The await keyword was removed when creating the async pool, causing _pool to be assigned a coroutine instead of the actual pool instance. Please restore await before oracledb.create_pool_async(...).
self._pool = oracledb.create_pool_async(

@danielmeppiel danielmeppiel merged commit 1a77060 into danielmeppiel:main May 10, 2025
1 check passed
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.

2 participants