[Bug][GitHub] Extract Issues succeeds without extracting when the issue regexes or milestones can't be loaded
維護者通常 2 天內回覆
評估
這個 Issue 還沒有評估資料。
描述
Search before asking
- I had searched in the issues and found no similar issues.
What happened
The GitHub extractApiIssues and GitHub GraphQL extractIssues subtasks report success without extracting anything when their setup fails.
Both drop the error from NewIssueRegexes, which compiles the issue regexes from the scope config (plugins/github/tasks/issue_extractor.go, plugins/github_graphql/tasks/issue_extractor.go):
issueRegexes, err := NewIssueRegexes(config)
if err != nil {
return nil
}
The GraphQL extractor does the same with the error from getMilestoneMap, which reads _tool_github_milestones:
milestoneMap, err := getMilestoneMap(db, data.Options.GithubId, data.Options.ConnectionId)
if err != nil {
return nil
}
So an invalid regex in the scope config (for example issueSeverity: "severity/(.*") or a failed milestone query makes the subtask return nil. The pipeline marks it successful, _tool_github_issues isn't updated, and the converters run on old data. No error is logged, so the user doesn't learn that the regex is wrong.
The PR extractors of both plugins return the same kind of error (regexp Compile prType failed), and so does the GitLab issue extractor.
What do you expect to happen
The subtask fails with the setup error, e.g. regexp Compile issueSeverity failed, like the PR extractors.
How to reproduce
Set an invalid regex such as severity/(.* as issueSeverity in a GitHub scope config and collect the repo. Extract Issues succeeds and no issues are extracted. A unit test that calls ExtractApiIssues or ExtractIssues with that scope config gets nil back.
Anything else
Proposed fix (I have a PR ready): return err instead of return nil in the three places.
Version
main
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
- 主要語言
- Go
- 星號
- 3.2k
- 分支
- 840
- 平均合併
- 1 天 21 小時
- 30 天內合併 PR
- 104
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
apache/devlake 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 60/100
維護者通常 2 天內回覆
-
[Bug][CircleCI] collectPipelines panics with a nil pointer dereference when the sync policy has no timeAfter可能已有人在做 @ShivamSharma43 今天認領。 未關閉
apache/devlake#9367 · 已指派 1 人 ·
維護者通常 2 天內回覆
-
[Bug][Asana] Story, subtask and tag collectors stop at 100 per task; task and user collectors restart on a full last page可能已有人在做 @ShivamSharma43 今天認領。 未關閉
apache/devlake#9365 · 已指派 1 人 ·
維護者通常 2 天內回覆
-
[Bug][Linear] Config UI cannot associate a scope config with Linear team scopes可能已有人在做 @VictorColomb 於 1 天前認領。 未關閉type/bug
apache/devlake#9355 · 已指派 1 人 ·
維護者通常 2 天內回覆
-
[Bug][JIRA Service API TOKEN] Jira API Gateway: saved service-account token truncated by varchar(255), causing Base64 errors and HTTP 500可能重新可做 關聯的 PR 已關閉且未合併。 未關閉type/bug
難度 3/5 1-2 天 新手友好度 58/100
維護者通常 2 天內回覆
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
GitHub webhook is not subscribed to release events, so `event: release` never triggers可能已有人在做 @qsun 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
woodpecker-ci/woodpecker#7542 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 74/100
zilliztech/milvus-backup#1386 ·
維護者通常 1 天內回覆
-
Pipelined flush no longer observes kill signals after #2042: flush backoffer is built with nil vars未關閉
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆