From 550aefead4884bd59e661e4a8094e4848d7ef597 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Tue, 2 Aug 2022 19:34:16 +0300 Subject: [PATCH] Make returned proc list to be returned always in correct order (#1060) --- server/store/datastore/proc.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/store/datastore/proc.go b/server/store/datastore/proc.go index 9408d511c..1a3a11e40 100644 --- a/server/store/datastore/proc.go +++ b/server/store/datastore/proc.go @@ -44,7 +44,10 @@ func (s storage) ProcChild(build *model.Build, ppid int, child string) (*model.P func (s storage) ProcList(build *model.Build) ([]*model.Proc, error) { procList := make([]*model.Proc, 0, perPage) - return procList, s.engine.Where("proc_build_id = ?", build.ID).Find(&procList) + return procList, s.engine. + Where("proc_build_id = ?", build.ID). + OrderBy("proc_pid"). + Find(&procList) } func (s storage) ProcCreate(procs []*model.Proc) error {