You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by "wolfboys (via GitHub)" <gi...@apache.org> on 2023/04/18 15:54:04 UTC

[GitHub] [incubator-streampark] wolfboys opened a new pull request, #2652: [Bug] savepoint timeout bug fixed.

wolfboys opened a new pull request, #2652:
URL: https://github.com/apache/incubator-streampark/pull/2652

   [Bug] savepoint timeout bug fixed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] zhoulii commented on a diff in pull request #2652: [Bug] savepoint timeout bug fixed.

Posted by "zhoulii (via GitHub)" <gi...@apache.org>.
zhoulii commented on code in PR #2652:
URL: https://github.com/apache/incubator-streampark/pull/2652#discussion_r1170707896


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/AppBuildPipeServiceImpl.java:
##########
@@ -210,13 +211,18 @@ public void onStart(PipeSnapshot snapshot) {
               }
             } else {
               if (!app.getDependencyObject().getJar().isEmpty()) {
+                String localUploads = Workspace.local().APP_UPLOADS();
                 // copy jar to local upload dir
                 for (String jar : app.getDependencyObject().getJar()) {
                   File localJar = new File(WebUtils.getAppTempDir(), jar);
-                  Utils.required(localJar.exists());
-                  String localUploads = Workspace.local().APP_UPLOADS();
-                  String uploadJar = localUploads.concat("/").concat(jar);
-                  checkOrElseUploadJar(FsOperator.lfs(), localJar, uploadJar, localUploads);
+                  File uploadJar = new File(localUploads, jar);
+                  if (!localJar.exists() && !uploadJar.exists()) {
+                    throw new ApiAlertException("Missing file: " + jar + ", please upload again");
+                  }
+                  if (localJar.exists()) {
+                    checkOrElseUploadJar(
+                        FsOperator.lfs(), localJar, uploadJar.getAbsolutePath(), localUploads);
+                  }

Review Comment:
   Do we need to deal with `!localJar.exists() && uploadJar.exists()` ? This may happen when upgrading.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] lvshaokang merged pull request #2652: [Bug] savepoint timeout bug fixed.

Posted by "lvshaokang (via GitHub)" <gi...@apache.org>.
lvshaokang merged PR #2652:
URL: https://github.com/apache/incubator-streampark/pull/2652


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] zhoulii commented on a diff in pull request #2652: [Bug] savepoint timeout bug fixed.

Posted by "zhoulii (via GitHub)" <gi...@apache.org>.
zhoulii commented on code in PR #2652:
URL: https://github.com/apache/incubator-streampark/pull/2652#discussion_r1170715946


##########
streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/trait/KubernetesNativeClientTrait.scala:
##########
@@ -19,7 +19,6 @@ package org.apache.streampark.flink.client.`trait`
 
 import org.apache.streampark.common.enums.{ExecutionMode, FlinkK8sRestExposedType}
 import org.apache.streampark.flink.client.bean._
-import org.apache.streampark.flink.kubernetes.IngressController

Review Comment:
   it seems the scala format plugin does not remove unused imports



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] wolfboys commented on a diff in pull request #2652: [Bug] savepoint timeout bug fixed.

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on code in PR #2652:
URL: https://github.com/apache/incubator-streampark/pull/2652#discussion_r1170757312


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/AppBuildPipeServiceImpl.java:
##########
@@ -210,13 +211,18 @@ public void onStart(PipeSnapshot snapshot) {
               }
             } else {
               if (!app.getDependencyObject().getJar().isEmpty()) {
+                String localUploads = Workspace.local().APP_UPLOADS();
                 // copy jar to local upload dir
                 for (String jar : app.getDependencyObject().getJar()) {
                   File localJar = new File(WebUtils.getAppTempDir(), jar);
-                  Utils.required(localJar.exists());
-                  String localUploads = Workspace.local().APP_UPLOADS();
-                  String uploadJar = localUploads.concat("/").concat(jar);
-                  checkOrElseUploadJar(FsOperator.lfs(), localJar, uploadJar, localUploads);
+                  File uploadJar = new File(localUploads, jar);
+                  if (!localJar.exists() && !uploadJar.exists()) {
+                    throw new ApiAlertException("Missing file: " + jar + ", please upload again");
+                  }
+                  if (localJar.exists()) {
+                    checkOrElseUploadJar(
+                        FsOperator.lfs(), localJar, uploadJar.getAbsolutePath(), localUploads);
+                  }

Review Comment:
   > Do we need to deal with `!localJar.exists() && uploadJar.exists()` ? This may happen when upgrading.
   
   `localJar` is find jar under `$APP_HOME/temp`,
   `Uploadjar` is find jars in `$workspace/upload`, `$workspace/upload` is a safe directory. The files uploaded by the user in history will be recorded and will not be deleted with the version upgrade.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org