dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[BUG] the UI doesn't show resourceList when add a task through calling api to update processDefJson

Open chenyuan9028 opened this issue 7 years ago • 3 comments

version:1.1.0 Problem: I add a task "snowball-aouth_client" through calling api to update processDefJson,the UI shows the new task,but the resourceList shows nothing.

Below is my processDefJson:

{
    "globalParams":[

    ],
    "tasks":[
        {
            "workerGroupId":-1,
            "runFlag":"NORMAL",
            "type":"SHELL",
            "params":{
                "rawScript":"#!/bin/bash

source ./import.sh

#import_as_parquet snowball snowball report_spam_short
",
                "localParams":[

                ],
                "resourceList":[
                    {
                        "res":"import.sh"
                    }
                ]
            },
            "timeout":{
                "enable":false,
                "strategy":""
            },
            "maxRetryTimes":"0",
            "taskInstancePriority":"MEDIUM",
            "name":"tmp_task",
            "dependence":{

            },
            "retryInterval":"1",
            "preTasks":[

            ],
            "id":"tasks-98924",
            "desc":"临时任务"
        },
        {
            "taskInstancePriority":"MEDIUM",
            "name":"snowball-oauth_client",
            "dependence":{

            },
            "retryInterval":"1",
            "preTasks":[

            ],
            "id":"task-1568701296444",
            "runFlag":"NORMAL",
            "type":"SHELL",
            "params":{
                "rawScript":"#!/bin/bash
hadoop fs -get /escheduler/hdfs/resources/import.sh ./
source ./import.sh
import_as_parquet snowball  snowball  oauth_client  oauth_client 
if [[ $? -ne 0 ]];then
echo "----------sqoop failed-------------"
    exit -1
fi",
                "localParams":[

                ],
                "resourceList":{
                    "res":"import.sh"
                }
            },
            "timeout":{
                "enable":false,
                "interval":60,
                "strategy":""
            },
            "desc":"",
            "maxRetryTimes":"1"
        }
    ],
    "tenantId":-1,
    "timeout":0
}

there may be "import.sh" at the resourceList position,but there is nothing. why?

chenyuan9028 avatar Sep 17 '19 12:09 chenyuan9028

Resource Center, does the resource list have content? Is to match the list of resources and resources you bind. Or can you take a screenshot? Better we locate the problem

资源中心,资源列表有内容吗?是将你绑定的资源和资源列表进行匹配的 或者可以截图吗?更好我们定位出来问题

qiaozhanwei avatar Sep 18 '19 03:09 qiaozhanwei

the UI resourceList shows nothing,but the resource center has the resource! I tried to uplaod the snapshot,but it failed. I will contact you with dingding!

chenyuan9028 avatar Oct 15 '19 06:10 chenyuan9028

I know where is wrong! the "resourceList" is an JsonArray which I give a wrong formatted one!

chenyuan9028 avatar Oct 31 '19 08:10 chenyuan9028