-
Notifications
You must be signed in to change notification settings - Fork 202
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
perf: 优化插入MySQL时脚本参数过长的报错信息,展示具体错误 #3374 #3395
base: master
Are you sure you want to change the base?
Conversation
...backend/commons/common-i18n/src/main/resources/i18n/validation/ValidationMessages.properties
Show resolved
Hide resolved
src/backend/commons/common-utils/src/main/java/com/tencent/bk/job/common/util/Base64Util.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/tencent/bk/job/execute/model/esb/v2/request/EsbFastExecuteScriptRequest.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/tencent/bk/job/execute/model/esb/v2/request/EsbFastExecuteScriptRequest.java
Outdated
Show resolved
Hide resolved
...m/tencent/bk/job/execute/model/esb/v3/bkci/plugin/EsbBkCIPluginFastExecuteScriptRequest.java
Outdated
Show resolved
Hide resolved
...m/tencent/bk/job/execute/model/esb/v3/bkci/plugin/EsbBkCIPluginFastExecuteScriptRequest.java
Outdated
Show resolved
Hide resolved
...main/java/com/tencent/bk/job/execute/model/esb/v3/request/EsbFastExecuteScriptV3Request.java
Outdated
Show resolved
Hide resolved
...main/java/com/tencent/bk/job/execute/model/esb/v3/request/EsbFastExecuteScriptV3Request.java
Outdated
Show resolved
Hide resolved
.../src/main/java/com/tencent/bk/job/execute/model/web/request/WebFastExecuteScriptRequest.java
Outdated
Show resolved
Hide resolved
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.
几个小问题需要处理下。
|
||
@Override | ||
public String toString() { | ||
return value + "(" + maximumLength + ")"; |
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.
这个对于用户来说依然不够友好,建议修改为 255 Bytes/ 64K Bytes / 16M Bytes / 4G Bytes 这种形式,项目中也有现成的转换工具类可用,可以多站在用户角度去思考想要得到怎样的数据。
void testCalcOriginBytesLength() { | ||
for (int i = 0; i < 100; i++) { | ||
String originStr = genRandomString(); | ||
assertCal(originStr); |
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.
Cal -> Calc
private void assertCal(String originStr) { | ||
|
||
String encodedStr = Base64Util.encodeContentToStr(originStr); | ||
int calLengthByUtil = Base64Util.calcOriginBytesLength(encodedStr); |
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.
cal -> calc
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个小问题需处理
保存作业模板的场景也需要处理下。 |
web/esb 快速执行脚本时,使用自定义校验器对scriptParam和scriptContent进行长度校验