You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by "peacewong (via GitHub)" <gi...@apache.org> on 2023/02/22 07:48:54 UTC

[GitHub] [linkis] peacewong commented on a diff in pull request #4256: Engine exception prompt optimization

peacewong commented on code in PR #4256:
URL: https://github.com/apache/linkis/pull/4256#discussion_r1113946272


##########
linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/engineplugin/server/service/DefaultEngineConnResourceService.scala:
##########
@@ -241,21 +242,27 @@ class DefaultEngineConnResourceService extends EngineConnResourceService with Lo
     val engineConnBmlResources = asScalaBufferConverter(
       engineConnBmlResourceDao.getAllEngineConnBmlResource(engineConnType, "v" + version)
     )
-    val confBmlResource = engineConnBmlResources.asScala
+    val confBmlResourceMap = engineConnBmlResources.asScala
       .find(_.getFileName == LaunchConstants.ENGINE_CONN_CONF_DIR_NAME + ".zip")
       .map(parseToBmlResource)
-      .get
-    val libBmlResource = engineConnBmlResources.asScala
+    val libBmlResourceMap = engineConnBmlResources.asScala
       .find(_.getFileName == LaunchConstants.ENGINE_CONN_LIB_DIR_NAME + ".zip")
       .map(parseToBmlResource)
-      .get
-    val otherBmlResources = engineConnBmlResources.asScala
+    val otherBmlResourcesMap = engineConnBmlResources.asScala
       .filterNot(r =>
         r.getFileName == LaunchConstants.ENGINE_CONN_CONF_DIR_NAME + ".zip" ||
           r.getFileName == LaunchConstants.ENGINE_CONN_LIB_DIR_NAME + ".zip"
       )
       .map(parseToBmlResource)
-      .toArray
+    if (confBmlResourceMap.isEmpty || libBmlResourceMap.isEmpty || otherBmlResourcesMap.isEmpty) {

Review Comment:
   Only need to judge lib and conf



-- 
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: notifications-unsubscribe@linkis.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org