Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 规则审计-策略新增/编辑-后端接口 --story=121513458 #497

Merged

Conversation

0RAJA
Copy link
Collaborator

@0RAJA 0RAJA commented Jan 3, 2025

feat: 规则审计-策略新增/编辑-后端接口 --story=121513458

【新增】

  1. 策略模型新增 sql 字段用于存储规则审计生成的 sql
  2. 新增数据平台SQL构造器
  3. 策略新增/编辑/删除/启停/重试/获取待更新策略接口支持规则审计
  4. 规则审计 bkbase flow 配置
  5. RuleAuditSQLFormatter将前端规则审计配置转换为 SQLGenerator 可识别的 SqlConfig。
    【优化】
  6. 优化控件代码结构
  7. 优化 sql 生成器联表和主表引用

@0RAJA 0RAJA force-pushed the feat_rule_audit_strategy branch 2 times, most recently from 91544bf to d74a913 Compare January 3, 2025 09:32
@codecov-commenter
Copy link

codecov-commenter commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 56.65529% with 381 lines in your changes missing coverage. Please review.

Project coverage is 63.11%. Comparing base (109acdf) to head (c6853f9).
Report is 8 commits behind head on feat_rule_audit.

Files with missing lines Patch % Lines
...ackend/services/web/analyze/controls/rule_audit.py 0.00% 220 Missing ⚠️
src/backend/services/web/analyze/storage_node.py 0.00% 61 Missing ⚠️
...rc/backend/services/web/strategy_v2/serializers.py 64.80% 44 Missing ⚠️
src/backend/services/web/strategy_v2/resources.py 52.63% 27 Missing ⚠️
src/backend/services/web/analyze/controls/aiops.py 0.00% 7 Missing ⚠️
src/backend/services/web/strategy_v2/models.py 40.00% 6 Missing ⚠️
...nd/services/web/strategy_v2/handlers/rule_audit.py 95.45% 5 Missing ⚠️
...rc/backend/tests/test_core/sql/test_sql_builder.py 96.03% 5 Missing ⚠️
src/backend/core/sql/sql_builder.py 75.00% 2 Missing ⚠️
src/backend/services/web/analyze/tasks.py 60.00% 2 Missing ⚠️
... and 2 more
Additional details and impacted files
@@                 Coverage Diff                 @@
##           feat_rule_audit     #497      +/-   ##
===================================================
- Coverage            63.72%   63.11%   -0.62%     
===================================================
  Files                  524      531       +7     
  Lines                17245    17864     +619     
===================================================
+ Hits                 10989    11274     +285     
- Misses                6256     6590     +334     

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

【新增】
1. 策略模型新增 sql 字段用于存储规则审计生成的 sql
2. 新增数据平台SQL构造器
3. 策略新增/编辑/删除/启停/重试/获取待更新策略接口支持规则审计
4. 规则审计 bkbase flow 配置
5. RuleAuditSQLFormatter将前端规则审计配置转换为 SQLGenerator 可识别的 SqlConfig。
【优化】
1. 优化控件代码结构
2. 优化 sql 生成器联表和主表引用
3. 优化单元测试层级
@0RAJA 0RAJA force-pushed the feat_rule_audit_strategy branch from cf1e120 to 13dc0f7 Compare January 3, 2025 11:36
0RAJA added 3 commits January 5, 2025 20:28
【新增】
1. 支持规则审计策略生成对应查询 sql
【新增】
1. 策略列表支持对策略类型筛选
【优化】
1. sql 生成器默认对表名进行 as
2. 规则审计 sql 生成器使用 concat 替换 JsonObject
@0RAJA 0RAJA merged commit 14f98c6 into TencentBlueKing:feat_rule_audit Jan 6, 2025
6 checks passed
@0RAJA 0RAJA deleted the feat_rule_audit_strategy branch January 6, 2025 06:30
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