From 5758caff21a2ddc92eb33398e2bb1237ad687d88 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Wed, 3 Aug 2022 08:28:16 +0300 Subject: [PATCH] Make returned proc list to be returned always in correct order (#1060) (#1065) --- 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 9408d511cc..1a3a11e409 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 {