Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: add created_ts and updated_ts to task check run (#4740)
Danny Xu51cdc50b865f
diff --git a/backend/store/issue.go b/backend/store/issue.goindex 4bc0b4acfa..174c604633 100644--- a/backend/store/issue.go+++ b/backend/store/issue.go@@ -379,18 +379,20 @@ func (s *Store) composePipeline(ctx context.Context, pipeline *PipelineMessage)}for _, taskCheckRun := range taskCheckRuns {if taskCheckRun.TaskID == task.ID {- taskCheckRun := taskCheckRun.toTaskCheckRun()+ composedTaskCheckRun := taskCheckRun.toTaskCheckRun()creator, err := s.GetPrincipalByID(ctx, taskCheckRun.CreatorID)if err != nil {return nil, err}- taskCheckRun.Creator = creator+ composedTaskCheckRun.Creator = creatorupdater, err := s.GetPrincipalByID(ctx, taskCheckRun.UpdaterID)if err != nil {return nil, err}- taskCheckRun.Updater = updater- composedTask.TaskCheckRunList = append(composedTask.TaskCheckRunList, taskCheckRun)+ composedTaskCheckRun.Updater = updater+ composedTaskCheckRun.CreatedTs = taskCheckRun.CreatedTs+ composedTaskCheckRun.UpdatedTs = taskCheckRun.UpdatedTs+ composedTask.TaskCheckRunList = append(composedTask.TaskCheckRunList, composedTaskCheckRun)}}diff --git a/backend/store/task.go b/backend/store/task.goindex 15f153bd7d..ea5aec7a15 100644--- a/backend/store/task.go+++ b/backend/store/task.go@@ -146,19 +146,20 @@ func (s *Store) composeTask(ctx context.Context, task *TaskMessage) (*api.Task,composedTask.TaskRunList = append(composedTask.TaskRunList, taskRun)}for _, taskCheckRunRaw := range taskCheckRunRawList {- taskCheckRun := taskCheckRunRaw.toTaskCheckRun()- creator, err := s.GetPrincipalByID(ctx, taskCheckRun.CreatorID)+ composedTaskCheckRun := taskCheckRunRaw.toTaskCheckRun()+ creator, err := s.GetPrincipalByID(ctx, taskCheckRunRaw.CreatorID)if err != nil {return nil, err}- taskCheckRun.Creator = creator-- updater, err := s.GetPrincipalByID(ctx, taskCheckRun.UpdaterID)+ composedTaskCheckRun.Creator = creator+ updater, err := s.GetPrincipalByID(ctx, taskCheckRunRaw.UpdaterID)if err != nil {return nil, err}- taskCheckRun.Updater = updater- composedTask.TaskCheckRunList = append(composedTask.TaskCheckRunList, taskCheckRun)+ composedTaskCheckRun.Updater = updater+ composedTaskCheckRun.CreatedTs = taskCheckRunRaw.CreatedTs+ composedTaskCheckRun.UpdatedTs = taskCheckRunRaw.UpdatedTs+ composedTask.TaskCheckRunList = append(composedTask.TaskCheckRunList, composedTaskCheckRun)}instance, err := s.GetInstanceByID(ctx, composedTask.InstanceID)