23 Star 45 Fork 40

openGauss / openGauss-DBMind

 / 详情

gs_dbmind执行service setup -c congfig_path --initialize失败, sqlalchemy 1.44 engine.Row类型 重载[]报错.

待办的
缺陷
创建于  
2024-04-17 12:08

【标题描述】: gs_dbmind执行service setup -c congfig_path --initialize失败, sqlalchemy 1.44 engine.Row类型 重载[]报错.
【测试类型:工具功能

【操作系统和硬件信息】(查询命令: Linux hecs-137303 3.10.0-1160.92.1.el7.x86_64 #1 SMP Tue Jun 20 11:48:01 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux):

【测试环境】(单机/1主x备x级联备):

【被测功能】:

【测试类型】:

【数据库版本】(查询命令: gaussdb -V):

【预置条件】:

【操作步骤】(请填写详细的操作步骤):

  1. 是用readme 中链接下载压缩包
  2. 安装完dbmind及依赖, 创建dbmind 配置文件并初始化
    1. sh dbmind-installer-x86_64-python3.12.sh
    2. .openGauss-DBMind/python/bin/python -m pip install -r requirements-x86.txt
    3. gs_dbmind service setup -c config
    4. gs_dbmind service setup --initialize -c config

【预期输出】:
成功将配置文件加密
【实际输出】:

  1. 安装包文件名与实际安装脚本名不一致
    输入图片说明
  2. 执行 initialize 报错
    输入图片说明
    【原因分析】:
    sqlalchemy的版本是1.44
    输入图片说明
    输入图片说明
    代码会走到 baserow_usecext = false 的分支中. 在 Row 类型中会重载[], 重载函数不能处理 slice 类型, 比如 row[0:-1]

在另一个可以正常执行 initialize 的环境中, sqlalchemy的版本是2.9.0, baserow_usecext 会赋为 true, 不会走到重载函数_get_by_key_impl

目前怀疑是sqlalchemy 版本有问题, 或者cresultproxy这个包的动态库路径有问题
输入图片说明
执行成功的动态库放在sqlalchemy代码同目录下
输入图片说明
执行失败的动态库放在 site-packages 下

评论 (2)

刘宇浩 创建了缺陷

Hey @刘宇浩, Welcome to openGauss Community.
All of the projects in openGauss Community are maintained by @opengauss_bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at Here to find the details.

Hi @刘宇浩,
if you want to get quick review about your issue, please contact the owner in first: @wangtq ,
and then any of the maintainers: @lishifu , @zhangce_ethz
and then any of the committers: @JerryLead , @wangtq , @sunji , @行者无疆_zr , @余翔 , @excaliburxk
if you have any question, please contact the SIG: AI.

opengauss_bot 添加了
 
sig/ai
标签
王恬静 修改了备注

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
13084139 opengauss bot 1686829535
Python
1
https://gitee.com/opengauss/openGauss-DBMind.git
git@gitee.com:opengauss/openGauss-DBMind.git
opengauss
openGauss-DBMind
openGauss-DBMind

搜索帮助