Browse Source

Merge pull request #1763 from afishbeck/show_deploy_errors

Fix ecl command line not showing server side compilation errors candidate-3.6.x

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 13 years ago
parent
commit
2185aaa6e7
2 changed files with 13 additions and 5 deletions
  1. 12 5
      ecl/eclcmd/eclcmd_core.cpp
  2. 1 0
      esp/services/ws_workunits/ws_workunitsService.cpp

+ 12 - 5
ecl/eclcmd/eclcmd_core.cpp

@@ -190,12 +190,19 @@ bool doDeploy(EclCmdWithEclTarget &cmd, IClientWsWorkunits *client, const char *
         fprintf(stdout, "\n");
         if (cmd.optVerbose)
             fprintf(stdout, "Deployed\n   wuid: ");
-        if (displayWuid || cmd.optVerbose)
-            fprintf(stdout, "%s\n", w);
         const char *state = resp->getWorkunit().getState();
-        if (cmd.optVerbose)
-            fprintf(stdout, "   state: %s\n", state);
-        return streq(resp->getWorkunit().getState(), state);
+        bool isCompiled = strieq(state, "compiled");
+        if (displayWuid || cmd.optVerbose || !isCompiled)
+            fprintf(stdout, "%s\n", w);
+        if (cmd.optVerbose || !isCompiled)
+            fprintf(stdout, "   state: %s\n\n", state);
+        IArrayOf<IConstECLException> &exceptions = resp->getWorkunit().getExceptions();
+        ForEachItemIn(i, exceptions)
+        {
+            IConstECLException &e = exceptions.item(i);
+            fprintf(stderr, "%s: %s %d: %s\n", e.getSource(), e.getSeverity(), e.getCode(), e.getMessage());
+        }
+        return isCompiled;
     }
     return false;
 }

+ 1 - 0
esp/services/ws_workunits/ws_workunitsService.cpp

@@ -3309,6 +3309,7 @@ void deployEclOrArchive(IEspContext &context, IEspWUDeployWorkunitRequest & req,
 
     WsWuInfo winfo(context, wuid.str());
     winfo.getCommon(resp.updateWorkunit(), WUINFO_All);
+    winfo.getExceptions(resp.updateWorkunit(), WUINFO_All);
 
     AuditSystemAccess(context.queryUserId(), true, "Updated %s", wuid.str());
 }