Azure / azure-batch-cli-extensions

Batch extension cli commands for Azure cli v2
Other
12 stars 18 forks source link

Job template wont create task if i add resource files collection #66

Closed ascobie closed 6 years ago

ascobie commented 6 years ago

Am trying to debug an issue. I am trying to submit a job template, cut down to a very basic template to see what is causing the issue. The following job template creates the job but with no task and there is no error returned from the CLI.

        "taskFactory": {
            "type": "taskCollection",
            "tasks": [
                {
                    "id": "ffmpeg",
                    "commandLine": "cmd.exe /c echo hello",
                    "resourceFiles": [
                        {
                            "source": {
                                "fileGroup": "[parameters('inputData')]"
                            }
                        }
                    ]
                }
            ]
        }

If i remove the "resourceFiles" property, the job submits and the task is created.

        "taskFactory": {
            "type": "taskCollection",
            "tasks": [
                {
                    "id": "ffmpeg",
                    "commandLine": "cmd.exe /c echo hello"
                }
            ]
        }

Any idea what is going on here? Andrew

ascobie commented 6 years ago

update: added a job prep task with resource files and i got an error that there were too many resource files. so i think your taskCollection factory is ignoring an error.

bgklein commented 6 years ago

This looks like the adding tasks via a TaskFactory will only raise exceptions if raised from the extensions SDK level and is not doing any logging of the results of its requests. In this case, it is using add_collection behaviors (albeit for 1 task), which reports a success if the collection of tasks is handled independent of whether the independent task additions succeeded. These failures should be reported to the user and we will look into the best way to surface these.

xingwu1 commented 6 years ago

Fixed with azure-batch-extension 3.0.0