You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug][github_graphql] Extract Pull Requests, Issues, Deployments and Releases read and rewrite the full raw table on every run #9442
I had searched in the issues and found no similar issues.
What happened
Follow-up to #9421, which noted that job_extractor.go was not the only one left behind. Four more extractors of the github_graphql plugin are still built with api.NewApiExtractor:
Extract Pull Requests (pr_extractor.go)
Extract Issues (issue_extractor.go)
Extract Deployments (deployment_extractor.go)
Extract Releases (release_extractor.go)
Their collectors are stateful: each run only fetches what changed and appends it to the raw table. The extractors are not, so every run deletes the tool-layer rows of the scope and extracts every raw row again, however little was collected. The work grows with the history of the repository, and pull requests and issues are the largest tables of a GitHub scope.
The raw table keeps one row per collected version of a pull request or issue. Because each run replays all of them, a label or assignee that was removed on GitHub comes back from the older raw row and stays in _tool_github_pull_request_labels, _tool_github_issue_labels and _tool_github_issue_assignees.
What do you expect to happen
The four extractors use api.NewStatefulApiExtractor, as the REST github plugin already does for pull requests and issues (plugins/github/tasks/pr_extractor.go, issue_extractor.go):
An incremental run extracts only the raw rows added since the previous run.
The label patterns of the scope config go into the subtask config, so a change triggers a full extraction.
The labels of a pull request, and the labels and assignees of an issue, are replaced when it is extracted again.
Extract Users (account_extractor.go) can stay as it is: its collector is not stateful and rewrites its raw table on every run.
How to reproduce
Collect a GitHub repository with github_graphql twice, without full sync.
In the second run, the log line get data from _raw_github_graphql_prs where params=... and got N reports the full raw table, not the rows collected in that run. The same holds for _raw_github_graphql_issues, _raw_github_graphql_deployment and _raw_github_graphql_release.
Remove a label from a pull request between two runs: the label is still in _tool_github_pull_request_labels afterwards.
Activity
shaynhornik commentedon Nov 24, 2026
PR: #9443