[Bug][GitHub] Extract Issues succeeds without extracting when the issue regexes or milestones can't be loaded
Mantenedores costumam responder em até 2 dias
Avaliação
Esta issue ainda não foi avaliada.
Descrição
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
- Linguagem predominante
- Go
- Estrelas
- 3.2k
- Forks
- 840
- Merge médio
- 1d 21h
- PRs com merge (30d)
- 104
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de apache/devlake
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 60/100
Mantenedores costumam responder em até 2 dias
-
[Bug][CircleCI] collectPipelines panics with a nil pointer dereference when the sync policy has no timeAfterTalvez já em andamento @ShivamSharma43 assumiu hoje. Aberta
apache/devlake#9367 · 1 responsável ·
Mantenedores costumam responder em até 2 dias
-
[Bug][Asana] Story, subtask and tag collectors stop at 100 per task; task and user collectors restart on a full last pageTalvez já em andamento @ShivamSharma43 assumiu hoje. Aberta
apache/devlake#9365 · 1 responsável ·
Mantenedores costumam responder em até 2 dias
-
[Bug][Linear] Config UI cannot associate a scope config with Linear team scopesTalvez já em andamento @VictorColomb assumiu há 1 dia. Abertatype/bug
apache/devlake#9355 · 1 responsável ·
Mantenedores costumam responder em até 2 dias
-
[Bug][JIRA Service API TOKEN] Jira API Gateway: saved service-account token truncated by varchar(255), causing Base64 errors and HTTP 500Talvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Abertatype/bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 58/100
apache/devlake#9328 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
Todas as issues de apache/devlake
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Mantenedores costumam responder em até 1 dia
-
GitHub webhook is not subscribed to release events, so `event: release` never triggersTalvez já em andamento @qsun assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
woodpecker-ci/woodpecker#7542 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
zilliztech/milvus-backup#1386 ·
Mantenedores costumam responder em até 1 dia
-
Pipelined flush no longer observes kill signals after #2042: flush backoffer is built with nil varsAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia