Skip to content

Commit 44d0dce

Browse files
authored
fix(github_graphql): stop requesting unused descriptionHTML for releases (#9248)
The release extractor fills github_releases.description_html from description and never reads descriptionHTML, but the collector still asks GitHub for it. Rendering release notes to HTML for a full page of 100 releases can exceed GitHub's GraphQL time limit on repositories with long release notes: the API returns 502/504, the three retries hit the same limit, and Collect Releases fails with "pageInfo is nil". On a repository with 86 releases and ~437 KB of release notes, the current query returned 502 after ~11s; without descriptionHTML the same page of 100 returns in ~2.2s.
1 parent 56ca347 commit 44d0dce

1 file changed

Lines changed: 15 additions & 16 deletions

File tree

‎backend/plugins/github_graphql/tasks/release_collector.go‎

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,21 @@ type GraphqlQueryReleaseTagCommit struct {
5757
}
5858

5959
type GraphqlQueryRelease struct {
60-
Author GraphqlQueryReleaseAuthor `graphql:"author"`
61-
DatabaseID int `graphql:"databaseId"`
62-
Id string `graphql:"id"`
63-
CreatedAt time.Time `graphql:"createdAt"`
64-
Description string `graphql:"description"`
65-
DescriptionHTML string `graphql:"descriptionHTML"`
66-
IsDraft bool `graphql:"isDraft"`
67-
IsLatest bool `graphql:"isLatest"`
68-
IsPrerelease bool `graphql:"isPrerelease"`
69-
Name string `graphql:"name"`
70-
PublishedAt *time.Time `graphql:"publishedAt"`
71-
ResourcePath string `graphql:"resourcePath"`
72-
TagName string `graphql:"tagName"`
73-
TagCommit GraphqlQueryReleaseTagCommit `graphql:"tagCommit"`
74-
UpdatedAt time.Time `graphql:"updatedAt"`
75-
URL string `graphql:"url"`
60+
Author GraphqlQueryReleaseAuthor `graphql:"author"`
61+
DatabaseID int `graphql:"databaseId"`
62+
Id string `graphql:"id"`
63+
CreatedAt time.Time `graphql:"createdAt"`
64+
Description string `graphql:"description"`
65+
IsDraft bool `graphql:"isDraft"`
66+
IsLatest bool `graphql:"isLatest"`
67+
IsPrerelease bool `graphql:"isPrerelease"`
68+
Name string `graphql:"name"`
69+
PublishedAt *time.Time `graphql:"publishedAt"`
70+
ResourcePath string `graphql:"resourcePath"`
71+
TagName string `graphql:"tagName"`
72+
TagCommit GraphqlQueryReleaseTagCommit `graphql:"tagCommit"`
73+
UpdatedAt time.Time `graphql:"updatedAt"`
74+
URL string `graphql:"url"`
7675
}
7776

7877
var CollectReleaseMeta = plugin.SubTaskMeta{

0 commit comments

Comments
 (0)