Fix output panic (#311)

## Changes
<!-- Summary of your changes that are easy to understand -->

Output now:
```
{
  "run_page_url": "https://e2-dogfood.staging.cloud.databricks.com/?o=6051921418418893#job/6199333392110/run/1088443776202122",
  "task_outputs": {
    "input": null,
    "process": {
      "logs": "[Row(max(id)=9)]\n",
      "logs_truncated": false
    }
  }
}
```

## Tests
<!-- How is this tested? -->
This commit is contained in:
shreyas-goenka 2023-04-05 15:55:24 +02:00 committed by GitHub
parent 33645ae6ef
commit 7427ceba6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,9 @@ func (out *JobOutput) String() (string, error) {
taskKeys := maps.Keys(out.TaskOutputs)
sort.Strings(taskKeys)
for _, k := range taskKeys {
if out.TaskOutputs[k] == nil {
continue
}
taskString, err := out.TaskOutputs[k].String()
if err != nil {
return "", nil