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

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

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