apache / dolphinscheduler

Apache DolphinScheduler is the modern data orchestration platform. Agile to create high performance workflow with low-code
https://dolphinscheduler.apache.org/
Apache License 2.0
12.8k stars 4.6k forks source link

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

Closed chenyuan9028 closed 3 years ago

chenyuan9028 commented 5 years ago

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?

qiaozhanwei commented 5 years ago

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

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

chenyuan9028 commented 5 years ago

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 commented 4 years ago

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