[Bug][Testmo] Runs, milestones and automation runs: only the first 100 are collected
Mantenedores costumam responder em até 2 dias
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 78/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- go
- Domínio
- data-engineering
Direção de pesquisa
Comece por GetTotalPagesFromResponse em backend/plugins/testmo/tasks/shared.go e compare como ele analisa a paginação com ProjectPage em backend/plugins/testmo/api/remote_api.go. Adicione um teste unitário usando a resposta last_page no nível superior descrita na issue e, em seguida, verifique se a função retorna 3 (e trata um valor null como 1). O trabalho estará concluído quando execuções, milestones e execuções de automação puderem solicitar páginas por meio de last_page.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Search before asking
- I had searched in the issues and found no similar issues.
What happened
The Testmo collectRuns, collectMilestones and collectAutomationRuns subtasks only collect the first page (100 items) of a project.
They all use GetTotalPagesFromResponse in backend/plugins/testmo/tasks/shared.go, which reads the page count from meta.total_pages:
body := &models.TestmoResponse{} // data, links, meta, errors
...
if meta, ok := body.Meta.(map[string]interface{}); ok {
if totalPages, exists := meta["total_pages"]; exists { ... }
}
return 1, nil
Testmo list responses have no meta object. The pagination fields are at the top level of the body: the Testmo REST API spec (RunPage, MilestonePage, AutomationRunPage) lists page, prev_page, next_page, last_page, per_page, total and result. The plugin's own remote scope API already reads this format (ProjectPage in backend/plugins/testmo/api/remote_api.go follows next_page). So meta is always nil, the function always returns 1, and the ApiCollector never requests page 2.
What do you expect to happen
All runs, milestones and automation runs of the project are collected, i.e. the collectors fetch pages 2..last_page.
How to reproduce
- Add a Testmo project with more than 100 runs (or milestones / automation runs) as a data scope.
- Run the blueprint.
_raw_testmo_runs(and_tool_testmo_runs) hold only 100 rows for the project, while the project'srun_countis higher.
A unit test that passes {"page": 1, "next_page": 2, "last_page": 3, "per_page": 100, "total": 250, "result": [...]} to GetTotalPagesFromResponse gets 1 instead of 3.
Anything else
Proposed fix (I have a PR ready): read the top-level last_page in GetTotalPagesFromResponse (1 when it is null), plus a unit test.
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
- 2d 6h
- PRs com merge (30d)
- 85
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
-
[Bug][Tempo] Worklog domain ids lack the connection id, so connections with the same worklog id overwrite each otherTalvez já em andamento @ShivamSharma43 assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
apache/devlake#9330 · 1 responsável ·
Mantenedores costumam responder em até 2 dias
-
[Bug][linker] LinkPrToIssue never matches lowercase issue keys (e.g. in branch names)Talvez já em andamento @VictorColomb assumiu há 6 dias. Abertatype/bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
apache/devlake#9283 · 1 comentário · 1 reação · 1 responsável ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 60/100
Mantenedores costumam responder em até 2 dias
-
[Bug][Taiga] Epics, issues, tasks and user stories: only the first 30 are collectedTalvez já em andamento @ShivamSharma43 assumiu hoje. Aberta
Dificuldade 4/5 1-2 dias Facilidade para iniciantes 25/100
Mantenedores costumam responder em até 2 dias
-
type/bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 51/100
Mantenedores costumam responder em até 2 dias
Todas as issues de apache/devlake
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
shukiv/jabali-panel#2423 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
area/docs good first issue help wanted kind/docs priority/p2 triage/accepted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
mattabate/life-distributable#158 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
router-for-me/CLIProxyAPI#7330 ·
Mantenedores costumam responder em até 1 dia