Skip to content

新增新的 API 可查询 table 所在的实例#3160

Merged
hhyo merged 27 commits into
hhyo:masterfrom
LeoQuote:001-add-table-locator-api
May 28, 2026
Merged

新增新的 API 可查询 table 所在的实例#3160
hhyo merged 27 commits into
hhyo:masterfrom
LeoQuote:001-add-table-locator-api

Conversation

@LeoQuote
Copy link
Copy Markdown
Collaborator

提供了入口可直接替换实现, 如通过 prometheus 或其他元数据服务进行实现

本 PR 通过 spec-kit 辅助完成, 后续的开发者可继续使用该工具, 提交的内容中包含对项目的基本要求, 有利于后续的 AI/AGENT 开发

项目专有的 spec 在 memory 和 specs 文件夹内

Comment thread sql_api/api_instance.py Fixed
@LeoQuote LeoQuote force-pushed the 001-add-table-locator-api branch from 6a0ba10 to e0f1fc4 Compare April 29, 2026 10:10
@LeoQuote LeoQuote force-pushed the 001-add-table-locator-api branch from 46e5d60 to 1501fb5 Compare May 26, 2026 10:24
@LeoQuote LeoQuote force-pushed the 001-add-table-locator-api branch from 79432f9 to 5ab1322 Compare May 27, 2026 04:10
@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

❌ Patch coverage is 90.37657% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.67%. Comparing base (d245888) to head (38100fe).

Files with missing lines Patch % Lines
sql_api/table_instance_locator.py 77.46% 16 Missing ⚠️
common/utils/convert.py 25.00% 3 Missing ⚠️
common/utils/ding_api.py 40.00% 3 Missing ⚠️
sql_api/permissions.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #3160    +/-   ##
========================================
  Coverage   83.66%   83.67%            
========================================
  Files         138      140     +2     
  Lines       23199    23431   +232     
========================================
+ Hits        19409    19605   +196     
- Misses       3790     3826    +36     

☔ View full report in Codecov by Sentry.
📢 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.

LeoQuote added 10 commits May 27, 2026 14:31
- Add new API endpoint for table instance locator with support for exact and pattern matching.
- Enhance frontend to include a debounced input field for table name lookup.
- Implement automatic filling of instance, database, and table selectors upon result selection.
- Update serializers to include table_name in response data.
- Add permission checks to ensure only whitelisted users can access the API.
- Introduce integration tests to validate authentication and permission logic.
- Improve user experience with inline warnings for instances not in the current resource group.
- Refactor existing code for better maintainability and clarity.
@hhyo hhyo merged commit 52387b5 into hhyo:master May 28, 2026
8 checks passed
@LeoQuote LeoQuote deleted the 001-add-table-locator-api branch May 29, 2026 03:18
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