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

Aberta
#9,358 0 comentários 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 2 dias

@ShivamSharma43 já está trabalhando nisso.

Desde 10/11/2026.

  • #9359 de @ShivamSharma43 — aberto

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
Linguagem predominante
Go
Estrelas
3.2k
Forks
840
Merge médio
1d 21h
PRs com merge (30d)
104

Preparar o ambiente

Abrir no Codespaces

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

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de apache/devlake

Todas as issues de apache/devlake

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.