[Bug][GitHub] Extract Issues succeeds without extracting when the issue regexes or milestones can't be loaded

Đang mở
#9,358 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@ShivamSharma43 đang làm issue này rồi.

Từ ngày 10/11/2026.

  • #9359 của @ShivamSharma43 — đang mở

Đá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
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

Mở trong Codespaces

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/devlake

Tất cả issue của apache/devlake

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.