Skip to content

Commit

Permalink
docs: add comment explaining the workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrer committed Jul 5, 2024
1 parent 4c228f3 commit 6cd3d17
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/helpers/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ async function getLatestRuns(gtId?: string, workflowId?: string): Promise<Evalua
if (workflowId) path += `/${workflowId}`

path += '/latest'

/*
TODO: Remove flattening when bug in the backend is fixed.
Bug: The data gets returned as an array of arrays that each contain a single object.
It should have the same structure as the data at the /runs endpoint. (array of objects)
Workaround:
Flatten the returned list to match the data structure of the /runs endpoint.
*/
return (await request(path)).flat(1)
}

Expand Down

0 comments on commit 6cd3d17

Please sign in to comment.