[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時間
- マージ済み PR(30日)
- 104
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンtype/bug
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
apache/devlake#9328 · コメント 1 件 ·
メンテナーはふだん 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 日以内に返信