From 6e53832ecb9e1d5c63c035d2806553abf33fa145 Mon Sep 17 00:00:00 2001 From: v-kkhuang <62878639+v-kkhuang@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:09:10 +0800 Subject: [PATCH] Dev 1.7.0 bug fix (#580) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Resource reset code optimization * Resource reset code optimization * Resource johhistory code optimization * Resource johhistory code optimization * revent jobhistory: get data * update isreused * fix executionCode error * Code optimization * Code optimization * Code optimization * Code optimization * Code optimization * code review fix * code review fix * Fix Security Work Order: Upgrade Spring Version:5.3.27 -> 5.3.34 * Optimize script log address * SDK interface adds new parameters * Rollback modification to ensure normal cross cluster functionality * fix jobhistory query with code * fix jobhistory query with code * fix download slowly * fix download slowly * Optimize the execution code length * Optimize code * fix list error bug * fix list error bug --------- Co-authored-by: “v_kkhuang” <“420895376@qq.com”> --- .../linkis/jobhistory/restful/api/QueryRestfulApi.java | 10 ++++++---- .../apache/linkis/jobhistory/util/JobhistoryUtils.java | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java index 85e23ecfcc..b4f6362e06 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java @@ -591,10 +591,11 @@ private List getJobhistoryList( } else if (!QueryUtils.checkNameValid(creator)) { throw new LinkisCommonErrorException(21304, "Invalid creator : " + creator); } - if (StringUtils.isNotBlank(executeApplicationName) - && !QueryUtils.checkNameValid(executeApplicationName)) { - throw new LinkisCommonErrorException( - 21304, "Invalid applicationName : " + executeApplicationName); + if (StringUtils.isNotBlank(executeApplicationName)) { + if (!QueryUtils.checkNameValid(executeApplicationName)) { + throw new LinkisCommonErrorException( + 21304, "Invalid applicationName : " + executeApplicationName); + } } else { executeApplicationName = null; } @@ -634,6 +635,7 @@ private List getJobhistoryList( } else if (!QueryUtils.checkInstanceNameValid(engineInstance)) { throw new LinkisCommonErrorException(21304, "Invalid instances : " + engineInstance); } + List queryTasks = new ArrayList<>(); PageHelper.startPage(pageNow, pageSize); try { diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/util/JobhistoryUtils.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/util/JobhistoryUtils.java index 245110c3d6..e561666a0b 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/util/JobhistoryUtils.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/util/JobhistoryUtils.java @@ -164,6 +164,6 @@ private static String formatDateTime(Date date) { // 格式化executeApplicationName的方法 private static String formatExecuteApplicationName( String executeApplicationName, String requestApplicationName) { - return executeApplicationName + "/" + requestApplicationName; + return requestApplicationName + "/" + executeApplicationName ; } }