[Bug][GitHub] Extract Issues succeeds without extracting when the issue regexes or milestones can't be loaded
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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
- Ngôn ngữ chính
- Go
- Star
- 3.2k
- Fork
- 840
- Merge trung bình
- 1 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 104
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/devlake
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug][CircleCI] collectPipelines panics with a nil pointer dereference when the sync policy has no timeAfterCó thể đã có người làm @ShivamSharma43 đã nhận hôm nay. Đang mở
apache/devlake#9367 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug][Asana] Story, subtask and tag collectors stop at 100 per task; task and user collectors restart on a full last pageCó thể đã có người làm @ShivamSharma43 đã nhận hôm nay. Đang mở
apache/devlake#9365 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug][Linear] Config UI cannot associate a scope config with Linear team scopesCó thể đã có người làm @VictorColomb đã nhận 1 ngày trước. Đang mởtype/bug
apache/devlake#9355 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug][JIRA Service API TOKEN] Jira API Gateway: saved service-account token truncated by varchar(255), causing Base64 errors and HTTP 500Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởtype/bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
apache/devlake#9328 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của apache/devlake
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
GitHub webhook is not subscribed to release events, so `event: release` never triggersCó thể đã có người làm @qsun đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
woodpecker-ci/woodpecker#7542 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
zilliztech/milvus-backup#1386 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Pipelined flush no longer observes kill signals after #2042: flush backoffer is built with nil varsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày