Skip to content

Commit 3ad0c6f

Browse files
committed
log
1 parent 43831a8 commit 3ad0c6f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

components/public-api-server/pkg/apiv1/pagination.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package apiv1
66

77
import (
8+
"github.com/gitpod-io/gitpod/common-go/log"
89
db "github.com/gitpod-io/gitpod/components/gitpod-db/go"
910
v1 "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1"
1011
)
@@ -53,5 +54,8 @@ func pageFromResults[T any](results []T, p *v1.Pagination) []T {
5354
end = size
5455
}
5556

57+
log.Info("start-end", start, end)
58+
log.Info("results", results)
59+
5660
return results[start:end]
5761
}

components/public-api-server/pkg/apiv1/project.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ func (s *ProjectsService) ListProjects(ctx context.Context, req *connect.Request
118118
if err != nil {
119119
return nil, proxy.ConvertError(err)
120120
}
121+
log.Info("user projects", projects)
121122
}
122123

123124
if teamID != "" {
@@ -130,13 +131,15 @@ func (s *ProjectsService) ListProjects(ctx context.Context, req *connect.Request
130131
if err != nil {
131132
return nil, proxy.ConvertError(err)
132133
}
134+
log.Info("team projects", projects)
133135
}
134136

135137
// We're extracting a particular page of results from the full set of results.
136138
// This is wasteful, but necessary, until we either:
137139
// * Add new APIs to server which support pagination
138140
// * Port the query logic to Public API
139141
results := pageFromResults(projects, req.Msg.GetPagination())
142+
log.Info("results", results)
140143

141144
return connect.NewResponse(&v1.ListProjectsResponse{
142145
Projects: projectsToAPIResponse(results),

0 commit comments

Comments
 (0)