Skip to content

Commit bc9ee28

Browse files
authored
fix(front): follow pagination when preloading workflow pipelines (#384)
When preloading the pipelines for the workflow, we are not following the pagination, so for workflows with more pipelines than 300, which is rare, we don't get all of them, which can lead to 500s in the branch and workflow pages, due to FrontWeb.PipelineView.TreeLike.find_top_pipeline/1 returning nil.
1 parent 510a7bb commit bc9ee28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

front/lib/front/models/workflow.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,8 @@ defmodule Front.Models.Workflow do
431431

432432
def preload_pipelines(workflows) when is_list(workflows) do
433433
Front.Utils.parallel_map(workflows, fn workflow ->
434-
pipelines = Front.Models.Pipeline.list(wf_id: workflow.id)
434+
options = [pagination: :auto]
435+
pipelines = Front.Models.Pipeline.list([wf_id: workflow.id], options)
435436

436437
%{workflow | pipelines: pipelines}
437438
end)

0 commit comments

Comments
 (0)