Skip to content

Commit 9116441

Browse files
authored
Hotfix/4631 (#4690)
* fix: decrease page size for github graphql job collector (#4682) * fix: change pr collector detail input (#4687) * fix: change pr collector detail input * fix: for review
1 parent 153cb13 commit 9116441

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

backend/plugins/github/tasks/pr_collector.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var CollectApiPullRequestsMeta = plugin.SubTaskMeta{
4444
}
4545

4646
type SimpleGithubPr struct {
47-
GithubId int64
47+
Number int64
4848
}
4949

5050
type SimpleGithubApiPr struct {
@@ -102,7 +102,7 @@ func CollectApiPullRequests(taskCtx plugin.SubTaskContext) errors.Error {
102102
BuildInputIterator: func() (helper.Iterator, errors.Error) {
103103
// select pull id from database
104104
cursor, err := db.Cursor(
105-
dal.Select("github_id"),
105+
dal.Select("number"),
106106
dal.From(&models.GithubPullRequest{}),
107107
dal.Where(
108108
"repo_id = ? AND connection_id = ? AND state != 'closed'",
@@ -115,7 +115,7 @@ func CollectApiPullRequests(taskCtx plugin.SubTaskContext) errors.Error {
115115
return helper.NewDalCursorIterator(db, cursor, reflect.TypeOf(SimpleGithubPr{}))
116116
},
117117
FinalizableApiCollectorCommonArgs: helper.FinalizableApiCollectorCommonArgs{
118-
UrlTemplate: "repos/{{ .Params.Name }}/pulls/{{ .Input.GithubId }}",
118+
UrlTemplate: "repos/{{ .Params.Name }}/pulls/{{ .Input.Number }}",
119119
ResponseParser: func(res *http.Response) ([]json.RawMessage, errors.Error) {
120120
body, err := io.ReadAll(res.Body)
121121
if err != nil {

backend/plugins/github_graphql/tasks/job_collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func CollectGraphqlJobs(taskCtx plugin.SubTaskContext) errors.Error {
140140

141141
err = collectorWithState.InitGraphQLCollector(helper.GraphqlCollectorArgs{
142142
Input: iterator,
143-
InputStep: 60,
143+
InputStep: 20,
144144
Incremental: incremental,
145145
GraphqlClient: data.GraphqlClient,
146146
BuildQuery: func(reqData *helper.GraphqlRequestData) (interface{}, map[string]interface{}, error) {

0 commit comments

Comments
 (0)