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: npe of getting rollout (#14381)
boojack4c24471738f1
diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.goindex 0aad64d31e..9eea9e8e5f 100644--- a/backend/api/v1/sql_service.go+++ b/backend/api/v1/sql_service.go@@ -599,6 +599,9 @@ func (s *SQLService) doExportFromIssue(ctx context.Context, issueName string) (*if err != nil {return nil, status.Errorf(codes.Internal, "failed to get rollout: %v", err)}+ if rollout == nil {+ return nil, status.Errorf(codes.NotFound, "rollout %d not found", *issue.PipelineUID)+ }tasks, err := s.store.ListTasks(ctx, &api.TaskFind{PipelineID: &rollout.ID})if err != nil {return nil, status.Errorf(codes.Internal, "failed to get tasks: %v", err)diff --git a/backend/store/rollout.go b/backend/store/rollout.goindex 76db10dee6..a2654bcd49 100644--- a/backend/store/rollout.go+++ b/backend/store/rollout.go@@ -22,6 +22,9 @@ func (s *Store) GetRollout(ctx context.Context, rolloutID int) (*PipelineMessageif err != nil {return nil, errors.Wrapf(err, "failed to get pipeline")}+ if pipline == nil {+ return nil, nil+ }rollout := *piplinerollout.Stages = stages