Skip to content

feat(param-compare):新增参数对比的页面#3187

Open
RankRao wants to merge 8 commits into
hhyo:masterfrom
RankRao:feat-param-compare
Open

feat(param-compare):新增参数对比的页面#3187
RankRao wants to merge 8 commits into
hhyo:masterfrom
RankRao:feat-param-compare

Conversation

@RankRao
Copy link
Copy Markdown
Contributor

@RankRao RankRao commented May 20, 2026

参数一致性比较:比较同类型数据库,两个数据库实例之间,是否存在参数不一致的情况,输出不一致的参数表格。

Comment thread sql/instance.py Fixed
Comment thread sql/instance.py Fixed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a7dad54d5d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread sql/views.py
Comment thread sql/tests.py Outdated
Comment thread sql/instance.py
Comment thread sql/templates/param_compare.html Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 97.09172% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.25%. Comparing base (9d50777) to head (e98eaad).

Files with missing lines Patch % Lines
sql/instance.py 91.60% 11 Missing ⚠️
sql/test_instance.py 99.68% 1 Missing ⚠️
sql/views.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3187      +/-   ##
==========================================
+ Coverage   84.66%   85.25%   +0.58%     
==========================================
  Files         141      142       +1     
  Lines       25015    25372     +357     
==========================================
+ Hits        21179    21630     +451     
+ Misses       3836     3742      -94     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cf4873a9f4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread sql/instance.py
Comment thread sql/instance.py
Comment thread sql/instance.py Outdated
@RankRao RankRao requested a review from LeoQuote May 29, 2026 10:05
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ed0c3a450a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread sql/templates/param_compare.html
Comment thread sql/instance.py
Comment thread src/init_sql/v1.15.0.sql
@LeoQuote LeoQuote force-pushed the feat-param-compare branch from ed0c3a4 to 86b1656 Compare June 3, 2026 08:08
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 86b1656766

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread sql/templates/param_compare.html Outdated
Comment thread sql/instance.py
@RankRao
Copy link
Copy Markdown
Contributor Author

RankRao commented Jun 3, 2026

就是不信任前端传参,所有的输入内容要做后端权限和参数的校验了。

@LeoQuote
Copy link
Copy Markdown
Collaborator

LeoQuote commented Jun 3, 2026

嗯, 稍微校验一下就行, 因为 id 是 int 类型, 你应该在这里转换一下就可以了

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d9fead9b9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread common/templates/base.html
@RankRao
Copy link
Copy Markdown
Contributor Author

RankRao commented Jun 4, 2026

修复bug:
1、前端输入的实例ID的参数,增加int数字类型校验。
2、获取参数get_variables方法,增加result_set.error判断
3、前端html展示row.description增加xss防注入。

@RankRao RankRao requested a review from LeoQuote June 4, 2026 03:33
@RankRao RankRao force-pushed the feat-param-compare branch from 971c863 to 243cff5 Compare June 4, 2026 07:14
Comment thread sql/instance.py
try:
int(instance_id)
except (TypeError, ValueError):
result = {"status": 1, "msg": "实例ID不合法", "data": []}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

建议在日志中把 exception 打印出来, 返回信息中可写: 实例ID 不合法, 应为 int 类型, 请联系管理员

@RankRao RankRao requested a review from LeoQuote June 4, 2026 07:54
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.

3 participants