You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by be...@apache.org on 2023/04/04 09:28:25 UTC

[incubator-streampark] branch dev updated: [FIx] rebuild app when flink version has changed (#2567)

This is an automated email from the ASF dual-hosted git repository.

benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git


The following commit(s) were added to refs/heads/dev by this push:
     new 23200fbef [FIx] rebuild app when flink version has changed (#2567)
23200fbef is described below

commit 23200fbef3c1bde60618f956e9186c416e0ce0d3
Author: totoro <zh...@foxmail.com>
AuthorDate: Tue Apr 4 17:28:18 2023 +0800

    [FIx] rebuild app when flink version has changed (#2567)
    
    Co-authored-by: zhoulii <zh...@hikvision.com.cn>
---
 .../console/core/service/impl/ApplicationServiceImpl.java         | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
index f63525e9c..6cdc10543 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
@@ -858,6 +858,12 @@ public class ApplicationServiceImpl extends ServiceImpl<ApplicationMapper, Appli
       }
     }
 
+    // when flink version has changed, we should rebuild the application. Otherwise, the shims jar
+    // may be not suitable for the new flink version.
+    if (!ObjectUtils.safeEquals(application.getVersionId(), appParam.getVersionId())) {
+      application.setBuild(true);
+    }
+
     appParam.setJobType(application.getJobType());
     // changes to the following parameters need to be re-release to take effect
     application.setJobName(appParam.getJobName());
@@ -1355,7 +1361,7 @@ public class ApplicationServiceImpl extends ServiceImpl<ApplicationMapper, Appli
   /**
    * Setup task is starting (for webUI "state" display)
    *
-   * @param appParam
+   * @param application
    */
   @Override
   public void starting(Application application) {