-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
在自动审核模式中,上线工单存在检测错误或警告时,并匹配auto_rwview_wrong参数时,工单状态应为自动审核不通过;在客户端JS脚本中增加脚本错误数的判断 #2692
Conversation
"Codecov token not found. Please provide Codecov token with -t flag." 是什么意思?是不是构建脚本有问题 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2692 +/- ##
==========================================
+ Coverage 77.14% 77.15% +0.01%
==========================================
Files 117 117
Lines 16174 16186 +12
==========================================
+ Hits 12477 12489 +12
Misses 3697 3697 ☔ View full report in Codecov by Sentry. |
我是没有开启自动审核,sql检查如果有错误,或者警告,其实我认为应该可以提交,只是在审核区域不在展示,工单日志展示sql审核不通过。个人感觉稍微好一点? 比如有一个场景,研发写了很大一段sql准备让提工单。但是一直审核有错误,如果不让他提交,他找dba看的时候,还需要把sql发送dba,然后好像比较麻烦? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我认为当前的实现还是有点混乱, 不需要把自动驳回和自动通过这两个逻辑混在一起.
自动驳回和自动通过这两个功能应该是相对独立的, 自动驳回优先. 所以你应该在最一开始的时候判断能否自动驳回, 这样就没有后来的自动通过的事情了.
对,自动驳回并不是自动审核流程这两个是独立的。 所以在提交工单时,如果发现时自动驳回的单子,就直接设置为2,后续没有自动审核逻辑了。这样这个单子系统也能看到,不同级别有权限的也能看到,也又对应的日志。 |
这一版还是和自动通过结合了, 在这一步之前再做一个处理, 如果 workflow status 是 autoreview_wrong ,那么就提前保存, return , 你看能不能解决你的问题. Archery/sql/utils/workflow_audit.py Lines 303 to 316 in 52ce759
|
对于自动驳回和自动通过是否结合,我不能理解。驳回或通过本来就是审核的两个动作,在create_audit里面必定会存在驳回或通过两个场景,这有什么值得疑问的? ` |
可能之前表达的不清晰, 我重复表达下我的建议:
希望你能理解. |
sql/utils/workflow_audit.py
Outdated
if ( | ||
audit_setting.auto_pass | ||
and self.workflow.status == "workflow_autoreviewwrong" | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
无需判断是否 auto_pass, 逻辑更清晰
if ( | |
audit_setting.auto_pass | |
and self.workflow.status == "workflow_autoreviewwrong" | |
): | |
if self.workflow.status == "workflow_autoreviewwrong": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我的想法是手工确认的模式下,不执行自动驳回
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不行, 你的这个需求是 breaking change 了, 需要做系统配置控制行为
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果你需要, 可以独立成一个函数, should_reject
, 然后你定制开发时覆盖这个函数即可. 这样也可以控制审批流的行为.
参考:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
意思是对于错误工单,提交后可以修改?
这样当然是好的,但是这个状态怎么设置,没搞清楚
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
前面我也问了,这个“breaking change”是什么意思,没搞明白。
在自动审核模式下,存在错误的工单,不应该驳回吗? 还需要参数进行开关?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change 就是和之前版本不一致的行为,对于你的两个问题我就不重复回答了,请参照上方粗体部分的说明。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得需要分析的是,是否存在其它场景,不符合我实现的逻辑。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里可能还是有一些矛盾在的哈,我觉得我观点都表达到位了。如果没有代码改变,新的观点或论据,我就不反复沟通了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前的实现与原来的逻辑基本没有差别了,只是在判断是否自动通过时,增加了对存在审核错误的检查,其实和最早的实现类似。
另外增加了一个系统参数,是否要允许错误脚本提交(仅自动审核模式下),目前是在客户端脚本里进行判断。
#2772 已处理 |
存在检测错误或警告时,拒绝提交,避免一些错误的SQL提交执行