You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/11/26 07:39:56 UTC

[GitHub] [incubator-dolphinscheduler] lenboo commented on a change in pull request #4108: [Improvement-4069][server] When the tenant does not exist, the task execution should throw an exception

lenboo commented on a change in pull request #4108:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4108#discussion_r530823970



##########
File path: dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteProcessor.java
##########
@@ -100,6 +98,12 @@ public void process(Channel channel, Command command) {
             logger.error("task execution context is null");
             return;
         }
+        // check if the OS user exists
+        if (!OSUtils.getUserList().contains(taskExecutionContext.getTenantCode())) {
+            logger.error("tenantCode:{} does not exist",taskExecutionContext.getTenantCode());

Review comment:
       we can set the task status failed when the tenant code does not exist.




----------------------------------------------------------------
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.

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